Designing Sound in SuperCollider/Alarms

Fig 27.2: Alarm with two alternating tones
Note that we have separated this into multiple lines for clarity. Exercise: rewrite it as a single line - and use array expansion rather than writing "SinOsc" twice.

Fig 27.3: Alarm with three alternating tones
Or we can write exactly the same thing a bit more generically using Demand units. The frequencies are simply given as an Array - change the values, or add new ones to the end:

Fig 27.4: A choice of timbral settings
This using .cos and .sin to perform waveshaping - move the mouse left and right to choose from our 4 timbral options.

Exercise: alter the "Duty" line so that you can have different durations for each of the notes.(Hint: you can use Dseq to specify times just as easily as to specify frequencies.)

Fig 27.7: A multi-ringer
This SynthDef is capable of a wide variety of sequences, as you'll see below:

...and now we can play it, using the sequences used in the book:

Exercise: work out why some of these multialarm examples don't quite sound like Andy's audio examples! ;)