Compare commits

...

2 Commits

Author SHA1 Message Date
Rob Canning 9c3dd3c7b2 gui/parameter updates 2022-11-25 14:46:36 +01:00
Rob Canning 16747307c9 density steps to fibonacci 2022-11-24 00:51:51 +01:00
2 changed files with 183 additions and 205 deletions

View File

@ -99,10 +99,8 @@ l.criticalColor = Color.red(0.5);
///////////// END OF INPUT GUI BOX ///////////// END OF INPUT GUI BOX
// ------------- GRAIN GUI // ------------- GRAIN GUI
~grainGui = CompositeView.new(w, bounds:Rect(540,80,350,560)) ~grainGui = CompositeView.new(w, bounds:Rect(540,80,350,560))
.background_(Color.white) .background_(Color.white)
.alwaysOnTop_(true); .alwaysOnTop_(true);
@ -113,40 +111,56 @@ VLayout(
StaticText(~grainGui, Rect(50,50,200,30)).string_("gSYNTH////").background_(Color.rand).stringColor_(Color.black).font_(Font.default.size_(30)); StaticText(~grainGui, Rect(50,50,200,30)).string_("gSYNTH////").background_(Color.rand).stringColor_(Color.black).font_(Font.default.size_(30));
StaticText(~grainGui, Rect(50,50,300,40)).string_("PLAYHEAD MODE").background_(Color.clear).stringColor_(Color.black).font_(Font.default.size_(30)); StaticText(~grainGui, Rect(50,50,300,40)).string_("PLAYHEAD MODE").background_(Color.clear).stringColor_(Color.black).font_(Font.default.size_(30));
~positionModeGui = QPopUpMenu(~grainGui, Rect(10, 50, 300, 40)) ~posModeGui = QPopUpMenu(~grainGui, Rect(10, 50, 300, 40))
.items_([0, "Static", "Looping","Randomise","Constrained", "Sensor", 6, 7]) .items_([0, "Static", "Looping","Randomise","Constrained", "Sensor", 6, 7])
.font_(Font.default.size_(35)).background_(Color.yellow); .font_(Font.default.size_(35)).background_(Color.yellow);
StaticText(~grainGui, Rect(50,50,300,40)).string_("PITCH MODE").background_(Color.clear).stringColor_(Color.black).font_(Font.default.size_(30)); StaticText(~grainGui, Rect(50,50,300,40)).string_("PITCH MODE").background_(Color.clear).stringColor_(Color.black).font_(Font.default.size_(30));
~pitchModeGui = QPopUpMenu.new(~grainGui, Rect(10,100,300,40)) ~pitchModeGui = QPopUpMenu.new(~grainGui, Rect(10,100,300,40))
.items_([0,1,2,3,4,5,6,7]) .items_([
.font_(Font.default.size_(35)) "0: NO TRANSPOSITION",
"1: + OCTAVE",
"2: - OCTAVE",
"3: 1 : 1.1 RANDOM SEMI/MIKTRO/TONES",
"4: .25 : 5 LOW 5 OCTAVES",
"5: 0.1 : 100 ",
"6: 10 : 1000",
"7: SENSOR --> RANDRATE",
])
.font_(Font.default.size_(20))
.stringColor_(Color.black).background_(Color.yellow); .stringColor_(Color.black).background_(Color.yellow);
StaticText(~grainGui, Rect(50,50,300,40)).string_("DURATION MODE").background_(Color.clear).stringColor_(Color.black).font_(Font.default.size_(30)); StaticText(~grainGui, Rect(50,50,300,40)).string_("DURATION MODE").background_(Color.clear).stringColor_(Color.black).font_(Font.default.size_(30));
~durModeGui = QPopUpMenu.new(~grainGui, Rect(10,150,300,40)) ~durModeGui = QPopUpMenu.new(~grainGui, Rect(10,150,300,40))
.items_([0, 1,2,3,4,5,6,7]) .items_([
.font_(Font.default.size_(35)) "0: baseDur 1 durRand 1",
"1: baseDur 1/2 durRand 1",
"2: baseDur 1/4 durRand 1",
"3: baseDur 1/8 durRand 1",
"4: baseDur 1/16 durRand 1",
"5: baseDur 1 durRand 100",
"5: baseDur 1 durRand 1000",
"7: SENSOR --> RANDRATE",
])
.font_(Font.default.size_(20))
.value_(0) .value_(0)
.stringColor_(Color.black).background_(Color.yellow); .stringColor_(Color.black).background_(Color.yellow);
StaticText(~grainGui, Rect(50,50,300,40)).string_("DENSITY / VOICES").background_(Color.clear).stringColor_(Color.black).font_(Font.default.size_(30)); StaticText(~grainGui, Rect(50,50,300,40)).string_("DENSITY").background_(Color.clear).stringColor_(Color.black).font_(Font.default.size_(30));
~densityModeGui = QPopUpMenu.new(~grainGui, Rect(10,200,100,40))
~densityModeGui = QPopUpMenu.new(~grainGui, Rect(10,200,300,40)) .items_(["1","2","3","5","8","13","21", "34", "55","89","144","233", "377"])
.items_(["1", "2","4","8","16","32","64","128"])
.font_(Font.default.size_(35)).background_(Color.yellow); .font_(Font.default.size_(35)).background_(Color.yellow);
StaticText(~grainGui, Rect(50,50,300,40)).string_("IMPULSE MODE").background_(Color.clear).stringColor_(Color.black).font_(Font.default.size_(30)); StaticText(~grainGui, Rect(50,50,300,40)).string_("IMPULSE MODE").background_(Color.clear).stringColor_(Color.black).font_(Font.default.size_(30));
~impulseModeGui = QPopUpMenu.new(~grainGui, Rect(10,250,300,40)) ~impulseModeGui = QPopUpMenu.new(~grainGui, Rect(10,250,300,40))
.items_(["Impulse","Dust","Array"]) .items_(["SYNCHRONIOUS","ASYNCHRONIOUS","Array"])
.font_(Font.default.size_(35)).background_(Color.yellow); .font_(Font.default.size_(20)).background_(Color.yellow);
~gPanModeGui = QPopUpMenu(~grainGui, Rect(10, 300, 220, 30)) ~gPanModeGui = QPopUpMenu(~grainGui, Rect(10, 300, 220, 30))
.items_(["OFF","STEREO FRONT","STEREO BACK", "STEREO PAN", "STEREO RND", "QUAD", "QUAD ROTATE", "QUAD RANDOM" ]).font_(Font.default.size_(24)); .items_(["OFF","STEREO FRONT","STEREO BACK", "STEREO PAN", "STEREO RND", "QUAD", "QUAD ROTATE", "QUAD RANDOM" ]).font_(Font.default.size_(24));
@ -157,7 +171,6 @@ VLayout(
}); });
); );
// ------------- GRAIN GUI END // ------------- GRAIN GUI END

