Streams A/D time code modification


#1

https://mutable-instruments.net/modules/streams/manual/

I’m trying to tweak the stock attack/decay parameters in both regular compression mode and the alternate soft mode accessed by holding down the mode button.

I can see about where I need to change values to alter the normal compressor attack/release values in this chunk of code because the manual states the default in regular compressor mode mode is .2ms attack and 150ms release and these are clearly written in the code comments

But how these values come into play?
How does 1:40 correlate to .2 or 2ms and 279:236 to 150ms or 70ms?
Sorry if I didn’t include enough contextual code here, alas I’m just a script kiddie trying to tweak this thing to taste

if (globals) {

  attack_time = globals[0] * (128 + 128 + 99) >> 16; // 1ms to 500ms

  decay_time = 128 + 99 + (globals[2] >> 8); // 50ms to 5000ms

  threshold = globals[1];

  amount = globals[3];

} else {

  attack_time = !alternate ? 1 : 40; // 0.2ms or 2ms;

  decay_time = !alternate ? 279 : 236; // 150ms or 70ms;

  threshold = parameters[0];

  amount = parameters[1];

}

crossposted from Reddit


#2

Check the definition of the lp_coefficients table in https://github.com/pichenettes/eurorack/blob/master/streams/resources/lookup_tables.py#L103:

The response time is approximately 0.001 * 10 ** (CONSTANT / 128) seconds