Added all the changes made in Looptober 2023 so far

feature-synchronisation
bombinans 2023-10-23 11:52:15 +11:00
parent 3ddc8cff47
commit 5b646677c4
6 changed files with 43 additions and 38 deletions

View File

@ -3,7 +3,7 @@
//input mixing, effects and lfos
~inputb = Bus.audio(s, 1);
~inputb = Bus.audio(s, 1); // bypassing this one for now
~infxb = Bus.audio(s, 1);
~inmixer = SynthDef(
@ -12,7 +12,7 @@
arg in1 = 2, in2 = 3, out = 4;
Out.ar(out, In.ar(in1) + In.ar(in2));
}
).play(s, [\in1, ~usbinput1, \in2, ~usbinput2, \out, ~inputb]);
).play(s, [\in1, ~usbinput1, \in2, ~usbinput2, \out, ~infxb]);
// LFO buses and synths
@ -27,31 +27,6 @@
"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);
)

View File

@ -5,6 +5,7 @@
~outfxb = Bus.audio(s, 2);
~filterb = Bus.audio(s, 2);
~delayb = Bus.audio(s, 2);
~reverbb = Bus.audio(s, 2);
@ -20,6 +21,34 @@
// 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
@ -31,9 +60,8 @@
del = CombC.ar(sig, maxdelay, delaytime, decaytime, amp);
Out.ar(out, sig + del);
}
).play(s, [ \in, ~outfxb, \out, ~delayb ], \addToTail);
).play(s, [ \in, ~filterb, \out, ~delayb ], \addToTail);
// try taking out the reverb because I think it causes noises
~reverb = SynthDef(
\reverb, {

View File

@ -41,7 +41,7 @@
(0..3).do({ |i|
var pb = ~posb[i], rtb = ~rectriggerb[i];
~possynths.add(Synth(\pos_saw, [ \out, pb, \speed, 1 / ~buflen ]));
~triggersynths.add(Synth(\trigger, [ \out, rtb ]));
~triggersynths.add(Synth(\trigger, [ \out, rtb, \freq, 1 / ~buflen ]));
});
// TODO - retrigger the buffer records when changing the length etc
@ -65,3 +65,4 @@
});
}
)

View File

@ -120,12 +120,12 @@ OSCdef.freeAll;
// Page 2: track
~to.xy('/track/triggersize', [ 100, 0.125 ], TouchOSCScale(0, 400), TouchOSCScale(0, 1.5), { |v|
~to.xy('/track/triggersize', [ 100, 0.125 ], TouchOSCScale(0, 200), TouchOSCScale(0, 1), { |v|
~granulator.trigger_(v[0]);
~granulator.size_(v[1]);
});
~to.slider('/track/blur', 0, TouchOSCScale(0, 0.25), { |v| ~granulator.blur_(v) });
~to.slider('/track/blur', 0, TouchOSCScale(0, 1.0), { |v| ~granulator.blur_(v) });
~to.button('/track/dust', 0, { |v| ~granulator.dust_(v) });
~to.button('/track/back', 0, { |v| ~granulator.back_(v)});

View File

@ -15,9 +15,9 @@ Routine.run({
~usbinput1 = 2;
~usbinput2 = 3;
~bpm = 55;
~bpm = 80;
~bps = ~bpm / 60;
~beatsperbar = 4;
~beatsperbar = 8;
~buflen = ~beatsperbar / ~bps;
[ "bpm", ~bpm ].postln;
@ -43,5 +43,6 @@ Routine.run({
});
)
~granulators[0].grainamp_(0.75);
g
~dumpbuffers.value("looptober14")

View File

@ -32,8 +32,8 @@ SynthDef(\lfo, {
}).add;
SynthDef(\trigger, {
arg out=1;
Out.kr(out, Impulse.kr(0))
arg out=1, freq=1;
Out.kr(out, Impulse.kr(freq))
}).add;
)