reinstated step playback
parent
9f7b83a44e
commit
5e0e9df5f4
|
@ -4,7 +4,8 @@
|
||||||
~modes = [
|
~modes = [
|
||||||
[ "saw", \pos_saw ],
|
[ "saw", \pos_saw ],
|
||||||
[ "reverse", \pos_reverse ],
|
[ "reverse", \pos_reverse ],
|
||||||
[ "sine", \pos_sine ]
|
[ "sine", \pos_sine ],
|
||||||
|
[ "step", \pos_step ],
|
||||||
];
|
];
|
||||||
|
|
||||||
~outputDir = Platform.recordingsDir +/+ "GrainBuffers";
|
~outputDir = Platform.recordingsDir +/+ "GrainBuffers";
|
||||||
|
@ -17,9 +18,9 @@
|
||||||
~speeds = [ 1, 1, 1, 1 ]; // hacky speed quantisation
|
~speeds = [ 1, 1, 1, 1 ]; // hacky speed quantisation
|
||||||
~posb = Array.new(4);
|
~posb = Array.new(4);
|
||||||
~rectriggerb = Array.new(4);
|
~rectriggerb = Array.new(4);
|
||||||
~patterns = Array.new(4);
|
~patterns = [ nil, nil, nil, nil ];
|
||||||
~players = Array.new(4);
|
~players = [ nil, nil, nil, nil ];
|
||||||
~loopsynths = Array.new(4);
|
~loopsynths = [ nil, nil, nil, nil ];
|
||||||
|
|
||||||
// create the control busses
|
// create the control busses
|
||||||
|
|
||||||
|
@ -36,28 +37,28 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
// set up the Patterns which drive the position synths
|
// set up the Patterns which drive the position synths
|
||||||
(0..3).do({ |i|
|
|
||||||
~patterns.add(~makePattern.value(i, 0, ~speeds[i]));
|
|
||||||
});
|
|
||||||
|
|
||||||
(0..3).do({|i|
|
// (0..3).do({ |i|
|
||||||
~players.add(~patterns[i].play(~tc, quant: ~beatsperbar))
|
// ~patterns.add(~makePattern.value(i, 0, ~speeds[i]));
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
|
// (0..3).do({|i|
|
||||||
|
// ~players.add(~patterns[i].play(~tc, quant: ~beatsperbar))
|
||||||
|
// });
|
||||||
|
|
||||||
~setmode = {
|
~setmode = {
|
||||||
arg track, mode;
|
arg track, mode;
|
||||||
if( ~grainmodes[track] != mode, {
|
|
||||||
~grainmodes[track] = mode;
|
~grainmodes[track] = mode;
|
||||||
|
if(~players[track].isNil.not,{
|
||||||
~players[track].stop;
|
~players[track].stop;
|
||||||
~patterns[track].free;
|
~patterns[track].free;
|
||||||
|
});
|
||||||
~patterns[track] = ~makePattern.value(track, mode, ~speeds[track]);
|
~patterns[track] = ~makePattern.value(track, mode, ~speeds[track]);
|
||||||
~players[track] = ~patterns[track].play(~tc, quant: ~beatsperbar);
|
~players[track] = ~patterns[track].play(~tc, quant: ~beatsperbar);
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
~setspeed = {
|
~setspeed = {
|
||||||
arg track, speed;
|
arg track, speed;
|
||||||
[ "setspeed", track, speed ].postln;
|
|
||||||
if( ~speeds[track] != speed, {
|
if( ~speeds[track] != speed, {
|
||||||
~speeds[track] = speed;
|
~speeds[track] = speed;
|
||||||
~players[track].stop;
|
~players[track].stop;
|
||||||
|
@ -95,4 +96,3 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,7 @@ OSCdef.freeAll;
|
||||||
|
|
||||||
~to.button('/track/dust', 0, { |v| ~granulator.dust_(v) });
|
~to.button('/track/dust', 0, { |v| ~granulator.dust_(v) });
|
||||||
~to.button('/track/back', 0, { |v| ~granulator.back_(v)});
|
~to.button('/track/back', 0, { |v| ~granulator.back_(v)});
|
||||||
~to.button('/track/slope', 0, { |v| ~granulator.slope_(v) });
|
~to.button('/track/slope', 1, { |v| ~granulator.slope_(v) });
|
||||||
|
|
||||||
~to.button('/track/chorus', 0, { |v| ~granulator.chorus_(v) });
|
~to.button('/track/chorus', 0, { |v| ~granulator.chorus_(v) });
|
||||||
~to.slider('/track/harmonics', 2, TouchOSCScale(0.5, 3), { |v|
|
~to.slider('/track/harmonics', 2, TouchOSCScale(0.5, 3), { |v|
|
||||||
|
|
6
main.scd
6
main.scd
|
@ -15,7 +15,7 @@ Routine.run({
|
||||||
~usbinput1 = 2;
|
~usbinput1 = 2;
|
||||||
~usbinput2 = 3;
|
~usbinput2 = 3;
|
||||||
|
|
||||||
~bpm = 85;
|
~bpm = 90;
|
||||||
~bps = ~bpm / 60;
|
~bps = ~bpm / 60;
|
||||||
~beatsperbar = 4;
|
~beatsperbar = 4;
|
||||||
~buflen = ~beatsperbar / ~bps;
|
~buflen = ~beatsperbar / ~bps;
|
||||||
|
@ -38,9 +38,9 @@ Routine.run({
|
||||||
s.sync;
|
s.sync;
|
||||||
("./sequencer.scd").loadRelative;
|
("./sequencer.scd").loadRelative;
|
||||||
s.sync;
|
s.sync;
|
||||||
|
"please wait for the interface to load...".postln;
|
||||||
~buflen.sleep;
|
~buflen.sleep;
|
||||||
"loading interface".postln;
|
|
||||||
("./interface.scd").loadRelative;
|
("./interface.scd").loadRelative;
|
||||||
|
"ok go!".postln;
|
||||||
});
|
});
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
12
synths.scd
12
synths.scd
|
@ -15,11 +15,12 @@ SynthDef(\pos_reverse, {
|
||||||
Out.kr(out, EnvGen.kr(Env([1, 0], length), doneAction: Done.freeSelf))
|
Out.kr(out, EnvGen.kr(Env([1, 0], length), doneAction: Done.freeSelf))
|
||||||
}).add();
|
}).add();
|
||||||
|
|
||||||
// SynthDef(\pos_step, {
|
SynthDef(\pos_step, {
|
||||||
// arg out, speed=1, steps=8;
|
arg out, length=1;
|
||||||
// var stepwise = LFSaw.kr(speed, 1, 0.5 * steps, 0.5 * steps).floor;
|
var levels = (0..8) / 8, times = (length / 8) ! 7;
|
||||||
// Out.kr(out, stepwise / steps);
|
Out.kr(out, EnvGen.kr(Env(levels: levels, times: times, curve: \hold), doneAction: Done.freeSelf));
|
||||||
// }).add;
|
}).add();
|
||||||
|
|
||||||
|
|
||||||
SynthDef(\lfo, {
|
SynthDef(\lfo, {
|
||||||
arg out, freq=1, amp=0;
|
arg out, freq=1, amp=0;
|
||||||
|
@ -42,4 +43,3 @@ SynthDef(\metronome, {
|
||||||
).add;
|
).add;
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue