gtr/livecode.scd

127 lines
3.0 KiB
Plaintext
Raw Normal View History

OSCFunc.trace(true); // Turn posting on
OSCFunc.trace(false); // Turn posting off
// ----------------------------------------------------
// LIVE CODE / PERFORMABLE PARAMETERS /////////////////
// ----------------------------------------------------
2023-01-05 13:15:54 +01:00
~gtrIn.set(\in, 0); r.set(\in, 0); ~mic.set(\in, 0);
~gtrIn.set(\in, 2); r.set(\in, 2); ~mic.set(\in, 2);
~gtrIn.set(\in, 3); r.set(\in, 3); ~mic.set(\in, 3);
// set recorder loop and overdub modes ////////////
// start recording (without button)
r.set(\in, 0, \l, 1, \overdub, 0.2, \t_trig, 1);
2023-01-05 13:15:54 +01:00
r.set(\in, 3, \l, 1, \overdub, 0.2, \t_trig, 1);
~g.do({arg n; n.set(\dens,33)});
~overdubMode= 0;
~pitchMode = 0;
~posMode = 6;
~densMode= 10;
~impulseMode = 0;
~gdurMode=0;
~gpanMode=0;
~channelmode=0;
~instrPanMode=0;
r.set(\l, 1); // looping record on/off 0/1 - MAPPED TO SWITCH 3
r.set(\overdub, 0.7); // overdub mode 0 - 0.99 - MAPPED TO SWITCH 4
// todo at gate on off to button control
~g.do({arg n; n.set(\gate, 1 )});
b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
b.plot;
// todo assign freeze toggle button combo to interface
~ptrGrp.set(\rate, 0);
~ptrGrp.set(\rate, 1);
~gdurMode = 0;
~pitchMode = 0;
~pointer.set(\rate, 0);
~g.set(\gate, 1);
~g.do({arg n; n.set(\gate, 1 )});
~g.do({arg n; n.set(\rate, 2 )});
\amp, n.linlin(0,4, -3,-20).dbamp,
~g.do({arg n; n.set(\amp, 0.8)});
~g.do({arg n; n.set(\rateRand, 300 )});
~g.do({arg n; n.set(\amp, 0.3, \dens, 4 )});
~g.do({arg n; n.set(\rateRand, 0)});
~g.do({arg n; n.set(\baseDur, 2)});
~g.do({arg n; n.set(\durRand, 100)});
~g.do({arg n; n.set(\panRand, 1)});
~g.do({arg n; n.set(\sync, 1 )});
~g.do({arg n; n.set(\atk, exprand(0.1, 1) )});
~g.do({arg n; n.set(\atk, exprand(0.1, 1) )});
~g.do({arg n; n.set(\atk, 1000 )});
~g.do({arg n; n.set(\rel, 1000 )});
~g.do({arg n; n.set(\dens, exprand(1,80) )});
~g.do({arg n; n.set(\dens,10)});
~g.do({arg n; n.set(\panRand, 1 )});
\ptrSampleDelay, n.linlin(0,4, 20000, s.sampleRate*5),
~g.do({arg n; n.set(\ptrSampleDelay, s.sampleRate * 4) });
~g.do({arg n; n.set(\ptrRandSamples, s.sampleRate * 4 )});
~g.do({arg n; n.set(\ptrRandSamples, 2000 )});
~g.do({arg n; n.set(\minPtrDelay, 200 )});
~g.do({arg n; n.set([\baseDur, 0.0100])});
~g.do({arg n; n.set([\durRand, 1000])});
~g.do({arg n; n.set([\baseDur, 0, \durRand, 6, \dens, 1, \rate, 1, \rateRand, 1.1, \sync, 1, \ptrRandSamples, 200000, ])});
~g.do({arg n; n.set(\baseDur, 0.3, \durRand, 1, \sync, 1, \dens, 155 )});
~g.do({arg n; n.set([\baseDur, 1.08, \durRand, 3, \sync, 0, \dens, 25 ])});
~rec.set(\overdubLevel, 0.1);
~pointer.set(\ptrMode, 0);
~g.do({arg n; n.set(\gate, 0 )});
////////////////////////////////////////////////////////////////////////
thisProcess.platform.recordingsDir;// find where the recordings are written to
s.record(numChannels:4); // record
// CODE DUMP ZONE ///////////////////////////////
// switch to the custom env
//~g1.set(\envbuf, z);
//~g1.set(\envbuf, -1);
n = NetAddr("127.0.0.1", NetAddr.langPort);
//n = NetAddr.new("224.0.1.9", 6696);