attached is a klee step-sequencer as a supercollider list-pattern class. the included helpfile should explain how it works.

there are a couple of ways to make a klee sequencer on the server side as well. in the below examples i used argument lists, but one can also do it using buffers together with the index ugen.

(

SynthDef(\klee8, {|freq= 400, rate= 0.5,

list= #[0, 0, 0, 0, 0, 0, 0, 0],

mul= #[0, 0, 0, 0, 0, 0, 0, 0]|

var i= LFSaw.kr(rate, 1, 0.5, 0.5)*list.size;

var sum= (mul*Select.kr(i+(0..list.size-1)%list.size, list)).sum;

var src= SinOsc.ar(freq+sum, 0, Decay2.kr(Impulse.kr(list.size*rate), 0.01, 0.1, 0.5));

Out.ar(0, Pan2.ar(Mix(src)));

}).add;

)

a= Synth(\klee8)

a.set(\list, #[4, 0, 0, 2, 0, 0, 0, 0]*100) //set the values

a.set(\mul, #[1, 0, 0, 0, 0, 0, 0, 0]) //activate 1 read head

a.set(\mul, #[1, 1, 0, 0, 0, 0, 0, 0]) //activate 2 read heads

a.set(\mul, #[1, 1, 1, 0, 0, 0, 0, 0])

a.set(\mul, #[1, 1, 1, 1, 0, 0, 0, 0])

a.set(\mul, #[1, 0.5, 0.25, 0, 0, 0, 0, 0])

a.set(\list, #[4, 0, -4, 2, 0, 0, 0, 0]*100)

a.set(\freq, 500)

a.set(\rate, 1.5)

a.free

and similar but with 16 steps. it is only to change the number of zeros in list and mul arguments.

(

SynthDef(\klee16, {|freq= 400, rate= 0.5,

list= #[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],

mul= #[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]|

var i= LFSaw.kr(rate, 1, 0.5, 0.5)*list.size;

var sum= (mul*Select.kr(i+(0..list.size-1)%list.size, list)).sum;

var src= SinOsc.ar(freq+sum, 0, Decay2.kr(Impulse.kr(list.size*rate), 0.01, 0.1, 0.5));

Out.ar(0, Pan2.ar(Mix(src)));

}).add;

)

a= Synth(\klee16)

a.set(\list, #[4, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0, 2, 0, 0, 0, 0]*100) //set the values

a.set(\mul, #[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) //activate 1 read head

a.set(\mul, #[1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]) //activate 2 read heads

a.set(\mul, #[1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0.25, 0, 0, 0, 0, 0])

a.set(\list, #[4, 0, -4, 2, 0, 0, 0, 0, 3, 0, -3, 2, 0, 0, 0, 0]*100)

a.set(\freq, 500)

a.set(\rate, 1.5)

a.free