Commit ebb04b15 authored by the_emergent's avatar the_emergent
Browse files

added files from 2021-11-18 and 2021-11-25

parent df0e2fcb
......@@ -129,7 +129,7 @@ c.release;
// laid-back drums
// approach: lengthen a measure ever so slightly
// inspired by Jake Lizzio: https://www.youtube.com/watch?v=cTO1KsC4Ono&t=48s
// bass drum instrument
(
SynthDef(\bd, {
......
// Making a gated reverb
(
s.options.memSize_(2.pow(16));
t = TempoClock(66/60).permanent_(true);
~makeev = {
~ev = Dictionary.new;
//~ev.add(\cr1 -> ~crackle = {Crackle.ar(1.99, 0.05)!2}.play;);
//~ev.add(\cr2 -> ~crackle.release);
~ev.add(\bassdrum -> ~drum = Pbind(
\instrument, \bd,
\dur, Pseq([Pn(1, 3), 1.125], inf),
\amp, 1,
);
)
};
/*
~p1 = ~drum.play(t);
~p1.stop;*/
~cleanup = {
"see you!".postln;
Window.closeAll;
s.newBusAllocators;
ServerBoot.removeAll;
ServerTree.removeAll;
ServerQuit.removeAll;
};
//////////// register functions
ServerBoot.add(~makeev);
ServerQuit.add(~cleanup);
s.waitForBoot({
s.plotTree;
s.meter.window.alwaysOnTop_(true);
SynthDef(\bd, {
var sig, env;
env = Env.perc(0.0001, 1.2).kr(2);
sig = AnalogBassDrum.ar(
Impulse.kr(0),
0,
0.7,
50,
0.33,
0.75,
0.4,
0.33
);
sig = Pan2.ar(sig * \amp.kr(0.95) * env, 0);
Out.ar(0, sig);
}).add;
});
)
// first part: figure out
MIDIClient.init;
MIDIIn.connectAll;
MIDIFunc.trace(true);
~ev
// this doesn't quite work
~ev[\bassdrum].play;
~ev[\bassdrum].stop;
~drum.stop;
// make a synthdef
(
SynthDef(\noisySaw, {
arg dry = 1;
var sig, freq, env;
env = Env.perc(\atk.ir(0.12), \rel.ir(4)).kr(2);
freq = \freq.kr(220, 0.5);
sig = VarSaw.ar(
freq,
0,
0.45,
0.2
);
sig = sig + BrownNoise.ar(0.01);
sig = sig.softclip;
sig = HPF.ar(sig, 50);
sig = LPF.ar(sig, 2400);
sig = sig * env * \amp.kr(0.45);
sig = Pan2.ar(sig);
Out.ar(0, sig);
}).add;
)
Synth(\noisySaw);
(
//~more = Dictionary.new;
~more.add(
\p1 -> ~noi = Pbind(
\instrument, \noisySaw,
\scale, Scale.minorPentatonic(\werckmeister),
\octave, Pwrand([3, 4, 5, 6], [1, 4, 3, 2].normalizeSum, inf),
\degree, Pxrand((0..6), inf),
\amp, Pwhite(0.3, 0.5),
\dur, Pwhite(0.66, 2)
).play;
);
~more.add(
\p2 -> ~noi.stop;
);
)
~more.removeAt(\p2);
~more[\p1].play;
~more[\p1].stop;
~more[\p2].value
// kthxbye!
(
s.quit;
)
\ No newline at end of file
// Making a gated reverb
(
s.options.memSize_(2.pow(16));
t = TempoClock(66/60).permanent_(true);
~makeev = {
~more = Dictionary.new;
~more.add(
\p1 -> {~noi = Pbind(
\instrument, \noisySaw,
\scale, Scale.minorPentatonic(\werckmeister),
\octave, Pwrand([3, 4, 5, 6], [1, 4, 3, 2].normalizeSum, inf),
\degree, Pxrand((0..6), inf),
\amp, Pwhite(0.3, 0.5),
\dur, Pwhite(0.66, 2)
).play;
};
);
~more.add(
\p2 -> {~noi.stop};
);
};
/*
~p1 = ~drum.play(t);
~p1.stop;*/
~cleanup = {
"see you!".postln;
Window.closeAll;
s.newBusAllocators;
ServerBoot.removeAll;
ServerTree.removeAll;
ServerQuit.removeAll;
};
//////////// register functions
ServerBoot.add(~makeev);
ServerQuit.add(~cleanup);
s.waitForBoot({
s.plotTree;
s.meter.window.alwaysOnTop_(true);
SynthDef(\bd, {
var sig, env;
env = Env.perc(0.0001, 1.2).kr(2);
sig = AnalogBassDrum.ar(
Impulse.kr(0),
0,
0.7,
50,
0.33,
0.75,
0.4,
0.33
);
sig = Pan2.ar(sig * \amp.kr(0.95) * env, 0);
Out.ar(0, sig);
}).add;
SynthDef(\noisySaw, {
arg dry = 1;
var sig, freq, env;
env = Env.perc(\atk.ir(0.12), \rel.ir(4)).kr(2);
freq = \freq.kr(220, 0.5);
sig = VarSaw.ar(
freq,
0,
0.45,
0.2
);
sig = sig + BrownNoise.ar(0.01);
sig = sig.softclip;
sig = HPF.ar(sig, 50);
sig = LPF.ar(sig, 2400);
sig = sig * env * \amp.kr(0.45);
sig = Pan2.ar(sig);
Out.ar(0, sig);
}).add;
});
)
// first part: figure out
MIDIClient.init;
MIDIIn.connectAll;
MIDIFunc.trace(true);
Synth(\noisySaw);
~more[\p1].value;
~more[\p2].value
// kthxbye!
s.quit;
// adventures in tunings
(
s.options.memSize_(2.pow(16));
~out = 0;
t = TempoClock(66/60).permanent_(true);
~makeBuses = {
~bus = Dictionary.new;
~bus.add(\reverb -> Bus.audio(s, 2));
};
~makeNodes = {
~src = Group.new;
~efx = Group.after(~src);
~revSynth = Synth(\schroe, [
\in, ~bus[\reverb],
\out, ~out
], ~efx);
};
~cleanup = {
"see you!".postln;
Window.closeAll;
s.newBusAllocators;
ServerBoot.removeAll;
ServerTree.removeAll;
ServerQuit.removeAll;
};
//////////// register functions
ServerBoot.add(~makeBuses);
ServerBoot.add(~makeNodes);
ServerQuit.add(~cleanup);
s.waitForBoot({
s.plotTree;
s.meter.window.alwaysOnTop_(true);
s.sync;
SynthDef(\bling, {
arg dry = 1;
var sig, env, at, crv, freq, amp;
freq = \freq.kr(220);
amp = \amp.kr(-6.dbamp);
at = \atk.kr(0.1) * freq.lincurve(30, 8000, 2, 0.25, -4);
crv = \curve.kr(-2) * freq.linlin(30, 8000, 0.25, 2);
env = Env.perc(at, \rel.ir(1.8), crv).kr(2);
sig = SinOsc.ar(freq, mul: 0.5) + LFPulse.ar(freq * 0.999, 0, 0.4, 0.15);
sig = sig * env * amp;
sig = LPF.ar(sig, freq * 10);
sig = Pan2.ar(sig, 0);
Out.ar(\out.ir(~out), sig * dry);
Out.ar(\fx.ir(0), sig * (1-dry));
}).add;
SynthDef(\schroe, {
var sig;
sig = In.ar(\in.ir(0), 2);
8.do({
sig = AllpassC.ar(sig, 0.01, Rand(0.001, 0.01)!2, \decay1.kr(1), \earlylev.kr(1))
});
8.collect({
sig = AllpassC.ar(sig, 0.04, Rand(0.01, 0.04)!2, \decay2.kr(2), \tail.kr(1))
});
sig = LPF.ar(sig, \lp.kr(6000));
sig = LeakDC.ar(sig * \amp.kr(0.8));
Out.ar(\out.ir(~out), sig);
}).add;
ServerTree.add(~makeNodes);
s.sync;
s.freeAll;
s.sync;
"do eet".postln;
});
)
Synth(\bling, [\freq, (Scale.minorPentatonic.degrees.choose + 51).midicps, \rel, 0.5, \dry, 0.25, \fx, ~bus[\reverb]], ~src);
(
~b1 = Pbind(
\instrument, \bling,
\scale, Scale.major(\et12), // fool around with tunings here!
\octave, 5,
\degree, Pseq((0..8)),
\amp, Pseries(0.5, -0.05, 8),
\dur, 1,
\dry, 0.7,
\fx, ~bus[\reverb],
\group, ~src
);
)
a = ~b1.play;
Tuning.directory
~sr=Tuning.sruti; // picking a tuning from the tuning library
~sr.semitones; // appears to be the steps in midi notes
~sr.semitones.size; // how many steps does this tuning have?
~sr.ratios // ratios of the degrees
~steps = Place([(0..7), (4..11)], 8).asStream; // fifths
//~steps = Place([(0..7), (2..9)], 8).asStream; // major thirds
~steps.all;
~steps.reset;
// recap from some weeks ago: defining a new scale
~scale = Scale.new([0, 3, 5, 6, 7, 10], 12, \pythagorean, "blues");
(
~b2 = Pbind(
\instrument, \bling,
\scale, Scale.major(\mean4), // fool around with tunings here!
\octave, 5,
\degree, ~steps,
\amp, Pseries(0.5, -0.01, 16),
\rel, 0.6,
\curve, -6,
\dur, Pseq([0.125, 0.75], inf),
\dry, 0.7,
\fx, ~bus[\reverb],
\group, ~src
);
~steps.reset;
a = ~b2.play;
)
// attempting fifths/thirds in ET24
//~steps2 = Place([(0..24), (8..32)], 24).asStream; // major thirds
~steps2 = Place([(0..24), (14..38)], 24).asStream; // fifths
(
~b3 = Pbind(
\instrument, \bling,
\scale, Scale.chromatic24,
\octave, 5,
\degree, ~steps2,
\amp, Pseries(0.5, -0.01, 16),
\rel, 0.6,
\curve, -6,
\dur, Pseq([0.125, 0.75], inf),
\dry, 0.7,
\fx, ~bus[\reverb],
\group, ~src
);
~steps2.reset;
a = ~b3.play;
)
// farewell music
(
~bye = Pbind(
\instrument, \bling,
\scale, Scale.minorPentatonic(\werckmeister),
\octave, Pwrand([3, 4, 5, 6], [1, 4, 3, 2].normalizeSum, inf),
\degree, Pxrand((0..6), inf),
\amp, Pwhite(0.3, 0.5),
\dur, Pwhite(0.66, 2),
\dry, Pwhite(0.5, 0.75),
\fx, ~bus[\reverb],
\group, ~src
).play;
)
~bye.stop;
// bye!
s.quit;
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment