Tweaker's Paradise

Armed with this advice, let's look at The Cook Collection. Here, I will showcase two of Steven Cook's 100 great sounding and nicely commented instruments: ringmod.orc and circularpan.orc.


[index] [prev] [next]

[+] Home
[+] Tutorials

Figure 33: RingMod orchestra from The Cook Collection.

Looking at the ring modulator instrument (figure 33), we can see that in this stereo orchestra (outs1, outs2) an inputfile (sample), read into the orchestra using the soundin opcode, is multiplied by two different audio oscillators whose frequencies are exponentially swept (expon) between two values specified in the score. We also see that the waveform of the modulating oscillators can be specified from the score as well. What is especially interesting here is how Cook uses Csound's conditional value operators and syntax to test the range of a parameter value and change its behavior as a result.

ifreq1 = (p5 <  19  cpspch(p5)  :  p5)
Essentially what he is saying is: "if p5 is less than 19 then use cpspch and convert the value of p5 into the frequency of the oscillator. If p5 is greater than 19 then use the value of p5 to set the oscillator frequency directly."

In Csound, the cpspch value converter is a convenient way of representing the 12 chromatic pitches of the equal-tempered scale without having to figure out the frequencies of each note. In cpspch notation 6.00 is middle C, 6.01 is C#, 6.02 is D, 7.00 is and octave above middle C, 5.00 is an octave below. Here, Cook has designed an instrument that lets you work in whatever way you prefer - Hz or notes.

After running the score (figure 34) as it is to make sure your system is working correctly, you might change the waveshapes or add some of your own. Finally, you should change the sweep frequencies and try playing simultaneous notes to create interesting textures.

Figure 34: RingMod score file.

In Cook's circular panning instrument shown in figure 35, you see that he coordinates a sine and cosine pair to control left-right and front-back location - spread and depth essentially. (They have the same frequency but use oscil's optional phase parameter to start the second oscillator .75 after the first.)

Figure 35: Circular Panning orchestra from The Cook Collection.

As above, if you wish to substitute your own inputfile, you would merely replace the first argument to the soundin opcode with your own filename in quotes. Or, you might substitute a diskin, sndwarp, grain or other opcode here. Once you understand the instruments, you will appreciate how truly modular they are!

With this scorefile (figure 36) you might begin by experimenting with speed, direction, depth and running multiple files with different settings. You can definitely have some serious fun with this one - don't forget the motion sickness bags!

Figure 36: Cook's Circular Panning Score from The Csound Catalog with Audio.

In no time flat, you will come to realize that The Csound Catalog with Audio is a sound designer's gold mine. It won't take much digging for you to discover the riches buried there. I recommend that you bring along some food and water. Once you start along this path, your family and friends might not see you again for months.

  [next] Final Advice: Sequencing, Performing, and Composing with Csound