JInT_PocketControl

superclass: JInT

/**

2006  Till Bovermann (IEM)

*/


implements JustInTerface for a Doepfer Pocket Control.


s.boot;


(

// plug in a PocketControl

var inPorts = 3;

var outPorts = 3;


MIDIClient.init(inPorts,outPorts); // explicitly intialize the client

inPorts.do({ arg i; 

MIDIIn.connect(i, MIDIClient.sources.at(i));

});

)


k = JInT_PocketControl.new(s, 2094993222)

k.start


k[\c1].action = {|jint| jint.value.postln}

k[\c1].action = nil



// get information on device

k.info


p = p ? ProxySpace.push(s.boot)

p.makeTempoClock



var spec = [1, 4].asSpec;

k[\c16].action = {|jint| 

p.clock.tempo = spec.map(jint.value(0));

}



~y = {Impulse.ar(~tempo)}

~y.play



~y.clear

~y.fadeTime = 10

(

~y = {

Pan2.ar(

Mix.ar(

LFPulse.ar(

k[\c1].kr.round(0.1).exprange(10, 400)!2 * [1, 1.4, 1.25, 1.246],

[0, 0.5],

k[\c9].kr.range(0, 1)

) 

* Pulse.ar(

~tempo.kr, 

k[\c10].kr.range(0, 1)

)

),

k[\c15].kr

)

}

)

~y.play


~y.free


k[\c10].kr.inspect

~tempo.inspect


k.stop