Is there a way to dynamically adjust ADSR or other synth parameters to add expression to notes as they play? I've trawled the documentation and Google and can only find someone who had the same problem as me; being unable to find the answer.
As a simple example, I'll have a synth setup like so with noteOn used to trigger a note:
var env = T("adsr", {a:50,d:300,s:0,r:200});
var synth = T("OscGen", {fwave:"sin", mul:0.5, env:self.env}).play();
Now, I'd expect the following to work:
synth.set({a:300});
or
synth.set({attackTime:300)}
But it has no effect.
Am I missing something, or is it impossible to adjust the envelope without replacing the entire OscGen object?
Is there a way to dynamically adjust ADSR or other synth parameters to add expression to notes as they play? I've trawled the documentation and Google and can only find someone who had the same problem as me; being unable to find the answer.
As a simple example, I'll have a synth setup like so with
noteOn
used to trigger a note:Now, I'd expect the following to work:
or
But it has no effect.
Am I missing something, or is it impossible to adjust the envelope without replacing the entire OscGen object?