345
gtr.scd
View File

@ -1,4 +1,4 @@
'
// RUNME 0 ========================================= // RUNME 0 =========================================
// todo countdown on density voices // todo countdown on density voices
@ -107,7 +107,7 @@ SynthDef("ringModulator", {
// ---------~positionMode = 1; ------------------------------------------- // ---------~posMode = 1; -------------------------------------------
/*( // Granulator --------------------------------------r.get(\in).postln; /*( // Granulator --------------------------------------r.get(\in).postln;
@ -122,7 +122,7 @@ SynthDef("ringModulator", {
SynthDef(\buf_grain, { | out=0, gate = 1, amp = 0.5, SynthDef(\buf_grain, { | out=0, gate = 1, amp = 0.5,
sndbuf, envbuf, pan=0, imp=50, sndbuf, envbuf, pan=0, imp=50,
pitchmodeindex=0, sensorpitch=1, sensorgdur=0.1, sensorgpan=0, pitchmodeindex=0, sensorpitch=1, sensorgdur=0.1, sensorgpan=0,
positionmodeindex=0, gdurmodeindex=0, gpanmodeindex=0, posModeindex=0, gdurmodeindex=0, gpanmodeindex=0,
sensorposition=0, impulsemodeindex=0, sensorimpulse=0, sensorposition=0, impulsemodeindex=0, sensorimpulse=0,
signalChannelIndex=1, dseqarrayIndex=1, signalChannelIndex=1, dseqarrayIndex=1,
rlow= -1, rhigh=10 | rlow= -1, rhigh=10 |
@ -131,7 +131,7 @@ SynthDef(\buf_grain, { | out=0, gate = 1, amp = 0.5,
pitchmode0, pitchmode1, pitchmode2,pitchmode3,pitchmode4,pitchmode5, pitchmode6, pitch, pitchmode0, pitchmode1, pitchmode2,pitchmode3,pitchmode4,pitchmode5, pitchmode6, pitch,
gdurmode0, gdurmode1, gdurmode2, gdurmode3, gdurmode4, gdurmode5, gdurmode6, gdur, gdurmode0, gdurmode1, gdurmode2, gdurmode3, gdurmode4, gdurmode5, gdurmode6, gdur,
gpanmode0, gpanmode1, gpanmode2,gpanmode3, gpanmode4, gpanmode5,gpanmode6, gpanmode7, gpanmode8, gpan, gpanmode0, gpanmode1, gpanmode2,gpanmode3, gpanmode4, gpanmode5,gpanmode6, gpanmode7, gpanmode8, gpan,
positionmode0, positionmode1, positionmode2, positionmode3, position, posMode0, posMode1, posMode2, posMode3, position,
impulsemode0, impulsemode1, impulse, impulsemode0, impulsemode1, impulse,
xdseq, dseq_array1, dseq_array2, dseq_array3, dseq_array4, dseq_array5, dseq_array6, xdseq, dseq_array1, dseq_array2, dseq_array3, dseq_array4, dseq_array5, dseq_array6,
stereosignal, quadsignalL, quadsignalR, quadsignal, signalchannels; stereosignal, quadsignalL, quadsignalR, quadsignal, signalchannels;
@ -180,13 +180,13 @@ SynthDef(\buf_grain, { | out=0, gate = 1, amp = 0.5,
[pitchmode0, sensorpitch, pitchmode1, pitchmode2 ,pitchmode3, pitchmode4, pitchmode5, pitchmode6]); [pitchmode0, sensorpitch, pitchmode1, pitchmode2 ,pitchmode3, pitchmode4, pitchmode5, pitchmode6]);
// granular playhead mode - fixed random or sensor controlled // granular playhead mode - fixed random or sensor controlled
positionmode0 = 0.2; posMode0 = 0.2;
positionmode1 = (Phasor.ar(0.01, 1 * BufRateScale.ir(b), 0, BufSamples.ir(b)) + LFNoise1.ar(100).bipolar(0.1 * SampleRate.ir) ) / BufSamples.ir(b); posMode1 = (Phasor.ar(0.01, 1 * BufRateScale.ir(b), 0, BufSamples.ir(b)) + LFNoise1.ar(100).bipolar(0.1 * SampleRate.ir) ) / BufSamples.ir(b);
positionmode2 = LFNoise1.kr.range(0.05, (BufSamples.ir(b)-1) - 1000 ); posMode2 = LFNoise1.kr.range(0.05, (BufSamples.ir(b)-1) - 1000 );
positionmode3 = LFNoise1.kr.range(0.1, 3.8 ); posMode3 = LFNoise1.kr.range(0.1, 3.8 );
position = Select.kr(positionmodeindex, position = Select.kr(posModeindex,
[positionmode0, positionmode1, positionmode2, positionmode3, sensorposition]); [posMode0, posMode1, posMode2, posMode3, sensorposition]);
// grain impulse frequency mode - random, metric or sensor based impulse modes // grain impulse frequency mode - random, metric or sensor based impulse modes
impulsemode0 = Impulse.kr(imp); impulsemode0 = Impulse.kr(imp);
@ -223,6 +223,8 @@ SynthDef.new(\ptr, {
Out.ar(out, sig); Out.ar(out, sig);
}).add; }).add;
b.numFrames;
SynthDef.new(\rec, { SynthDef.new(\rec, {
arg ptrIn=0, micIn=0, buf=0; arg ptrIn=0, micIn=0, buf=0;
var ptr, sig; var ptr, sig;
@ -313,7 +315,7 @@ SynthDef.new(\gran, {
SynthDef(\buf_grain, { | out=0, gate = 1, amp = 0.5, SynthDef(\buf_grain, { | out=0, gate = 1, amp = 0.5,
sndbuf, envbuf, pan=0, imp=50, sndbuf, envbuf, pan=0, imp=50,
pitchmodeindex=0, sensorpitch=1, sensordensity=1, sensorgdur=0.1, sensorgpan=0, pitchmodeindex=0, sensorpitch=1, sensordensity=1, sensorgdur=0.1, sensorgpan=0,
positionmodeindex=0, gdurmodeindex=0, gpanmodeindex=0, densitymodeindex=0, posModeindex=0, gdurmodeindex=0, gpanmodeindex=0, densitymodeindex=0,
sensorposition=0, impulsemodeindex=0, sensorimpulse=0, sensorposition=0, impulsemodeindex=0, sensorimpulse=0,
signalChannelIndex=1, dseqarrayIndex=1, signalChannelIndex=1, dseqarrayIndex=1,
rlow= -1, rhigh=10 | rlow= -1, rhigh=10 |
@ -322,7 +324,7 @@ SynthDef(\buf_grain, { | out=0, gate = 1, amp = 0.5,
pitchmode0, pitchmode1, pitchmode2,pitchmode3,pitchmode4,pitchmode5, pitchmode6, pitch, pitchmode0, pitchmode1, pitchmode2,pitchmode3,pitchmode4,pitchmode5, pitchmode6, pitch,
gdurmode0, gdurmode1, gdurmode2, gdurmode3, gdurmode4, gdurmode5, gdurmode6, gdur, gdurmode0, gdurmode1, gdurmode2, gdurmode3, gdurmode4, gdurmode5, gdurmode6, gdur,
gpanmode0, gpanmode1, gpanmode2, gpan, gpanmode0, gpanmode1, gpanmode2, gpan,
positionmode0, positionmode1, positionmode2, positionmode3, position, posMode0, posMode1, posMode2, posMode3, position,
densmode0,densmode1,densmode2,densmode3,densmode4,densmode5,densmode6,densmode7, density, densmode0,densmode1,densmode2,densmode3,densmode4,densmode5,densmode6,densmode7, density,
impulsemode0, impulsemode1, impulse, impulsemode0, impulsemode1, impulse,
xdseq, dseq_array1, dseq_array2, dseq_array3, dseq_array4, dseq_array5, dseq_array6, xdseq, dseq_array1, dseq_array2, dseq_array3, dseq_array4, dseq_array5, dseq_array6,
@ -377,13 +379,13 @@ SynthDef(\buf_grain, { | out=0, gate = 1, amp = 0.5,
[pitchmode0, sensorpitch, pitchmode1, pitchmode2 ,pitchmode3, pitchmode4, pitchmode5, pitchmode6]); [pitchmode0, sensorpitch, pitchmode1, pitchmode2 ,pitchmode3, pitchmode4, pitchmode5, pitchmode6]);
// granular playhead mode - fixed random or sensor controlled // granular playhead mode - fixed random or sensor controlled
positionmode0 = 0.2; posMode0 = 0.2;
positionmode1 = (Phasor.ar(0.01, 1 * BufRateScale.ir(b), 0, BufSamples.ir(b)) + LFNoise1.ar(100).bipolar(0.1 * SampleRate.ir) ) / BufSamples.ir(b); posMode1 = (Phasor.ar(0.01, 1 * BufRateScale.ir(b), 0, BufSamples.ir(b)) + LFNoise1.ar(100).bipolar(0.1 * SampleRate.ir) ) / BufSamples.ir(b);
positionmode2 = LFNoise1.kr.range(0.05, (BufSamples.ir(b)-1) - 1000 ); posMode2 = LFNoise1.kr.range(0.05, (BufSamples.ir(b)-1) - 1000 );
positionmode3 = LFNoise1.kr.range(0.1, 3.8 ); posMode3 = LFNoise1.kr.range(0.1, 3.8 );
position = Select.kr(positionmodeindex, position = Select.kr(posModeindex,
[positionmode0, positionmode1, positionmode2, positionmode3, sensorposition]); [posMode0, posMode1, posMode2, posMode3, sensorposition]);
// grain impulse frequency mode - random, metric or sensor based impulse modes // grain impulse frequency mode - random, metric or sensor based impulse modes
impulsemode0 = Impulse.kr(imp); impulsemode0 = Impulse.kr(imp);
@ -400,76 +402,58 @@ SynthDef(\buf_grain, { | out=0, gate = 1, amp = 0.5,
}).add; }).add;
)*/ )*/
( // RUNME 3 ==========================================
(( // RUNME 3 ==========================================
// START SYNTHS --------------------------------- // START SYNTHS ---------------------------------
// ----------------------------------------------------
r = Synth(\recBuf, [\in, 0, \out, 0, \bufnum, b, \t_trig, 0]); // recorder r = Synth(\recBuf, [\in, 0, \out, 0, \bufnum, b, \t_trig, 0]); // recorder
(
b.zero;
~g = 1.collect({
arg n;
Synth(\gran,[
\amp, n.linlin(0,4, -3,-20).dbamp,
\buf, b, // which buffer
\out, 0,
\atk, 1,
\rel, 1,
\gate, 1,
\sync, 1,
\dens, exprand(2,80),
\baseDur, 1, //0.08
\durRand, 5,
\rate, 1,
\rateRand, 2,
\pan, 0,
\panRand, 1.5,
\grainEnv, -1,
\ptrBus, ~ptrBus,
\ptrSampleDelay, n.linlin(0,4, 20000, s.sampleRate*2),
\ptrRandSamples, 2000,
\minPtrDelay, 1000,
], ~granGrp);
});
);
~gtrIn = Synth(\dryIn, [\instrAmp, 1, \out, ~reverbBus], ~sourceGroup); // dry audio signaL ~gtrIn = Synth(\dryIn, [\instrAmp, 1, \out, ~reverbBus], ~sourceGroup); // dry audio signaL
~reverbFX = Synth(\freeVerb, [\in, ~reverbBus], ~fxGroup); ~reverbFX = Synth(\freeVerb, [\in, ~reverbBus], ~fxGroup);
~ringMod = Synth(\ringModulator, [\in, ~ringModBus], ~fxGroup); ~ringMod = Synth(\ringModulator, [\in, ~ringModBus], ~fxGroup);
b.zero;
~g = 1.collect({
arg n;
Synth(\gran,[
\amp, 0.15,
// \amp, n.linlin(0,4, -3,-20).dbamp,
\buf, b, // which buffer
\out, 0,
\atk, 1,
\rel, 1,
\gate, 1,
\sync, 1,
\dens, 21, // exprand(2,80),
\baseDur, 1, //0.08
\durRand, 1,
\rate, 1,
\rateRand, 1,
\pan, 0,
\panRand, 1,
\grainEnv, -1,
\ptrBus, ~ptrBus, // make different style ptrs
//\ptrSampleDelay, n.linlin(0,4, 20000, s.sampleRate*2),
\ptrSampleDelay, 20000, // how far pointer lags behind write head
\ptrRandSamples, 2000, // how much to randomly jump around
\minPtrDelay, 1000, // dont get any closer to the ptr than this
], ~granGrp);
});
);
)); ));
b.plot;
~ringMod.set(\modulator, 0);
~ringMod.set(\mulrate, 0);
// RUNME 4 ========================================== // RUNME 4 ==========================================
// ---------------------------------------------- // ----------------------------------------------
OSCFunc.trace(true); // Turn posting on OSCFunc.trace(true); // Turn posting on
OSCFunc.trace(false); // Turn posting off OSCFunc.trace(false); // Turn posting off
(( // OSC Receivers // ENABLE SENSOR AND SWITCH VALUES <-- (( // OSC Receivers // ENABLE SENSOR AND SWITCH VALUES <--
// ---------------------------------------------------- // ----------------------------------------------------
~overdubMode= 0; ~pitchMode = 0; ~positionMode = 0; ~impulseMode = 1; ~overdubMode= 0; ~pitchMode = 0; ~posMode = 0; ~impulseMode = 1;
~gdurMode=0; ~gpanMode=0; ~channelmode=0; ~gdurMode=0; ~gpanMode=0; ~channelmode=0;
~instrPanMode=0; ~instrPanMode=0;
@ -482,27 +466,34 @@ OSCFunc.trace(false); // Turn posting off
~btn4val = -1; ~btn5val = -1; ~btn6val = -1; ~btn7val = -1; ~btn4val = -1; ~btn5val = -1; ~btn6val = -1; ~btn7val = -1;
~btn8val = -1; // shift buttons ~btn8val = -1; // shift buttons
~btn9val = -1; ~btn10val = -1; ~btn11val = -1; ~btn12val = -1; ~btn9val = -1; ~btn10val = -1; ~btn11val = -1; ~btn12val = -1;
~btn13val = -1; ~btn14val = -1; ~btn15val = -1; ~btn16val = -1; ~btn13val = -1; ~btn14val = -1; ~btn15val = -1; ~btn16val = -1;
( // accel gyro quaternion mapping /////////////////// ( // accel gyro quaternion mapping ///////////////////
// msg[1] msg[2] msg[3] X Y Z ==> ROLL, PITCH, YAW // msg[1] msg[2] msg[3] X Y Z ==> ROLL, PITCH, YAW
o = OSCdef(\test, { arg msg, time, addr, recvPort, rlow, rhigh; o = OSCdef(\test, { arg msg, time, addr, recvPort, rlow, rhigh;
// PAN ------- X Roll
~g.do({arg n; n.set(\rateRand, msg[2].linlin(0, 1, 1, 50); )}; );
//~g.do({arg n; n.set(\rateRand, msg[2].linlin(0, 1, 1, 50).postln; )}; );
//~g.do({arg n; n.set(\rate, 1; )}; );
/* // PAN ------- X Roll
~g1.set(\pan, msg[1].linlin(-0.3, 0.3, -1, 1)); ~g1.set(\pan, msg[1].linlin(-0.3, 0.3, -1, 1));
~g1.set(\gpanmodeindex, ~gpanMode ); ~g1.set(\gpanmodeindex, ~gpanMode );
// PITCH ------- Y Pitch // PITCH ------- Y Pitch
~g1.set(\sensorpitch, msg[3]+1 * 2); ~g1.set(\sensorpitch, msg[3]+1 * 2);
~g1.set(\pitchmodeindex, ~pitchMode ); ~g1.set(\pitchmodeindex, ~pitchMode );
// POSITION ------- Z Yaw // POSITION ------- Z Yaw
~g1.set(\sensorposition, msg[1].linlin(-0.2, 0.6, 0.05, 3.99)); ~g1.set(\sensorposition, msg[1].linlin(-0.2, 0.6, 0.05, 3.99));
~g1.set(\positionmodeindex, ~positionMode ); ~g1.set(\posModeindex, ~posMode );
// RATE ------- X (roll [with PAN]) // RATE ------- X (roll [with PAN])
@ -522,7 +513,8 @@ OSCFunc.trace(false); // Turn posting off
//~g1.set(\signalChannelIndex, ~channelmode ); //~g1.set(\signalChannelIndex, ~channelmode );
~gtrIn.set(\sensorInstrPan, msg[2].wrap(0, 5).linlin(0, 5, -1, 1)); ~gtrIn.set(\sensorInstrPan, msg[2].wrap(0, 5).linlin(0, 5, -1, 1));
~gtrIn.set(\instrPanModeIndex, ~instrPanMode); ~gtrIn.set(\instrPanModeIndex, ~instrPanMode);*/
//
//msg.postln; //msg.postln;
}; , '/euler'); }; , '/euler');
@ -562,6 +554,8 @@ OSCFunc.trace(false); // Turn posting off
~btnstate = [~btnsA, ~btnsB, ~btnsC]; ~btnstate = [~btnsA, ~btnsB, ~btnsC];
/// PRESETS !!!!!!!!!!!!!!!!!!!!!!!
if (msg[9] == 1 && msg[10] == 1, { if (msg[9] == 1 && msg[10] == 1, {
( ~btn0val = (~btn0val + 1) % 5 ) ; ( ~btn0val = (~btn0val + 1) % 5 ) ;
@ -575,10 +569,8 @@ OSCFunc.trace(false); // Turn posting off
~g.do({arg n; n.set(\rateRand, 32)}); ~g.do({arg n; n.set(\rateRand, 32)});
~g.do({arg n; n.set(\sync, 1)}); ~g.do({arg n; n.set(\sync, 1)});
~g.do({arg n; n.set(\ptrRandSamples, 6400000, )}); ~g.do({arg n; n.set(\ptrRandSamples, 6400000, )});
}, },
1, { "DRONAUSAURUS".postln; 1, { "DRONAUSAURUS".postln;
~g.do({arg n; n.set([\baseDur, 1, \durRand, 2, \dens, 100, \rate, 1, \rateRand, 1, \sync, 0, \ptrRandSamples, 200000, ])}); }, ~g.do({arg n; n.set([\baseDur, 1, \durRand, 2, \dens, 100, \rate, 1, \rateRand, 1, \sync, 0, \ptrRandSamples, 200000, ])}); },
2, { "MINIMAL5THsISM".postln; 2, { "MINIMAL5THsISM".postln;
@ -650,48 +642,63 @@ OSCFunc.trace(false); // Turn posting off
// ~recTrigButton // ~recTrigButton
// ~recModeGui // ~recModeGui
// granular gui ////////////////////////////////////////////////////////////////
// granular gui
//
case case
{~pitchMode == 0 }{{~pitchModeGui.value_(0) }.defer; ~g.do({arg n; n.set(\rateRand, 1, \rate, 1) }); } {~pitchMode == 0 }{{~pitchModeGui.value_(0) }.defer; ~g.do({arg n; n.set(\rateRand, 1, \rate, 1) }); }
{~pitchMode == 1 }{{~pitchModeGui.value_(1) }.defer; ~g.do({arg n; n.set(\rate, 2, \rateRand, 1) }); } {~pitchMode == 1 }{{~pitchModeGui.value_(1) }.defer; ~g.do({arg n; n.set(\rate, 2, \rateRand, 1) }); }
{~pitchMode == 2 }{{~pitchModeGui.value_(2) }.defer; ~g.do({arg n; n.set(\rate, 0.25, \rateRand, 1) }); } {~pitchMode == 2 }{{~pitchModeGui.value_(2) }.defer; ~g.do({arg n; n.set(\rate, 0.5, \rateRand, 1) }); }
{~pitchMode == 3 }{{~pitchModeGui.value_(3) }.defer; ~g.do({arg n; n.set(\rate, 1, \rateRand, 1.1) }); } {~pitchMode == 3 }{{~pitchModeGui.value_(3) }.defer; ~g.do({arg n; n.set(\rate, 1, \rateRand, 1.1) }); }
{~pitchMode == 4 }{{~pitchModeGui.value_(4) }.defer; ~g.do({arg n; n.set(\rate, 0.15, \rateRand, 3, \amp, 1.5) }); } {~pitchMode == 3 }{{~pitchModeGui.value_(3) }.defer; ~g.do({arg n; n.set(\rate, 1, \rateRand, 1.1) }); }
{~pitchMode == 5 }{{~pitchModeGui.value_(5) }.defer; ~g.do({arg n; n.set(\rate, 0.15, \rateRand, 100) }); } {~pitchMode == 3 }{{~pitchModeGui.value_(3) }.defer; ~g.do({arg n; n.set(\rate, 1, \rateRand, 1.1) }); }
{~pitchMode == 6 }{{~pitchModeGui.value_(6) }.defer; ~g.do({arg n; n.set(\rate, 100, \rateRand, 1000) }); } {~pitchMode == 3 }{{~pitchModeGui.value_(3) }.defer; ~g.do({arg n; n.set(\rate, 1, \rateRand, 1.1) }); }
{~pitchMode == 7 }{{~pitchModeGui.value_(7) }.defer; ~g.do({arg n; n.set(\rate, 0.015, \rateRand, 10000) }); }; {~pitchMode == 3 }{{~pitchModeGui.value_(3) }.defer; ~g.do({arg n; n.set(\rate, 1, \rateRand, 1.1) }); }
// {~pitchMode == 3 }{{~pitchModeGui.value_(3) }.defer; ~g.do({arg n; n.set(\rate, 1, \rateRand, 1.1) }); }
case {~pitchMode == 3 }{{~pitchModeGui.value_(3) }.defer; ~g.do({arg n; n.set(\rate, 1, \rateRand, 1.1) }); }
{~gdurMode == 0 }{{~durModeGui.value_(0) }.defer} {~pitchMode == 3 }{{~pitchModeGui.value_(3) }.defer; ~g.do({arg n; n.set(\rate, 1, \rateRand, 1.1) }); }
{~gdurMode == 1 }{{~durModeGui.value_(1) }.defer} {~pitchMode == 3 }{{~pitchModeGui.value_(3) }.defer; ~g.do({arg n; n.set(\rate, 1, \rateRand, 1.1) }); }
{~gdurMode == 2 }{{~durModeGui.value_(2) }.defer} {~pitchMode == 3 }{{~pitchModeGui.value_(3) }.defer; ~g.do({arg n; n.set(\rate, 1, \rateRand, 1.1) }); }
{~gdurMode == 3 }{{~durModeGui.value_(3) }.defer} {~pitchMode == 3 }{{~pitchModeGui.value_(3) }.defer; ~g.do({arg n; n.set(\rate, 1, \rateRand, 1.1) }); }
{~gdurMode == 4 }{{~durModeGui.value_(4) }.defer} {~pitchMode == 3 }{{~pitchModeGui.value_(3) }.defer; ~g.do({arg n; n.set(\rate, 1, \rateRand, 1.1) }); }
{~gdurMode == 5 }{{~durModeGui.value_(5) }.defer} {~pitchMode == 4 }{{~pitchModeGui.value_(4) }.defer; ~g.do({arg n; n.set(\rate, 0.25, \rateRand, 5) }); }
{~gdurMode == 6 }{{~durModeGui.value_(6) }.defer} {~pitchMode == 5 }{{~pitchModeGui.value_(5) }.defer; ~g.do({arg n; n.set(\rate, 0.1, \rateRand, 100) }); }
{~gdurMode == 7 }{{~durModeGui.value_(7) }.defer}; {~pitchMode == 6 }{{~pitchModeGui.value_(6) }.defer; ~g.do({arg n; n.set(\rate, 10, \rateRand, 1000) }); }
{~pitchMode == 7 }{{~pitchModeGui.value_(7) }.defer; ~g.do({arg n; n.set(\rate, 1) }); };
case case
{~positionMode == 0 }{{~positionModeGui.value_(0) }.defer; ~g.do({arg n; n.set(\ptrRandSamples, 1) }); } {~gdurMode == 0 }{{~durModeGui.value_(0) }.defer; ~g.do({arg n; n.set(\baseDur, 1, \durRand, 1)}); }
{~positionMode == 1 }{{~positionModeGui.value_(1) }.defer; ~g.do({arg n; n.set(\ptrRandSamples, 4000) }); } {~gdurMode == 1 }{{~durModeGui.value_(1) }.defer; ~g.do({arg n; n.set(\baseDur, 2, \durRand, 1)}); }
{~positionMode == 2 }{{~positionModeGui.value_(2) }.defer; ~g.do({arg n; n.set(\ptrRandSamples, 8000) }); } {~gdurMode == 2 }{{~durModeGui.value_(2) }.defer; ~g.do({arg n; n.set(\baseDur, 4, \durRand, 1)});}
{~positionMode == 3 }{{~positionModeGui.value_(3) }.defer; ~g.do({arg n; n.set(\ptrRandSamples, 16000) }); } {~gdurMode == 3 }{{~durModeGui.value_(3) }.defer; ~g.do({arg n; n.set(\baseDur, 1/4, \durRand, 1)});}
{~positionMode == 4 }{{~positionModeGui.value_(4) }.defer; ~g.do({arg n; n.set(\ptrRandSamples, 32000) }); } {~gdurMode == 4 }{{~durModeGui.value_(4) }.defer; ~g.do({arg n; n.set(\baseDur, 1/8, \durRand, 1)});}
{~positionMode == 5 }{{~positionModeGui.value_(5) }.defer; ~g.do({arg n; n.set(\ptrRandSamples, 64000) }); } {~gdurMode == 5 }{{~durModeGui.value_(5) }.defer; ~g.do({arg n; n.set(\baseDur, 1/16, \durRand, 1)});}
{~positionMode == 6 }{{~positionModeGui.value_(6) }.defer; ~g.do({arg n; n.set(\ptrRandSamples, 128000) }); } {~gdurMode == 6 }{{~durModeGui.value_(6) }.defer; ~g.do({arg n; n.set(\baseDur, 1/32, \durRand, 1)});}
{~positionMode == 7 }{{~positionModeGui.value_(7) }.defer; ~g.do({arg n; n.set(\ptrRandSamples, 256000) }); }; {~gdurMode == 7 }{{~durModeGui.value_(7) }.defer; ~g.do({arg n; n.set(\baseDur, 1/64, \durRand, 1)});};
case case
{~densMode == 0 }{{~densityModeGui.value_(0) }.defer; ~g.do({arg n; n.set(\dens, 1)});} {~posMode == 0 }{{~posModeGui.value_(0) }.defer; ~g.do({arg n; n.set(\ptrRandSamples, b.numFrames, \minPtrDelay, 1000) }); }
{~densMode == 1 }{{~densityModeGui.value_(1) }.defer; ~g.do({arg n; n.set(\dens, 2)}); } {~posMode == 1 }{{~posModeGui.value_(1) }.defer; ~g.do({arg n; n.set(\ptrRandSamples, b.numFrames/4, \minPtrDelay, 1000 ) }); }
{~densMode == 2 }{{~densityModeGui.value_(2) }.defer; ~g.do({arg n; n.set(\dens, 4)});} {~posMode == 2 }{{~posModeGui.value_(2) }.defer; ~g.do({arg n; n.set(\ptrRandSamples, b.numFrames/8, \minPtrDelay, 1000 ) }); }
{~densMode == 3 }{{~densityModeGui.value_(3) }.defer; ~g.do({arg n; n.set(\dens, 8)});} {~posMode == 3 }{{~posModeGui.value_(3) }.defer; ~g.do({arg n; n.set(\ptrRandSamples, b.numFrames/16, \minPtrDelay, 1000 ) }); }
{~densMode == 4 }{{~densityModeGui.value_(4) }.defer; ~g.do({arg n; n.set(\dens, 16)});} {~posMode == 4 }{{~posModeGui.value_(4) }.defer; ~g.do({arg n; n.set(\ptrRandSamples, b.numFrames/32) }); }
{~densMode == 5 }{{~densityModeGui.value_(5) }.defer; ~g.do({arg n; n.set(\dens, 32)});} {~posMode == 5 }{{~posModeGui.value_(5) }.defer; ~g.do({arg n; n.set(\ptrRandSamples, b.numFrames/64) }); }
{~densMode == 6 }{{~densityModeGui.value_(6) }.defer; ~g.do({arg n; n.set(\dens, 64)});} {~posMode == 6 }{{~posModeGui.value_(6) }.defer; ~g.do({arg n; n.set(\ptrRandSamples, 0.001, \minPtrDelay, 10 ) }); }
{~densMode == 7 }{{~densityModeGui.value_(7) }.defer; ~g.do({arg n; n.set(\dens, 128)}); }; {~posMode == 7 }{{~posModeGui.value_(7) }.defer; ~g.do({arg n; n.set(\ptrRandSamples, b.numFrames/200000, \minPtrDelay, 1000;) }); };
case
{~densMode == 0 }{{~densityModeGui.value_(0) }.defer; ~g.do({arg n; n.set(\dens, 1, \amp, 1)}); }
{~densMode == 1 }{{~densityModeGui.value_(1) }.defer; ~g.do({arg n; n.set(\dens, 2, \amp, 1)}); }
{~densMode == 2 }{{~densityModeGui.value_(2) }.defer; ~g.do({arg n; n.set(\dens, 3, \amp, 1)});}
{~densMode == 3 }{{~densityModeGui.value_(3) }.defer; ~g.do({arg n; n.set(\dens, 5, \amp, 1)});}
{~densMode == 4 }{{~densityModeGui.value_(4) }.defer; ~g.do({arg n; n.set(\dens, 8, \amp, 0.9)});}
{~densMode == 5 }{{~densityModeGui.value_(5) }.defer; ~g.do({arg n; n.set(\dens, 13, \amp, 0.85)});}
{~densMode == 6 }{{~densityModeGui.value_(6) }.defer; ~g.do({arg n; n.set(\dens, 21, \amp, 0.8)});}
{~densMode == 7 }{{~densityModeGui.value_(7) }.defer; ~g.do({arg n; n.set(\dens, 34, \amp, 0.75)}); }
{~densMode == 8 }{{~densityModeGui.value_(8) }.defer; ~g.do({arg n; n.set(\dens, 55, \amp, 0.65)}); }
{~densMode == 9 }{{~densityModeGui.value_(9) }.defer; ~g.do({arg n; n.set(\dens, 89, \amp, 0.5)}); }
{~densMode == 10 }{{~densityModeGui.value_(10) }.defer; ~g.do({arg n; n.set(\dens, 144, \amp, 0.45)}); }
{~densMode == 11 }{{~densityModeGui.value_(11) }.defer; ~g.do({arg n; n.set(\dens, 233, \amp, 0.4)}); }
{~densMode == 12 }{{~densityModeGui.value_(12) }.defer; ~g.do({arg n; n.set(\dens, 377, \amp, 0.2)}); };
case case
{~gpanMode == 0 }{{~gPanModeGui.value_(0) }.defer; ~g.do({arg n; n.set(\panRand, 0.25, \pan, 0)}); } {~gpanMode == 0 }{{~gPanModeGui.value_(0) }.defer; ~g.do({arg n; n.set(\panRand, 0.25, \pan, 0)}); }
@ -704,11 +711,10 @@ OSCFunc.trace(false); // Turn posting off
{~gpanMode == 7 }{{~gPanModeGui.value_(7) }.defer; ~g.do({arg n; n.set(\panRand, 0)}); }; {~gpanMode == 7 }{{~gPanModeGui.value_(7) }.defer; ~g.do({arg n; n.set(\panRand, 0)}); };
case case
{~impulseMode == 0 }{{~impulseModeGui.value_(0) }.defer; ~g.do({arg n; n.set(\sync, 0)}); } {~impulseMode == 0 }{{~impulseModeGui.value_(0) }.defer; ~g.do({arg n; n.set(\sync, 1)}); }
{~impulseMode == 1 }{{~impulseModeGui.value_(1) }.defer; ~g.do({arg n; n.set(\sync, 1)}); }; {~impulseMode == 1 }{{~impulseModeGui.value_(1) }.defer; ~g.do({arg n; n.set(\sync, 0)}); };
////////////////// instrument mode gui ////////////////////////////
////////////////// instrument mode gui
case case
{~instrPanMode == 0 }{{~instrPanModeGui.value_(0) }.defer } {~instrPanMode == 0 }{{~instrPanModeGui.value_(0) }.defer }
@ -730,8 +736,7 @@ OSCFunc.trace(false); // Turn posting off
{~fxMode == 6 }{{~fxModeGui.value_(6) }.defer; ~gtrIn.set(\out, ~ringModBus); ~ringMod.set(\modulator, 0, \mulrate, 0); } {~fxMode == 6 }{{~fxModeGui.value_(6) }.defer; ~gtrIn.set(\out, ~ringModBus); ~ringMod.set(\modulator, 0, \mulrate, 0); }
{~fxMode == 7 }{{~fxModeGui.value_(7) }.defer; ~gtrIn.set(\out, ~ringModBus); ~ringMod.set(\modulator, 0, \mulrate, 0); }; {~fxMode == 7 }{{~fxModeGui.value_(7) }.defer; ~gtrIn.set(\out, ~ringModBus); ~ringMod.set(\modulator, 0, \mulrate, 0); };
////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// BUTTON X ----> toggle fx // BUTTON X ----> toggle fx
if (msg[13]==1, if (msg[13]==1,
@ -746,7 +751,6 @@ OSCFunc.trace(false); // Turn posting off
5, { ~fxMode=5; "fx5".postln; }, 5, { ~fxMode=5; "fx5".postln; },
6, { ~fxMode=6; "fx6".postln; }, 6, { ~fxMode=6; "fx6".postln; },
7, { ~fxMode=7; "fx7".postln; }, 7, { ~fxMode=7; "fx7".postln; },
); );
}); });
@ -762,19 +766,27 @@ OSCFunc.trace(false); // Turn posting off
}); });
// INCREASE IMPULSE RATE --------------------------------------- // INCREASE IMPULSE RATE ---------------------------------------
// todo - counter wrap around -- to ping pong count up and down
// if counter is > then + otherwise minus counter
if (msg[15]==1, if (msg[15]==1,
{ {
( ~btn6val = (~btn6val + 1) % 8 ) ; ( ~btn6val = (~btn6val + 1) % 13 ) ;
switch(~btn6val, switch(~btn6val,
0, { ~densMode = 0; "DENSITY MODE 0".postln; ~g.do({arg n; n.set(\amp, 1, \dens, 1 )}); }, 0, { ~densMode = 0; "DENSITY MODE 0".postln; },
1, { ~densMode = 1; "DENSITY MODE 1".postln; ~g.do({arg n; n.set(\amp, 0.9, \dens, 4 )}); }, 1, { ~densMode = 1; "DENSITY MODE 1".postln; },
2, { ~densMode = 2; "DENSITY MODE 2".postln; ~g.do({arg n; n.set(\amp, 0.5, \dens, 8 )}); }, 2, { ~densMode = 2; "DENSITY MODE 2".postln; },
3, { ~densMode = 3; "DENSITY MODE 3".postln; ~g.do({arg n; n.set(\amp, 0.8, \dens, 16 )}); }, 3, { ~densMode = 3; "DENSITY MODE 3".postln; },
4, { ~densMode = 4; "DENSITY MODE 4".postln; ~g.do({arg n; n.set(\amp, 0.8, \dens, 32 )}); }, 4, { ~densMode = 4; "DENSITY MODE 4".postln; },
5, { ~densMode = 5; "DENSITY MODE 5".postln; ~g.do({arg n; n.set(\amp, 0.9, \dens, 64 )}); }, 5, { ~densMode = 5; "DENSITY MODE 5".postln; },
6, { ~densMode = 6; "DENSITY MODE 6".postln; ~g.do({arg n; n.set(\amp, 0.75, \dens, 128 )}); }, 6, { ~densMode = 6; "DENSITY MODE 6".postln; },
7, { ~densMode = 7; "DENSITY MODE 7".postln; ~g.do({arg n; n.set(\amp, 0.5, \dens, 256 )}); }, 7, { ~densMode = 7; "DENSITY MODE 7".postln; },
8, { ~densMode = 8; "DENSITY MODE 8".postln; },
9, { ~densMode = 9; "DENSITY MODE 9".postln; },
10, { ~densMode = 10; "DENSITY MODE 10".postln; },
11, { ~densMode = 11; "DENSITY MODE 11".postln; },
12, { ~densMode = 12; "DENSITY MODE 12".postln; },
) )
}); });
@ -811,7 +823,7 @@ OSCFunc.trace(false); // Turn posting off
switch(~btn10val, switch(~btn10val,
0, { ~gtrIn.set(\instrAmp, 0 ); "DRY SIGNAL OFF".postln; }, 0, { ~gtrIn.set(\instrAmp, 0 ); "DRY SIGNAL OFF".postln; },
1, { ~instrPanMode=0; "DRY FRONT {STERE0}".postln; }, 1, { ~instrPanMode=0; ~gtrIn.set(\instrAmp, 1 ); "DRY FRONT {STERE0}".postln; },
2, { ~instrPanMode=1; "DRY BACK {STERE0}".postln; }, 2, { ~instrPanMode=1; "DRY BACK {STERE0}".postln; },
3, { ~instrPanMode=2; "DRY RaND {STEREO}".postln; }, 3, { ~instrPanMode=2; "DRY RaND {STEREO}".postln; },
4, { ~instrPanMode=3; "L/R PAN {STEREO}".postln; }, 4, { ~instrPanMode=3; "L/R PAN {STEREO}".postln; },
@ -833,14 +845,14 @@ OSCFunc.trace(false); // Turn posting off
{ {
( ~btn12val = (~btn12val + 1) % 8 ) ; ( ~btn12val = (~btn12val + 1) % 8 ) ;
switch(~btn12val, switch(~btn12val,
0, { ~positionMode = 0; "~positionMode 0 ".postln; }, 0, { ~posMode = 0; "~posMode 0 ".postln; },
1, { ~positionMode = 1; "~positionMode 1 ".postln; }, 1, { ~posMode = 1; "~posMode 1 ".postln; },
2, { ~positionMode = 2; "~positionMode 2".postln; }, 2, { ~posMode = 2; "~posMode 2".postln; },
3, { ~positionMode = 3; "~positionMode 3".postln; }, 3, { ~posMode = 3; "~posMode 3".postln; },
4, { ~positionMode = 5; "~positionMode 4".postln; }, 4, { ~posMode = 5; "~posMode 4".postln; },
5, { ~positionMode = 6; "~positionMode 5".postln; }, 5, { ~posMode = 6; "~posMode 5".postln; },
6, { ~positionMode = 7; "~positionMode 6 ".postln; }, 6, { ~posMode = 7; "~posMode 6 ".postln; },
7, { ~positionMode = 8; "~positionMode 7 ".postln; }, 7, { ~posMode = 8; "~posMode 7 ".postln; },
) )
}); });
@ -914,27 +926,18 @@ r.set(\overdub, 0.9); // overdub mode 0 - 0.99 - MAPPED TO SWITCH 4
~g.set(\gate, 0); ~g.set(\gate, 0);
~g.do({arg n; n.set(\gate, 1 )}); ~g.do({arg n; n.set(\gate, 1 )});
~g.do({arg n; n.set(\rate, 1 )}); ~g.do({arg n; n.set(\rate, 2 )});
\amp, n.linlin(0,4, -3,-20).dbamp, \amp, n.linlin(0,4, -3,-20).dbamp,
~g.do({arg n; n.set(\amp, 1, \rateRand, 1000 )}); ~g.do({arg n; n.set(\amp, 1, \rateRand, 1000 )});
~g.do({arg n; n.set(\amp, 1, \rateRand, 1 )}); ~g.do({arg n; n.set(\amp, 1, \rateRand, 1 )});
~g.do({arg n; n.set(\amp, 0, \dens, 1 )});
~g.do({arg n; n.set(\amp, 0, \dens, 128 )});
~g.do({arg n; n.set(\rateRand, 0)}); ~g.do({arg n; n.set(\rateRand, 0)});
~g.do({arg n; n.set(\panRand, 1)}); ~g.do({arg n; n.set(\panRand, 1)});
~g.do({arg n; n.set(\sync, 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(\rel, 1 )}); ~g.do({arg n; n.set(\rel, 1 )});
~g.do({arg n; n.set(\dens, exprand(1,80) )}); ~g.do({arg n; n.set(\dens, exprand(1,80) )});
~g.do({arg n; n.set(\dens,1)}); ~g.do({arg n; n.set(\dens,1)});
@ -944,67 +947,29 @@ r.set(\overdub, 0.9); // overdub mode 0 - 0.99 - MAPPED TO SWITCH 4
\ptrSampleDelay, n.linlin(0,4, 20000, s.sampleRate*2), \ptrSampleDelay, n.linlin(0,4, 20000, s.sampleRate*2),
~g.do({arg n; n.set(\ptrSampleDelay, s.sampleRate * 1) }); ~g.do({arg n; n.set(\ptrSampleDelay, s.sampleRate * 1) });
~g.do({arg n; n.set(\ptrRandSamples, 200000 )}); ~g.do({arg n; n.set(\ptrRandSamples, 20000 )});
~g.do({arg n; n.set(\minPtrDelay, 100000 )}); ~g.do({arg n; n.set(\minPtrDelay, 2000000 )});
~g.do({arg n; n.set([\baseDur, 0.013])}); ~g.do({arg n; n.set([\baseDur, 10])});
~g.do({arg n; n.set([\durRand, 10.2])}); ~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, \durRand, 6, \dens, 1, \rate, 1, \rateRand, 1.1, \sync, 1, \ptrRandSamples, 200000, ])});
~g.do({arg n; n.set([\baseDur, 0.08, \durRand, 1])}); ~g.do({arg n; n.set(\baseDur, 0.008, \durRand, 10.1)});
~g.do({arg n; n.set([\baseDur, 1.08, \durRand, 3, \sync, 0, \dens, 25 ])}); ~g.do({arg n; n.set([\baseDur, 1.08, \durRand, 3, \sync, 0, \dens, 25 ])});
~rec.set(\overdubLevel, 0.1); ~rec.set(\overdubLevel, 0.1);
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
thisProcess.platform.recordingsDir;// find where the recordings are written to thisProcess.platform.recordingsDir;// find where the recordings are written to
s.record(numChannels:4); // record s.record(numChannels:4); // record
/////////////////////
~g1.set(\pitchmodeindex, 1); // pitchmode
~g1.set(\gdurmodeindex, 1); // grain duration mode
~g1.set(\imp,2); // grain impulse rate
~g1.set(\impulsemodeindex, 1); // 0 1 2 imp, dust, sensor
~g1.set(\positionmodeindex, 1); // playhead FIXED.RND.SENSOR 0 1 2
~g1.set(\gpanmodeindex, 1); // pan mode
~g1.set(\amp, 0); // amplitude
~ringMod.set(\modulator, 0); // 0 to disable
~channelmode = 1;
//~ringMod.set(\in, 0);
//~gtrIn.set(\out, 0);
~gtrIn.set(\out, ~ringModBus);
//~gtrIn.set(\out, ~reverbBus);
//~gtrIn.set(\out, [~reverbBus, ~ringModBus]);
~ringMod.set(\modulator, 177, \mulrate, 0.1);
~ringMod.set(\modulator, 0, \mulrate, 0);
~ringMod.set(\mulrate, 0);
~gtrIn.set(\instrAmp, 1);
// fix doneaction
~g1.set(\gate, 1); // granulator on
~g1.set(\gate, 0); // granulator off
~g1.set(\amp, 1); // granulator off
a = Scale.major;
/////////////////////////////////////////////////
// -----------------------------------------------
~btn4val = 2;
~gdurMode = 4;
// list all open ports
// -----------------------------------------------
// CODE DUMP ZONE /////////////////////////////// // CODE DUMP ZONE ///////////////////////////////
// switch to the custom env // switch to the custom env