JInT_DarwiinRemote

superclass: JInT

/**

2007 Till Bovermann (Bielefeld University)

*/

implements [JustInTerface] for a Wiimote via DarwiinRemote.

Server.default = s = Server.internal;

s.boot;

k = JInT_DarwiinRemote.new

k.start

k.stop

k.controllers[7].action = {|me| me.value.postln}

k.controllers[7].action = nil

k[\wiiAcc].action = {|me| me.value.postln}

k[\wiiAcc].action = nil

k[\acc1].action = {|me| me.value.postln}

k[\acc1].action = nil

// get information on device

k.info

p = ProxySpace.push(s)

~a = {

//k[\wiiAcc].kr.poll;

SinOsc.ar(k[\wiiAcc].kr.range(100, 1000), 0, 0.3).sum;

}

~a = {

//k[\wiiAcc].kr.poll;

SinOsc.ar(k[\nunAcc].kr.range(100, 1000), 0, 0.3).sum * k[\Z].kr.range(0, 1);

}

~a = {

//k[\wiiAcc].kr.poll;

SinOsc.ar(k[\wiiAcc].kr.range(100, 1000), 0, 0.3).sum * k[\A].kr.range(0, 1);

}

~a.clear

~a = {

var acc = LeakDC.kr(k[\wiiAcc].kr, 0.95);

//k[\wiiAcc].kr.poll;

SinOsc.ar([acc.exprange(50, 10000), k[\nunAcc].kr.range(100, 1000)], 0, 0.3).collect(_.sum) * [k[\A].kr.range(0, 1) * acc.range(-1, 1), k[\Z].kr.range(0, 1)];

}

(

var path = "/localvol/sound/share/audiosamples/spass/sonneRein-loop.wav".standardizePath;

s.waitForBoot{

b = Buffer.read(s, path, action: {"done".postln});

}

)

b.play

~looped.clear

(

~looped = {arg inter=4;

BufRd.ar(2, b.bufnum, Phasor.ar(k[\C].kr, BufRateScale.kr(b.bufnum) * k[\joy].kr.last.range(-6, 6), 0, BufFrames.kr(b.bufnum)), 1, inter) * k[\C].kr.range(0, 1) * [k[\joy].kr.first.range(1, 0), k[\joy].kr.first.range(0, 1)]

}

)

~looped.play

~a = {

var acc = LeakDC.kr(k[\wiiAcc].kr, 0.95);

//k[\wiiAcc].kr.poll;

SinOsc.ar([acc.exprange(50, 10000), k[\nunAcc].kr.range(100, 1000)], 0, 0.3).collect(_.sum) * [k[\A].kr.range(0, 1) * acc.range(-1, 1), k[\Z].kr.range(0, 1)];

}

~a.play

k.stop