1
0
Fork 0

240 plucks expanded with variations, now 3 total.

main
Luka Prinčič 2020-11-05 13:49:54 +01:00
parent 61e494238c
commit e184a2f6e1
1 changed files with 89 additions and 17 deletions

View File

@ -1,6 +1,9 @@
// posted this earlier this year at // posted this earlier this year at
// http://sccode.org/1-5cM // http://sccode.org/1-5cM
// and this is now a combination of above and variations at
// http://sccode.org/1-5cR and http://sccode.org/1-5cQ
// SynthDefs, buses, tempoclock:
( (
SynthDef("plucking", {arg out = 0, amp = 0.1, freq = 440, decay = 5, coef = 0.1; SynthDef("plucking", {arg out = 0, amp = 0.1, freq = 440, decay = 5, coef = 0.1;
var env, snd; var env, snd;
@ -16,7 +19,6 @@ SynthDef("plucking", {arg out = 0, amp = 0.1, freq = 440, decay = 5, coef = 0.1;
Out.ar(out, snd * env); Out.ar(out, snd * env);
}).add; }).add;
b = Bus.audio(s,1);
SynthDef("reverbBus", { arg outBus = 0, inBus, wet = 0.5; SynthDef("reverbBus", { arg outBus = 0, inBus, wet = 0.5;
var input, rev; var input, rev;
@ -24,37 +26,107 @@ SynthDef("reverbBus", { arg outBus = 0, inBus, wet = 0.5;
rev = JPverb.ar(input * wet, t60:3); rev = JPverb.ar(input * wet, t60:3);
Out.ar(outBus, input + rev); Out.ar(outBus, input + rev);
}).add; }).add;
// create separate bus for send->reverb
b = Bus.audio(s,1);
// tempoclock.
t = TempoClock.default;
) )
( // start reverb at the end of the group
/////////////////////////////////////////////////////////////////////////////////////
// variation 2
(
r = Synth("reverbBus", [\inBus, b, \wet, 0.5]);
t.tempo_(80/60); // beats per minute
Pbind(
\instrument, "plucking",
\scale, Scale.major.tuning_(\just),
\octave, 4,
\degree, Pseq([1,3,7,8], inf), // four main notes
\mtranspose, Pseq([Pseq([0],3),Pseq([-5],3)],inf), // switched mode every 3 notes (*2)
\gtranspose, Pseq([Pseq([0],36),Pseq([4],36),Pseq([[-3]],36),Pseq([2],36)],inf),
\ctranspose, Pser([Pseries(-4,1,6) +.x Pseq([0], 144)],1),
\coef, Pser([Prand([0.2,0.3,0.4,0.5],1), Prand([0.8,0.7,0.6,0.5],11)], inf),
\dur, Prand([0.25,0.26,0.24,0.255,0.255,0.25], 240),
\decay, Prand([1,2,3,4,5], inf),
\out, b, \amp, 0.4,
).play;
)
/////////////////////////////////////////////////////////////////////////////////////
// variation 1
(
~reverb = Synth("reverbBus", [\inBus, b, \wet, 0.6]); ~reverb = Synth("reverbBus", [\inBus, b, \wet, 0.6]);
t.tempo_(60/60);
Pbind( Pbind(
\instrument, "plucking", \instrument, "plucking",
\out, b, \out, b,
\scale, Scale.major.tuning_(\just), \scale, Scale.major.tuning_(\just),
\octave, 4, \octave, 4,
\degree, Pseq([1,3,7,8,Prand([7,10,11,13,14]),8,7,3], inf), \degree, Pseq([1,3,7,8,Prand([7,10,11,13,14]),8,7,3], inf),
\dur, Pseq([Pwrand([ \dur, Pseq(
Pseq([0.2,0.2]), [
//0.2, Pwrand([
0.4, Pseq([0.2,0.2]),
Pseq([0.1],4), //0.2,
Pseq([0.05],4)], 0.4,
[0.5,0.3,0.1,0.1] // weights Pseq([0.1],4),
)], 240), Pseq([0.05],4)
],
[0.5,0.3,0.1,0.1] // weights
)
],
240),
\coef, Pwrand([0.8, 0.6, 0.4, 0.2], [0.4,0.3,0.2,0.1], inf), \coef, Pwrand([0.8, 0.6, 0.4, 0.2], [0.4,0.3,0.2,0.1], inf),
\amp, 1, \amp, 0.4,
\addAction, 0, // make sure new synths are added to head of group (optional) \addAction, 0, // make sure new synths are added to head of group (optional)
).play; ).play;
) )
// set reverb 'wetness'
~reverb.set(\wet,1);
( // set tempo /////////////////////////////////////////////////////////////////////////////////////
var bpm = 50; // variation 3
t = TempoClock.default; (
t.tempo_(bpm/60) // beats per minute r = Synth("reverbBus", [\inBus, b, \wet, 0.5]);
t.tempo_(1); //
Pbind(
\instrument, "plucking",
\scale, Scale.major.tuning_(\just),
\octave, 4,
\degree, Pseq([1, 3, 7, 3,-4,-2, 7, 8, 1,-2, 2, 3], inf),
\mtranspose, Pseq([Pseq([0],144),Pseq([0],48),Pseq([3],48),Pseq([4],48)], inf),
\gtranspose, Pseq([Pseq([0],36),Pseq([4],36),Pseq([[-3]],36),Pseq([2],36)],inf),
\ctranspose, Pser([Pseries(-4,1,4) +.x Pseq([0], 144)],2),
\coef, Pseq([ Pseq([
Prand([0.2,0.3,0.4,0.5],1),
Prand([0.6,0.5],5),
Prand([0.2,0.3],1),
Prand([0.6,0.5],5)
], 1),
Prand([0.7,0.6],12)
],inf),
\dur, Pseq([Prand([0.25,0.25,0.24,0.245,0.255,0.25], 140),0.26,0.3,0.4,0.7], inf)
* Pseq([Pseq([0.8],110), Pgeom(0.8,1.002,34)],inf),
\decay, Pseq([8, Prand([1,2,3,4], 4),3,2,1], inf),
\out, b, \amp, 0.4,
).play;
) )