Minor correction:  running a SinOsc as input to another SinOsc is a method for achieving frequency modulation.  There are several examples in the chuck distro.  To do FM, iirc, there is a special "sync" parameter that when set to 2 triggers this behavior.

Here is the source for basic/fm2.ck

// basic FM synthesis using SinOsc (2 => .sync; also see fm3.ck)

// modulator to carrier
SinOsc m => SinOsc c => dac;

// carrier frequency
440 => c.freq;
// modulator frequency
110 => m.freq;
// index of modulation
300 => m.gain;

// phase modulation is FM synthesis (sync is 2)
2 => c.sync;

// time-loop
while( true ) 1::second => now;


On Sat, Jun 26, 2021 at 3:19 PM Curtis Ullerich <curtullerich@gmail.com> wrote:
When the chuck operator (=>) is used with UGens like `foo => bar`, it pipes the audio signal from foo into bar. Some UGens accept input (like dac, although dac is maybe more properly an audio sink than a UGen), some produce output (like SinOsc), and some do both (like Gain). I believe oscillators like SinOsc do not accept input, so `SinOsc foo => SinOsc bar` wouldn't make sense. This program produces no audio, for example, at least AFAICT:
SinOsc s => SinOsc t => dac;
400 => s.freq;
600 => t.freq;
1::day => now;


Your first example creates two sine oscillators and sends their output to the dac to play. You'll need to set a frequency for the oscillators and advance time to hear anything, of course:
SinOsc s => dac;
SinOsc t => dac;
400 => s.freq;
600 => t.freq;
1::day => now;


On Sat, Jun 26, 2021 at 9:47 AM Gabriele Battaglia <gabriele.battaglia@gmail.com> wrote:
Hi.
I’m a newbie, so I apologize for this basic question.

Which are the differences in between these two constructions?

1.
SinOsc s1 => dac;
SinOsc s2 => dac;

Dn, 2…

SinOsc s1 => SinOsc s2 => dac;

Thanks.
Gabe
Namasté!
Sent from Starship iMac27, Captain Battaglia
G A B R I E L E . B A T T A G L I A @ G M A I L . C O M
--

_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users