[chuck-users] how to write to buffer

Adam Tindale adamtindale at hotmail.com
Fri Nov 25 22:54:10 EST 2005


Hi,

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.  
Makes sense.

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.

--art

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?
>
> thanks,
>
> Eduard
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20051125/97d36bd1/attachment.htm


More information about the chuck-users mailing list