[chuck-users] exponential envelope

Kassen signal.automatique at gmail.com
Fri Jun 3 14:19:47 EDT 2011


Okay, so in order to use an Envelope by itself (which is necessary in
> this case, as it is otherwise the first item in the chain), we need to
> give it an input to multiply, which is the purpose of the Step ugen.
> Is that correct?
Exactly. So, in this case the value of 1 isn't a "magical number" at all.
Because of that I sometimes write this;

true => my_step.next;

That comes down to the exact same thing and I avoid the number in my code.

> Ah, okay, I got close to this solution but I didn't know how to
> multiply signals. I hadn't seen 'op' in the documentation until you
> mentioned it and I went searching for it... I think the subject of
> connecting multiple chains using Gain in this way is something that
> the manual could elaborate upon.
It's not there? That's not good. To summarize;

Gain is the most simple UGen and has all of the properties that all other
UGens have, but no others.
In fact instead of using "Gain" you can write "UGen and get the same
results. I wouldn't do that as it's less clear, but you can.
.op(), which all UGens have sets how the inputs are treated, the options are
(from memory);
0; only output 0, making the UGen a bit of a dummy
1 (default) add all inputs
2; subtract (starting from the left, I think)
3 multiply (the most practically useful one next to 1)
4; divide (hopefully has exceptions for 0...)

Even the dac has these, meaning that you can nearly instantly turn a
complicated set of running files into a huge mess of sound, if you'd like.

I'll let you know how it goes. I'm on lunch break at work right now,
> but I'll try it out when I get home in a few hours.

Sounds like you'll be fine, as now the general strategy is clear.
Hope you'll have a good sounding weekend.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20110603/48c325f8/attachment.htm>

More information about the chuck-users mailing list