Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic Oscillator UGens can't be use Envelope as signal input with sync 0 #38

Closed
jwmatthys opened this issue Sep 4, 2015 · 2 comments
Closed

Comments

@jwmatthys
Copy link

The documentation says that SinOsc.sync(0) syncs the frequency to input. This works with oscillators as input, but not Envelope.

Envelope e => SinOsc s => dac;
220 => e.value;
440 => e.target;
minute => e.duration;
minute => now;

But s's frequency remains at zero.

Using an envelope as freq input would greatly simplify glissando.

@spencersalazar
Copy link
Member

ChucK envelopes work by applying their value to their input. Since this envelope has no input, its value is applied to 0, resulting in constant 0 output. You can try feeding a constant:

Step one => Envelope e => SinOsc s => dac;
1 => one.next;

which should give you the desired result. However it might be nice if Envelope/ADSR detected if they have input or not, and would output the current envelope value if there is no source connected.

@jwmatthys
Copy link
Author

Ah! Of course, Envelope is a signal multiplier! Thank you.

Perhaps an example using Step => Envelope => SinOsc for glissando could go in the basic examples?

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

No branches or pull requests

2 participants