//number of voices for polyphony numVoices = 3 strings = [] for(index = 0; index < numVoices; index++) { strings[index] = Pluck() strings[index].fx.add(Delay()) } //pentatonic scale //notes = ['c#4', 'd#4', 'f#4', 'g#4', 'a#4'] //D Major notes = ['d4', 'e4', 'f#4', 'g4', 'a4', 'b4', 'c#4', 'd3', 'e3', 'f#3', 'g3', 'a3', 'b3', 'c#3'] newChord = function (){ for(windex = 0; windex < numVoices; windex++) { randIndex = Math.floor(notes.length*Math.random()) strings[windex].note(notes[randIndex]) } } Seq(newChord, 1/8) d = Drums('x-o*', 1/8) d.amp = 0.3