Fileter envelope problem inside poly~

londonpride's icon

Hi guys !
I've built up a synth, but i came across a problem: i patched my svf with an adsr~ envelope inside my poly~ object with an output for adding controllers outside the poly~ patcher.
It works fine, except for the fact that the cutoff frequency won't work anymore in "real time"...i mean if hold down a note and i change the cutoff frequency nothing changes...if i change the cutoff whitout touching any key when i'll play it'll be on the right frequency...it just doesn't work while i hold down a note.

Thanks in advance !

Roman Thilenius's icon

without seeing your patch we can only guess.

i guess you are controlling the filters absolute values with this envelope. which of course means that nothing else could control the absolute values, too.

you must implement this envelope - and any other "modulator" - to your filters parameters by only letting it _multiply the absolute values the synth uses for this voice.

a more enhanced version of this kind of implementation would be to _add a _scaled output of the envelope, or to _replace the values of the current absolute setting.

example:

- imagine the filter has been set to frequency: 500 Hz.

- you are limiting your filter to a range of 20-22,050 Hz.

- your envelopes output would now have to be scaled to a range of 500 - 22,050 Hz

- now add an additional parameter for the "envelope modulation amount" to your synth, which is multiplying the scaled envelope output from 0. - 1 ("percent")

- if envelope modulation amount is 0., the base setting of 500 Hz will be replaced by the envelope output, which has a range of 500Hz - 500Hz. if the envelope modulation is at 0.5, the filter will be modulated between 500 Hz and 10,525Hz.

it gets a bit more tricky when you also want to have the envelope inverted, or when there is more than one modulation source.
but since you will need that the next 10 years, you should definitely spend a weekend or two on these things.

-110