This commit is contained in:
FoAM 2018-05-22 17:20:33 +00:00
parent eca4b87e84
commit 602a3f5d04

View file

@ -15,6 +15,8 @@ s = Server.local;
s.options.sampleRate = 44100;
s.boot;
m = NetAddr.new("192.168.1.1", 10024); // XR16 X-AIR on local netowrk
"...".postln;
~play1 = { arg b1;
@ -27,19 +29,42 @@ s.boot;
{DiskIn.ar(2, b1, loop: 1)}.play.waitForFree;
// free buffer once done? check diskin completion state
"freed [bg - ".post; b1.path.post; "]".postln;
b1.free;
}.play;
};
SynthDef(\pulse, {
SendTrig.kr(Impulse.kr(0.1), 0,
LinLin.ar(LinCongC.ar(freq: 0.5, a: 1.1, c: 0.13, m: 1, xi: 0), -1, 1, 0, 0.3);
//LinLin.ar(FSinOsc(0.5), -1, 1, 0, 0.75);
);
}).add;
OSCFunc({ arg msg, time;
// fx1 levels (0 .. ~0.25)
m.sendMsg("/ch/01/mix/07/level/", msg[3]);
m.sendMsg("/ch/02/mix/07/level/", msg[3]);
m.sendMsg("/ch/03/mix/07/level/", msg[3]);
m.sendMsg("/ch/04/mix/07/level/", msg[3]);
// fx2 levels (0 .. ~0.275)
m.sendMsg("/ch/01/mix/08/level/", 0.1.rand(0.275));
m.sendMsg("/ch/02/mix/08/level/", 0.1.rand(0.275));
m.sendMsg("/ch/03/mix/08/level/", 0.1.rand(0.275));
m.sendMsg("/ch/04/mix/08/level/", 0.1.rand(0.275));
//"osc -> " ++ msg[3].postln;
},'/tr', s.addr);
s.waitForBoot {
"booted...".postln;
~file = Platform.userHomeDir ++ "/snd/" ++ "ephemera-20180520-2ch-12.wav";
~file = Platform.userHomeDir ++ "/snd/" ++ "ephemera1-20180521-12.wav";
"fx...".postln;
Synth(\pulse);
// cue stereo file from disk then play
b=Buffer.cueSoundFile (server: s, path: ~file, numChannels: 2); ~play1.value(b);
};
// 167/31 -> 175/31 -> 168/31