//First I started with synth definition, calling it synth1. It has envelope, panning, as well as the other usual parameters set. ( SynthDef(\synth1, {arg out=0.5, freq=440, envdur=1, amp=0.5, pan=1; var x, env; env = EnvGen.kr(Env.perc(0.001, envdur, amp), doneAction:3); x = Mix.ar([FSinOsc.ar(freq, pi/2, 0.5), Pulse.ar(freq,Rand(0.3,0.7))]); x = RLPF.ar(x,freq*4,Rand(0.04,1)); x = Pan2.ar(x,pan); Out.ar(out, x*env); }).add; ) //this line was used to test the synthdef. Pdef(\test2, Pbind(\instrument, \synth1)).play; //set tempo: TempoClock.default.tempo = 112/60; //here is a pattern for the synthdef. It is a random pattern of tetrachord pitches. pdefn is used because it can conveniently control in real time, the changing patterns and other variations. ( Pdefn(\note, Prand([-12, -8, -6, -5, 0, 4, 6, 7, 12],inf)); Pset(\instrument, \synth1, Ppar([ Pbind(\note, Pdefn(\note)), Pbind(\note, Pdefn(\note), \dur, 1/pi) ]) ).play; ) //modulation to other tetrachords/ change in pattern: //modulation 1: different mode of tetrachord, but only one note has changed. Pdefn(\note, Prand([-14, -12, -6, -5, 0, -2, 6, 7],inf)); //modulation 2: different mode, and Pn(Pshuf) makes a repeatedly shuffled list instead of choosing random pitches every time. Pdefn(\note, Pn(Pshuf([-14, -12, -8, -3, -2, 0, 4, 9, 10, 12],2),inf)); //modulation 3: different inversion of the original mode Pdefn(\note, Pn(Pshuf([-17, -12, -8, -6, -5, 0, 4, 6, 7]),inf)); //modulation 4 (climax): this is a shuffled list of dyads, which includes every possible interval of the tetrachord (original mode). Pdefn(\note, Pn(Pshuf([0, [6, 7], [4, 6], [4, 7], [0, 4], [0, 6], [7, 12], [0, 7], [4, 0], [-5, 4], [-6, 4], [-5, 6]],2),inf)); //for recording: s.makeWindow; s.record; s.stopRecording; //open a volume gui, and set it to minimum before starting the recording. s.volume.gui; //for the recording, I am going to play the original pattern first. After allowing for reasonable amount of time for observation (particularly to hear all the intervals I will then start to change pattern. //the order in which patterns are used can be arbitrary, I would recommend leaving modulation 4 (the climatic dyads passage) until near the end of the recording / performance. //the duration of each pattern is totally arbitrary, but an average performance should last between 3 - 10 minutes.