Compare commits
No commits in common. "58117762a66473a21d7278853413669219e9f3d4" and "3ddc8cff47a82bf262ffc82a6c8db5005903e8cc" have entirely different histories.
58117762a6
...
3ddc8cff47
29
control.scd
29
control.scd
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
//input mixing, effects and lfos
|
//input mixing, effects and lfos
|
||||||
|
|
||||||
~inputb = Bus.audio(s, 1); // bypassing this one for now
|
~inputb = Bus.audio(s, 1);
|
||||||
~infxb = Bus.audio(s, 1);
|
~infxb = Bus.audio(s, 1);
|
||||||
|
|
||||||
~inmixer = SynthDef(
|
~inmixer = SynthDef(
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
arg in1 = 2, in2 = 3, out = 4;
|
arg in1 = 2, in2 = 3, out = 4;
|
||||||
Out.ar(out, In.ar(in1) + In.ar(in2));
|
Out.ar(out, In.ar(in1) + In.ar(in2));
|
||||||
}
|
}
|
||||||
).play(s, [\in1, ~usbinput1, \in2, ~usbinput2, \out, ~infxb]);
|
).play(s, [\in1, ~usbinput1, \in2, ~usbinput2, \out, ~inputb]);
|
||||||
|
|
||||||
|
|
||||||
// LFO buses and synths
|
// LFO buses and synths
|
||||||
|
@ -27,6 +27,31 @@
|
||||||
|
|
||||||
"LFOs running".postln;
|
"LFOs running".postln;
|
||||||
|
|
||||||
|
// filter is now before grains
|
||||||
|
|
||||||
|
~filtermodb = Bus.control(s, 1);
|
||||||
|
|
||||||
|
~filtermod = SynthDef(
|
||||||
|
\filtermod, {
|
||||||
|
arg out, a = 1.0, b = 0.0, c = 0.0;
|
||||||
|
var siga, sigb, sigc;
|
||||||
|
siga = In.kr(~lfoab) * a;
|
||||||
|
sigb = In.kr(~lfobb) * b;
|
||||||
|
sigc = In.kr(~lfocb) * c;
|
||||||
|
Out.kr(out, Wrap.kr(siga + sigb + sigc, -1, 1));
|
||||||
|
}
|
||||||
|
).play(s, [\out, ~filtermodb, \a, 1, \b, 0, \c, 0 ]);
|
||||||
|
|
||||||
|
|
||||||
|
~filter = SynthDef(
|
||||||
|
\filter, {
|
||||||
|
arg in, out, mod, freq=10000, res=0.3, amp=1.0;
|
||||||
|
var filt, lfo;
|
||||||
|
lfo = LinExp.kr(In.kr(mod, 1), -1, 1, freq * 0.5, freq * 2);
|
||||||
|
filt = RLPF.ar(In.ar(in, 2) * amp, lfo, res);
|
||||||
|
Out.ar(out, filt);
|
||||||
|
}
|
||||||
|
).play(s, [ \in, ~inputb, \out, ~infxb, \mod, ~filtermodb, \amp, 0.5], \addToTail);
|
||||||
|
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
32
effects.scd
32
effects.scd
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
|
|
||||||
~outfxb = Bus.audio(s, 2);
|
~outfxb = Bus.audio(s, 2);
|
||||||
~filterb = Bus.audio(s, 2);
|
|
||||||
~delayb = Bus.audio(s, 2);
|
~delayb = Bus.audio(s, 2);
|
||||||
~reverbb = Bus.audio(s, 2);
|
~reverbb = Bus.audio(s, 2);
|
||||||
|
|
||||||
|
@ -21,34 +20,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// filter is after grains again
|
|
||||||
|
|
||||||
~filtermodb = Bus.control(s, 1);
|
|
||||||
|
|
||||||
~filtermod = SynthDef(
|
|
||||||
\filtermod, {
|
|
||||||
arg out, a = 1.0, b = 0.0, c = 0.0;
|
|
||||||
var siga, sigb, sigc;
|
|
||||||
siga = In.kr(~lfoab) * a;
|
|
||||||
sigb = In.kr(~lfobb) * b;
|
|
||||||
sigc = In.kr(~lfocb) * c;
|
|
||||||
Out.kr(out, Wrap.kr(siga + sigb + sigc, -1, 1));
|
|
||||||
}
|
|
||||||
).play(s, [\out, ~filtermodb, \a, 1, \b, 0, \c, 0 ]);
|
|
||||||
|
|
||||||
|
|
||||||
~filter = SynthDef(
|
|
||||||
\filter, {
|
|
||||||
arg in, out, mod, freq=10000, res=0.3, amp=1.0;
|
|
||||||
var filt, lfo;
|
|
||||||
lfo = LinExp.kr(In.kr(mod, 1), -1, 1, freq * 0.5, freq * 2);
|
|
||||||
filt = RLPF.ar(In.ar(in, 2) * amp, lfo, res);
|
|
||||||
Out.ar(out, filt);
|
|
||||||
}
|
|
||||||
).play(s, [ \in, ~outfxb, \out, ~filterb, \mod, ~filtermodb, \amp, 0.5], \addToTail);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// delay always passes through 100% of its input + amp % of the delay
|
// delay always passes through 100% of its input + amp % of the delay
|
||||||
|
|
||||||
|
@ -60,8 +31,9 @@
|
||||||
del = CombC.ar(sig, maxdelay, delaytime, decaytime, amp);
|
del = CombC.ar(sig, maxdelay, delaytime, decaytime, amp);
|
||||||
Out.ar(out, sig + del);
|
Out.ar(out, sig + del);
|
||||||
}
|
}
|
||||||
).play(s, [ \in, ~filterb, \out, ~delayb ], \addToTail);
|
).play(s, [ \in, ~outfxb, \out, ~delayb ], \addToTail);
|
||||||
|
|
||||||
|
// try taking out the reverb because I think it causes noises
|
||||||
|
|
||||||
~reverb = SynthDef(
|
~reverb = SynthDef(
|
||||||
\reverb, {
|
\reverb, {
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
(0..3).do({ |i|
|
(0..3).do({ |i|
|
||||||
var pb = ~posb[i], rtb = ~rectriggerb[i];
|
var pb = ~posb[i], rtb = ~rectriggerb[i];
|
||||||
~possynths.add(Synth(\pos_saw, [ \out, pb, \speed, 1 / ~buflen ]));
|
~possynths.add(Synth(\pos_saw, [ \out, pb, \speed, 1 / ~buflen ]));
|
||||||
~triggersynths.add(Synth(\trigger, [ \out, rtb, \freq, 1 / ~buflen ]));
|
~triggersynths.add(Synth(\trigger, [ \out, rtb ]));
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO - retrigger the buffer records when changing the length etc
|
// TODO - retrigger the buffer records when changing the length etc
|
||||||
|
@ -65,4 +65,3 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -40,20 +40,20 @@ OSCdef.freeAll;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ~setspeed = { | track, v |
|
~setspeed = { | track, v |
|
||||||
// var speed, qv = if(~speedquant > 0, { ~quantspeed.value(v) }, { v });
|
var speed, qv = if(~speedquant > 0, { ~quantspeed.value(v) }, { v });
|
||||||
// speed = qv / ~buflen;
|
speed = qv / ~buflen;
|
||||||
// if(~speedlock > 0, {
|
if(~speedlock > 0, {
|
||||||
// (0..3).do({|n|
|
(0..3).do({|n|
|
||||||
// ~possynths[n].set(\speed, speed);
|
~possynths[n].set(\speed, speed);
|
||||||
// if( n != track, {
|
if( n != track, {
|
||||||
// var url = ("/grains/speed" ++ n).asSymbol;
|
var url = ("/grains/speed" ++ n).asSymbol;
|
||||||
// ~to.s_(url, v);
|
~to.s_(url, v);
|
||||||
// });
|
});
|
||||||
// });
|
});
|
||||||
// },
|
},
|
||||||
// { ~possynths[track].set(\speed, speed) });
|
{ ~possynths[track].set(\speed, speed) });
|
||||||
// };
|
};
|
||||||
|
|
||||||
// setrecord: toggles record on (1) or off (0) for a track, and also sets the
|
// setrecord: toggles record on (1) or off (0) for a track, and also sets the
|
||||||
// track's input mix to 0 so that it doesn't start fadeing out. If the track
|
// track's input mix to 0 so that it doesn't start fadeing out. If the track
|
||||||
|
@ -85,15 +85,15 @@ OSCdef.freeAll;
|
||||||
~to.slider('/grains/buflen', ~buflen, TouchOSCScale(0.1, 10.0), {});
|
~to.slider('/grains/buflen', ~buflen, TouchOSCScale(0.1, 10.0), {});
|
||||||
|
|
||||||
|
|
||||||
// ~to.button('/grains/mode0', 0, { |v| ~granulators[0].mode_(v); ~setmode.value(0, v) });
|
~to.button('/grains/mode0', 0, { |v| ~granulators[0].mode_(v); ~setmode.value(0, v) });
|
||||||
// ~to.button('/grains/mode1', 0, { |v| ~granulators[1].mode_(v); ~setmode.value(1, v) });
|
~to.button('/grains/mode1', 0, { |v| ~granulators[1].mode_(v); ~setmode.value(1, v) });
|
||||||
// ~to.button('/grains/mode2', 0, { |v| ~granulators[2].mode_(v); ~setmode.value(2, v) });
|
~to.button('/grains/mode2', 0, { |v| ~granulators[2].mode_(v); ~setmode.value(2, v) });
|
||||||
// ~to.button('/grains/mode3', 0, { |v| ~granulators[3].mode_(v); ~setmode.value(3, v) });
|
~to.button('/grains/mode3', 0, { |v| ~granulators[3].mode_(v); ~setmode.value(3, v) });
|
||||||
//
|
|
||||||
// ~to.slider('/grains/speed0', 1, TouchOSCScale(0, 2), { |v| ~setspeed.value(0, v) });
|
~to.slider('/grains/speed0', 1, TouchOSCScale(0, 2), { |v| ~setspeed.value(0, v) });
|
||||||
// ~to.slider('/grains/speed1', 1, TouchOSCScale(0, 2), { |v| ~setspeed.value(1, v) });
|
~to.slider('/grains/speed1', 1, TouchOSCScale(0, 2), { |v| ~setspeed.value(1, v) });
|
||||||
// ~to.slider('/grains/speed2', 1, TouchOSCScale(0, 2), { |v| ~setspeed.value(2, v) });
|
~to.slider('/grains/speed2', 1, TouchOSCScale(0, 2), { |v| ~setspeed.value(2, v) });
|
||||||
// ~to.slider('/grains/speed3', 1, TouchOSCScale(0, 2), { |v| ~setspeed.value(3, v) });
|
~to.slider('/grains/speed3', 1, TouchOSCScale(0, 2), { |v| ~setspeed.value(3, v) });
|
||||||
|
|
||||||
|
|
||||||
~to.slider('/grains/passthrough', 0.75, TouchOSCScale(0, 1), { |v| ~grainmixer.set(\passthrough, v) });
|
~to.slider('/grains/passthrough', 0.75, TouchOSCScale(0, 1), { |v| ~grainmixer.set(\passthrough, v) });
|
||||||
|
@ -120,12 +120,12 @@ OSCdef.freeAll;
|
||||||
// Page 2: track
|
// Page 2: track
|
||||||
|
|
||||||
|
|
||||||
~to.xy('/track/triggersize', [ 100, 0.125 ], TouchOSCScale(0, 200), TouchOSCScale(0, 1), { |v|
|
~to.xy('/track/triggersize', [ 100, 0.125 ], TouchOSCScale(0, 400), TouchOSCScale(0, 1.5), { |v|
|
||||||
~granulator.trigger_(v[0]);
|
~granulator.trigger_(v[0]);
|
||||||
~granulator.size_(v[1]);
|
~granulator.size_(v[1]);
|
||||||
});
|
});
|
||||||
|
|
||||||
~to.slider('/track/blur', 0, TouchOSCScale(0, 1.0), { |v| ~granulator.blur_(v) });
|
~to.slider('/track/blur', 0, TouchOSCScale(0, 0.25), { |v| ~granulator.blur_(v) });
|
||||||
|
|
||||||
~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)});
|
||||||
|
|
18
main.scd
18
main.scd
|
@ -15,7 +15,7 @@ Routine.run({
|
||||||
~usbinput1 = 2;
|
~usbinput1 = 2;
|
||||||
~usbinput2 = 3;
|
~usbinput2 = 3;
|
||||||
|
|
||||||
~bpm = 85;
|
~bpm = 55;
|
||||||
~bps = ~bpm / 60;
|
~bps = ~bpm / 60;
|
||||||
~beatsperbar = 4;
|
~beatsperbar = 4;
|
||||||
~buflen = ~beatsperbar / ~bps;
|
~buflen = ~beatsperbar / ~bps;
|
||||||
|
@ -25,6 +25,7 @@ Routine.run({
|
||||||
|
|
||||||
~tc = TempoClock.new(~bps);
|
~tc = TempoClock.new(~bps);
|
||||||
|
|
||||||
|
|
||||||
~touchosc_ip = "192.168.0.209";
|
~touchosc_ip = "192.168.0.209";
|
||||||
|
|
||||||
("./synths.scd").loadRelative;
|
("./synths.scd").loadRelative;
|
||||||
|
@ -32,15 +33,8 @@ Routine.run({
|
||||||
s.sync;
|
s.sync;
|
||||||
("./control.scd").loadRelative;
|
("./control.scd").loadRelative;
|
||||||
s.sync;
|
s.sync;
|
||||||
|
|
||||||
});
|
|
||||||
)
|
|
||||||
|
|
||||||
("./granulator.scd").loadRelative;
|
("./granulator.scd").loadRelative;
|
||||||
|
s.sync;
|
||||||
|
|
||||||
(
|
|
||||||
Routine.run({
|
|
||||||
("./effects.scd").loadRelative;
|
("./effects.scd").loadRelative;
|
||||||
s.sync;
|
s.sync;
|
||||||
("./sequencer.scd").loadRelative;
|
("./sequencer.scd").loadRelative;
|
||||||
|
@ -49,7 +43,5 @@ Routine.run({
|
||||||
});
|
});
|
||||||
)
|
)
|
||||||
|
|
||||||
~posb[0].scope
|
|
||||||
~granulators[0].grainamp_(0);
|
|
||||||
~granulators[0].loopsynth
|
|
||||||
~dumpbuffers.value("looptober23")
|
|
||||||
|
|
49
synths.scd
49
synths.scd
|
@ -1,25 +1,30 @@
|
||||||
(
|
(
|
||||||
|
|
||||||
SynthDef(\pos_saw, {
|
SynthDef(\pos_sine, {
|
||||||
arg out, dur=1;
|
arg out, speed=1;
|
||||||
Out.kr(out, EnvGen.kr(Env([0, 1], dur), doneAction: Done.freeSelf))
|
Out.kr(out, 0.5 + SinOsc.kr(speed * 0.5, -0.5pi, 0.5));
|
||||||
}).add();
|
}).add;
|
||||||
|
|
||||||
SynthDef(\pos_sin, {
|
SynthDef(\pos_saw, {
|
||||||
arg out, dur=1;
|
arg out, speed=1;
|
||||||
Out.kr(out, EnvGen.kr(Env.sine(dur, 1), doneAction: Done.freeSelf))
|
Out.kr(out, 0.5 + LFSaw.kr(speed, 1, 0.5, 0));
|
||||||
}).add();
|
}).add;
|
||||||
|
|
||||||
SynthDef(\pos_reverse, {
|
SynthDef(\pos_reverse, {
|
||||||
arg out, dur=1;
|
arg out, speed=1;
|
||||||
Out.kr(out, EnvGen.kr(Env([1, 0], dur), doneAction: Done.freeSelf))
|
Out.kr(out, 0.5 - LFSaw.kr(speed, 1, 0.5, 0));
|
||||||
}).add();
|
}).add;
|
||||||
|
|
||||||
// SynthDef(\pos_step, {
|
SynthDef(\pos_step, {
|
||||||
// arg out, speed=1, steps=8;
|
arg out, speed=1, steps=8;
|
||||||
// var stepwise = LFSaw.kr(speed, 1, 0.5 * steps, 0.5 * steps).floor;
|
var stepwise = LFSaw.kr(speed, 1, 0.5 * steps, 0.5 * steps).floor;
|
||||||
// Out.kr(out, stepwise / steps);
|
Out.kr(out, stepwise / steps);
|
||||||
// }).add;
|
}).add;
|
||||||
|
|
||||||
|
SynthDef(\pos_random, {
|
||||||
|
arg out=5, speed=1;
|
||||||
|
Out.kr(out, 0.5 + WhiteNoise.kr(0.5));
|
||||||
|
}).add;
|
||||||
|
|
||||||
SynthDef(\lfo, {
|
SynthDef(\lfo, {
|
||||||
arg out, freq=1, amp=0;
|
arg out, freq=1, amp=0;
|
||||||
|
@ -28,17 +33,7 @@ SynthDef(\lfo, {
|
||||||
|
|
||||||
SynthDef(\trigger, {
|
SynthDef(\trigger, {
|
||||||
arg out=1;
|
arg out=1;
|
||||||
Out.kr(out, EnvGen.kr(Env.perc(0.001, 0.2, 2), levelScale:2.0, levelBias:-1,doneAction:Done.freeSelf));
|
Out.kr(out, Impulse.kr(0))
|
||||||
}).add;
|
}).add;
|
||||||
|
|
||||||
|
|
||||||
SynthDef(\metronome, {
|
|
||||||
arg out=0, amp=1, pan=0, filter=1000, atk=0.01, rel=0.1;
|
|
||||||
var sig, env;
|
|
||||||
env = EnvGen.kr(Env.perc(atk, rel, amp), doneAction: Done.freeSelf);
|
|
||||||
sig = HPF.ar(WhiteNoise.ar(), filter);
|
|
||||||
Out.ar(out, Pan2.ar(sig * env, pan));
|
|
||||||
}
|
|
||||||
).add;
|
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue