JInT_PocketFader

superclass: JInT

/**

2006  Till Bovermann (IEM)

*/


implements JustInTerface for a Doepfer Pocket Control.

- Make sure to have the numbers on the Preset/Options upright.

- Set "Preset/Options" on PocketFader to:

dddudddd 

<=> 11101111  // as described in pocketFader manual


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_PocketFader.new(s, -2093904405, 3)

k.start



// get information on device

k.info


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

k[\f1].action = nil




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

p.makeTempoClock



var spec = [1, 4].asSpec;

k[\f16].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[\f1].kr.round(0.1).exprange(10, 400)!2 * [1, 1.4, 1.25, 1.246],

[0, 0.5],

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

) 

* Pulse.ar(

~tempo.kr, 

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

)

),

k[\f4].kr

)

}

)

~y.play


~y.free


// stop device

k.stop

k.start