So I’m wondering how I could modulate a LPF cutoff with an envelope?
Preferably using the same envelope that’s triggered when a synthdef plays a note.
I have a synthdef with all of it’s oscillators assigned to pass through an adsr envelope when a note
is triggered. I want to pass that through a Low Pass Filter whose frequency cutoff value changes
from let’s say 200 hz to 700 hz as a note is triggered.
Is there some way I could write something like this:
LPF.ar(output, gen, 1.0, 0.0);
where output is a variable that contains all of my oscillators outputs after they’ve passed through an asdr envelope and gen is the variable for the asdr envelope being generated by the envgen unit generator?
I want the freq cutoff to change from say 200 hz to 700 hz. I guess I’d almost want the asdr envelope shape to act as an LFO that triggers when a note triggers.
It would be very helpful to know how to change a value inside a unit generator that way because then theoretically I could modulate all kinds of parameters. I saw this inside the example code:
I tried using that and changing the input from a saw wave to the output from my oscillators+envelope
and that works but I want it to trigger and release each time a note is played. The example code has a sinewave as the LFO shape that’s shifting the cutoff and I’d want my own custom shape, something like an asdr envelope instead.
Is that even possible in SC or should I settle for a sinewave osc like in the example code and focus on getting it to just shift the cutoff between two different values as the note is played?