In this example, the Cyclotron is used to create a continuous texture from a set of piano sounds. Using the default cycler with 8 spokes, this script relies on a variety of different subcommands. The following playcycle command grabs a short segment of the first piano sound (sound #1 in the rt session, or in the cmix array), envelopes it, and plays it, slowly at first, gradually accelerating until the pulse becomes texture:
//accelerating piano frags
playcycle(clen=2.5,snd=1,rndinskip(0,4),rnddur(0.1,0.5),howmany=180,rndpan(0,1),envelope(0.1,0.1),rndat=0.01,gain=0.5,warpctwo(17,1,0.05, 173,1,0.1, 180,1,3.9))
This can be combined with three similar commands:
playcycle(clen=2.5,snd=1,rndinskip(0,4),rnddur(0.1,0.5),howmany=180,rndpan(0,1),envelope(0.1,0.1),rndat=0.01,gain=0.5,warpctwo(17,1,0.05, 173,1,0.1, 180,1,3.9))
playcycle(clen=2.5,snd=2,rndinskip(0,1.5),rnddur(0.1,0.5),howmany=180,rndpan(0,1),envelope(0.1,0.1),rndat=0.01, warpctwo(17,1,0.05, 173,1,0.1, 180,1,3.9))
playcycle(clen=2.5,snd=3,rndinskip(0,1.5),rnddur(0.1,0.5),howmany=180,rndpan(0,1),envelope(0.1,0.1),rndat=0.01,warpctwo(17,1,0.05, 173,1,0.1, 180,1,3.9))
playcycle(clen=2.5,snd=4,rndinskip(0,3.5),rnddur(0.1,0.5),howmany=180,rndpan(0,1),envelope(0.1,0.1),rndat=0.01,gain=0.7, warpctwo(17,1,0.05, 173,1,0.1, 180,1,3.9))
resulting in pulsating piano-like chords that congeal into a dense texture. The clen=2.5 scales the cycler to a length of 2.5 seconds. The rndinskip(0,4) subcommand causes rt to skip into the piano sample a random amount between 0 and 4 seconds. Rnddur(0.1,0.5) selects random values between 0.1 and 0.5 seconds for the "grain" durations. The envelope(0.1,0.1) subcommand puts a simple envelope on each "grain" (this only applies for playnote output; cmix requires its own setline call to envelope--see below). Finally, the warpctwo(17,1,0.05, ...) command warps the cycle so that on its 17th rotation at the first spoke it has a cycle length of 0.05 seconds; it then slows down slightly to a cycle length of 0.1 seconds on the first spoke of the 173rd rotation, and finally to a cycle length of 3.9 seconds at the first spoke of the 180th rotation.
Running this script in rt is problematic. The number of playnote commands would likely overwhelm rt, causing it to crash, and even if it did succeed, the high density of playnotes would quickly use up the available tracks. Trying one playcycle command in rt at a time might be useful, if only to audition the length and variation in density, but to create a clean usable sound, cmix is required. By changing the output to cmix in the Command Type pulldown menu, the output changes from playnotes to the following:
input(sndin = get_array(1, 1)) stereo(0.574265, 0.000000, -0.457446, 1.000000, 0.795807) input(sndin = get_array(1, 3)) stereo(0.071136, 0.000000, -0.160815, 0.700000, 0.327850) input(sndin = get_array(1, 0)) stereo(1.234497, 0.000277, -0.313806, 0.500000, 0.175720) input(sndin = get_array(1, 2)) stereo(0.312927, 0.000652, -0.200208, 1.000000, 0.955872) input(sndin = get_array(1, 2)) stereo(0.693878, 0.303281, -0.240588, 1.000000, 0.115967) input(sndin = get_array(1, 3)) stereo(1.379684, 0.305113, -0.103821, 0.700000, 0.416931) input(sndin = get_array(1, 0)) stereo(2.808838, 0.320188, -0.190564, 0.500000, 0.171722) . .
etc....
Because copying and pasting such a large amount of text can be cumbersome, it is best to choose an output file in the outfile path name text box. This file can then be edited and used immediately with cmix. The final score file would look something like:
//create a header for the output file
system("F2 /Sound5/dan/piano.snd")
//select the destination for the output
output("/Sound5/dan/piano.snd")
//update the envelope 10000 times a second
reset(10000)
//make an envelope for each "grain"
setline(0,0,0.1,1,0.9,1,1,0)
//load up an array of input sounds
sndlistIn = load_array(1,
"/usr/share/data/sounds/synth/soundfiles/GeneralMIDI_SoundSetLevel1/001_AcousticGrandPiano/AcousticGrandPianoA0",
"/usr/share/data/sounds/synth/soundfiles/GeneralMIDI_SoundSetLevel1/001_AcousticGrandPiano/AcousticGrandPianoB4",
"/usr/share/data/sounds/synth/soundfiles/GeneralMIDI_SoundSetLevel1/001_AcousticGrandPiano/AcousticGrandPianoC#4",
"/usr/share/data/sounds/synth/soundfiles/GeneralMIDI_SoundSetLevel1/001_AcousticGrandPiano/AcousticGrandPianoC2")
//here we go...
input(sndin = get_array(1, 1))
stereo(0.574265, 0.000000, -0.457446, 1.000000, 0.795807)
input(sndin = get_array(1, 3))
stereo(0.071136, 0.000000, -0.160815, 0.700000, 0.327850)
input(sndin = get_array(1, 0))
stereo(1.234497, 0.000277, -0.313806, 0.500000, 0.175720)
input(sndin = get_array(1, 2))
stereo(0.312927, 0.000652, -0.200208, 1.000000, 0.955872)
input(sndin = get_array(1, 2))
stereo(0.693878, 0.303281, -0.240588, 1.000000, 0.115967)
input(sndin = get_array(1, 3))
stereo(1.379684, 0.305113, -0.103821, 0.700000, 0.416931)
input(sndin = get_array(1, 0))
stereo(2.808838, 0.320188, -0.190564, 0.500000, 0.171722)
.
.
etc....
Listen to this example in realaudio (streaming--sounds lousy, but is fast) or mp3 format (download--sounds great, but is slow); you will need a Realaudio player for realaudio, or an mp3 player for the mp3 file.
There are a variety other subcommands at the user's disposal and many possible uses; these examples are meant only to familiarize the reader with a few of Cyclotron's capabilities.