[chuck-users] how to write to buffer
adamtindale at hotmail.com
Fri Nov 25 22:54:10 EST 2005
Great question. There are a few things that you have to understand in
order to do this. When you connect multiple ugens to the input of
another ugen the get summed. So, if connect three sinoscs to the dac
they will get summed. If they all have an amplitude of one and the
same frequency and phase then they will oscillate between -3 and 3.
Alright, you probably want to scale these things you put them into a
gain and then into the dac. Then you set the .gain parameter to .
333333 and you will get -1 to 1. Fantastic. You probably already know
this. But if you want to do ring modulation you can change the .op
parameter of gain to 3, which is multiply, and the inputs will be
multiplied against each other.
You can check the manual for the .op parameters of gain. They are:
– -1 passthrough
– 0 no processing
– 1 adds inputs (default)
– 2 subtracts inputs
– 3 multiplies inputs
– 4 divides inputs
For the example you gave, the solution is to connect two ugens to a
gain that has the .op set to 1 (default). You add the DC bias by
using the step object and setting it to k.
ChucK has all sorts of effects you can use to put between your
oscillator and the dac. You can also start doing different modulation
techniques by exploiting the .op feature of gain.
I hope this helps.
On 25-Nov-05, at 6:30 PM, eduard wrote:
> Hello all,
> How can one apply some transformation to the output of an UGen an
> connect it to dac?
> For instance, if I want to add a constant k to the output of a sine
> oscillator and then send this to dac, how should I do it?
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the chuck-users