Skip to content
This repository has been archived by the owner on Jun 9, 2019. It is now read-only.

Dynamically adjusting ADSR and other parameters #51

Open
Gadgetoid opened this issue Dec 27, 2015 · 0 comments
Open

Dynamically adjusting ADSR and other parameters #51

Gadgetoid opened this issue Dec 27, 2015 · 0 comments

Comments

@Gadgetoid
Copy link

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant