330 lines
11 KiB
Markdown
330 lines
11 KiB
Markdown
//// MINIMAL BAROQUE GROOVE
|
|
(
|
|
TempoClock.default.tempo = 60/60;
|
|
//TempoClock.default.tempo = 30/60;
|
|
|
|
// scales / pitch structure ////////
|
|
|
|
~s0 = Scale.harmonicMinor;
|
|
~s1 = Scale.melodicMinor;
|
|
~s2 = Scale.gong;
|
|
~s3 = Scale.whole;
|
|
~s4 = Scale.chromatic;
|
|
|
|
// rhythmic patterns /////////////
|
|
|
|
~r0 = Pn(1/8, 16);
|
|
~rx0 = Pwrand([1/8, 1/4, 1/2, 4],[80,50,20,20].normalizeSum, 1);
|
|
~rx1 = Pwrand([1/8, 1/4, 1/2, 1],[80,50,20,20].normalizeSum, 1);
|
|
~rx2 = Pwrand([1/8, 1/4, 1/2],[80,50,20].normalizeSum, 1);
|
|
~rx3 = Pwrand([1/8, 1/4],[90,30].normalizeSum, 1);
|
|
|
|
|
|
// shuffled durs
|
|
(
|
|
~r0s = Pshuf([
|
|
1/8,
|
|
1/8,
|
|
1/8,
|
|
1/8,
|
|
Rest(1/8),
|
|
1/8,
|
|
1/8,
|
|
1/8,
|
|
],1);
|
|
|
|
~r1s = Pshuf([
|
|
1/8,
|
|
1/8,
|
|
1/8,
|
|
1/8,
|
|
Rest(1/8),
|
|
Rest(1/8),
|
|
1/8,
|
|
1/8,
|
|
],1);
|
|
|
|
//Place
|
|
|
|
~r2s = Pshuf([
|
|
1/8,
|
|
1/8,
|
|
1/8,
|
|
1/8,
|
|
Rest(1/8),
|
|
Rest(1/8),
|
|
Rest(1/8),
|
|
1/8,
|
|
],1);
|
|
|
|
~r3s = Pshuf([
|
|
1/8,
|
|
1/8,
|
|
1/8,
|
|
1/8,
|
|
Rest(1/8),
|
|
Rest(1/8),
|
|
Rest(1/8),
|
|
Rest(1/8),
|
|
],1);
|
|
|
|
|
|
~unfolding = Pseq([~r0s, ~r1s, ~r2s, ~r3s, ~r4s, ~r5s, ~r6s, ~r7s], 1);
|
|
|
|
);
|
|
|
|
// patterns
|
|
~rs = Pseq([
|
|
Pconst(64, Pseq([~r0],inf)),
|
|
],inf);
|
|
|
|
~rb = Pseq([
|
|
Pconst(64, Pseq([~r0],inf)),
|
|
],inf);
|
|
|
|
// harmonic structure and bassline
|
|
|
|
// arpeggios + patterns
|
|
|
|
~d0 = Pxrand([0,2,4,6], 32);
|
|
~d1 = Pxrand([1,3,5,7], 32); // 1 bar
|
|
~d2 = Pseq([2,4,6,8], 8);
|
|
~d3 = Pseq([3,5,7,9],8);
|
|
~d4 = Pseq([4,6,8,10],8);
|
|
~d5 = Pxrand([0,2,4,6,8,10,12], 32);
|
|
|
|
// bassline
|
|
|
|
~bassroot = Pseq([0,4,2,3,1,4, 0],1);
|
|
~bassroot16 = Pdup(32, Pseq([0,4,2,3,1,4,0],1));
|
|
|
|
// harmonic structure 0,4,2,3,1,4,0
|
|
|
|
~dseq = Pseq([
|
|
Pn( ~d0, 1),
|
|
Pn( ~d4, 1),
|
|
Pn( ~d2, 1),
|
|
Pn( ~d3, 1),
|
|
Pn( ~d1, 1),
|
|
Pn( ~d4, 1),
|
|
Pn( ~d4, 1),
|
|
Pn( ~d0, 1),
|
|
|
|
], 1);
|
|
|
|
// octavisation patterns
|
|
|
|
~o0 = Prand([5], inf);
|
|
~o1 = Prand([2,3], inf);
|
|
~o2 = Prand([3,4], inf);
|
|
~o3 = Prand([3,4,5], inf);
|
|
~o4 = Prand([5,6,7], inf);
|
|
~o5 = Pwrand([4,5,6,7],[20,3,4,5].normalizeSum, inf);
|
|
|
|
/////////////////////////////////////////////////
|
|
// e harmonic minor (\root 4) ///////////////////
|
|
//var ~t1, ~t2, ~t3, ~t4, b1, b2, b3, b4, a, b, r ,t, q , w;
|
|
|
|
// =========================
|
|
// treble m31
|
|
~t0 = Pbind( \type, \midi, \midicmd, \noteOn, \midiout, ~m32_1,
|
|
\root, 4, \scale,~s2, \degree, ~bassroot16, \octave, ~o5, \dur,~rb
|
|
);
|
|
|
|
~t1 = Pbind( \type, \midi, \midicmd, \noteOn, \midiout, ~m32_1,
|
|
\root, 4, \scale,~s2, \degree, ~bassroot16, \octave, ~o4, \dur,~rb,
|
|
\p5, Pfunc { |e| n.sendMsg("/mother1", (e[\degree]).asFloat ); },
|
|
\rotation, Pfunc { |e| n.sendMsg("/rotation1", (e[\octave]).asFloat );
|
|
postln(e[\degree], e[\octave]);
|
|
},
|
|
);
|
|
|
|
~t2 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~m32_1,
|
|
\root, 4, \scale,~s2, \degree, ~bassroot16, \octave, ~o3, \dur,~rb,
|
|
\p5, Pfunc { |e| n.sendMsg("/mother1", (e[\degree]).asFloat ); },
|
|
\rotation, Pfunc { |e| n.sendMsg("/rotation1", (e[\octave]).asFloat );
|
|
postln(e[\degree], e[\octave]);
|
|
},
|
|
);
|
|
|
|
~t3 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~m32_1,
|
|
\root, 4, \scale,~s2, \degree, ~dseq, \octave, ~o4, \dur,~rb,
|
|
\p5, Pfunc { |e| n.sendMsg("/mother1", (e[\degree]).asFloat ); },
|
|
\rotation, Pfunc { |e| n.sendMsg("/rotation1", (e[\octave]).asFloat );
|
|
postln(e[\degree], e[\octave]);
|
|
},
|
|
);
|
|
|
|
~t4 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~m32_1,
|
|
\root, 4, \scale,~s2, \degree, ~dseq, \octave, ~o4, \dur,~rb,
|
|
\p5, Pfunc { |e| n.sendMsg("/mother1", (e[\degree]).asFloat ); },
|
|
\rotation, Pfunc { |e| n.sendMsg("/rotation1", (e[\octave]).asFloat );
|
|
postln(e[\degree], e[\octave]);
|
|
},
|
|
);
|
|
|
|
~t5 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~m32_1,
|
|
\root, 4, \scale,~s2, \degree, ~bassroot16, \octave, ~o4, \dur,~rb,
|
|
\p5, Pfunc { |e| n.sendMsg("/mother1", (e[\degree]).asFloat ); },
|
|
\rotation, Pfunc { |e| n.sendMsg("/rotation1", (e[\octave]).asFloat );
|
|
postln(e[\degree], e[\octave]);
|
|
},
|
|
);
|
|
|
|
~t6 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~m32_1,
|
|
\root, 4, \scale,~s2, \degree, ~dseq, \octave, ~o3, \dur,~rb,
|
|
\p5, Pfunc { |e| n.sendMsg("/mother1", (e[\degree]).asFloat ); },
|
|
\rotation, Pfunc { |e| n.sendMsg("/rotation1", (e[\octave]).asFloat );
|
|
postln(e[\degree], e[\octave]);
|
|
},
|
|
);
|
|
|
|
|
|
|
|
|
|
// =========================
|
|
// bass m32
|
|
|
|
~b1 = Pbind( \type, \midi, \midicmd, \noteOn, \midiout, ~m32_2,
|
|
\root, 4, \scale,~s2, \degree, ~bassroot16, \octave, 3, \dur,~rb,
|
|
\p5, Pfunc { |e| n.sendMsg("/mother1", (e[\degree]).asFloat ); },
|
|
\rotation, Pfunc { |e| n.sendMsg("/rotation1", (e[\octave]).asFloat );
|
|
postln(e[\degree], e[\octave]);
|
|
},
|
|
);
|
|
|
|
~b2 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~m32_2,
|
|
\root, 4, \scale,~s2, \degree, ~bassroot16, \octave, ~o1, \dur,~rb,
|
|
\p5, Pfunc { |e| n.sendMsg("/mother2", (e[\degree]).asFloat ); },
|
|
\rotation, Pfunc { |e| n.sendMsg("/rotation2", (e[\octave]).asFloat );
|
|
postln(e[\degree], e[\octave]);
|
|
},
|
|
);
|
|
|
|
~b3 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~m32_2,
|
|
\root, 4, \scale,~s2, \degree, ~bassroot16, \octave, ~o2, \dur,~rb,
|
|
\p5, Pfunc { |e| n.sendMsg("/mother2", (e[\degree]).asFloat ); },
|
|
\rotation, Pfunc { |e| n.sendMsg("/rotation2", (e[\octave]).asFloat );
|
|
postln(e[\degree], e[\octave]);
|
|
},
|
|
);
|
|
|
|
~b4 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~m32_2,
|
|
\root, 4, \scale,~s2, \degree, ~dseq, \octave, 3, \dur,~rb,
|
|
\p5, Pfunc { |e| n.sendMsg("/mother2", (e[\degree]).asFloat ); },
|
|
\rotation, Pfunc { |e| n.sendMsg("/rotation2", (e[\octave]).asFloat );
|
|
postln(e[\degree], e[\octave]);
|
|
},
|
|
);
|
|
|
|
~b5 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~m32_2,
|
|
\root, 4, \scale,~s2, \degree, ~dseq, \octave, ~o2, \dur,~rb,
|
|
\p5, Pfunc { |e| n.sendMsg("/mother2", (e[\degree]).asFloat ); },
|
|
\rotation, Pfunc { |e| n.sendMsg("/rotation2", (e[\octave]).asFloat );
|
|
postln(e[\degree], e[\octave]);
|
|
},
|
|
);
|
|
|
|
~b6 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~m32_2,
|
|
\root, 4, \scale,~s2, \degree, ~bassroot16, \octave, ~o2, \dur,~rb,
|
|
\p5, Pfunc { |e| n.sendMsg("/mother2", (e[\degree]).asFloat ); },
|
|
\rotation, Pfunc { |e| n.sendMsg("/rotation2", (e[\octave]).asFloat );
|
|
postln(e[\degree], e[\octave]);
|
|
},
|
|
);
|
|
|
|
// drum patterns ///////////////////////////////////////////////////////////
|
|
|
|
~teenth = Pseq( [Rest(1/8), Pseq([1/8], 4)], 1 );
|
|
|
|
~d00 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~hydro_0, \chan, 10,
|
|
\midinote, Prand([42, 43], 32), \dur,
|
|
Pseq( [ Prand([1/8, 1/2, Rest(1/4)], 8), Rest(4)], inf),
|
|
\p5, Pfunc { |e| postln(e[\degree], e[\degree]) });
|
|
|
|
~d01 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~hydro_0, \chan, 10,
|
|
\midinote, Prand([42, 43,44], 32), \dur, Pwrand([1/8, 1/4, Rest(2), ~teenth], [5,3,2, 1].normalizeSum, inf), \p5, Pfunc { |e| postln(e[\degree], e[\degree]) });
|
|
|
|
|
|
~d02 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~hydro_0, \chan, 10,
|
|
\midinote, Prand([42, 43, 44, 45], 32), \dur, Pwrand([1/8, 1/4, Rest(1/8), ~teenth], [5,3,2, 1].normalizeSum, inf), \p5, Pfunc { |e| postln(e[\degree], e[\degree]) });
|
|
|
|
~d03 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~hydro_0, \chan, 10,
|
|
\midinote, Prand([41, 42, 43, 44, 45], 32), \dur,Prand([1/8, 1/4], inf), \p5, Pfunc { |e| postln(e[\degree], e[\degree]) });
|
|
|
|
~d04 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~hydro_0, \chan, 10,
|
|
\midinote, Prand([41, 42, 43, 44,45, 82], 32), \dur,Prand([1/8, 1/4], inf), \p5, Pfunc { |e| postln(e[\degree], e[\degree]) });
|
|
|
|
|
|
~d05 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~hydro_0, \chan, 10,
|
|
\midinote, Prand([82, 41, 42, 43, 44,45], 32), \dur,Pwrand([1/8, 1/4, Prand([1/16], 8), Rest(1/8)], [5,3,1].normalizeSum, inf), \p5, Pfunc { |e| postln(e[\degree], e[\degree]) });
|
|
|
|
// -----Prand([1/16], 8)
|
|
|
|
~snare00 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~hydro_0, \chan, 10,
|
|
\midinote, Prand([39,40, 41], 32), \dur, Prand([1/8, 1/4, Rest(1)], inf) , \p5, Pfunc { |e| postln(e[\degree], e[\degree]) });
|
|
|
|
|
|
~snare01 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~hydro_0, \chan, 10,
|
|
\midinote, Prand([39], 32), \dur, Prand([1/8, 1/4, Rest(1/2)], inf) , \p5, Pfunc { |e| postln(e[\degree], e[\degree]) });
|
|
|
|
~snare02 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~hydro_0, \chan, 10,
|
|
\midinote, Prand([39,40], 32), \dur, Prand([1/8, 1/4, Rest(1/4)], inf) , \p5, Pfunc { |e| postln(e[\degree], e[\degree]) });
|
|
|
|
~snare03 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~hydro_0, \chan, 10,
|
|
\midinote, Prand([39,40, 41], 32), \dur, Prand([1/8, 1/4, Rest(1/8)], inf) , \p5, Pfunc { |e| postln(e[\degree], e[\degree]) });
|
|
|
|
~snare04 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~hydro_0, \chan, 10,
|
|
\midinote, Prand([39,40, 41, 49], 32), \dur, Prand([1/8, 1/4, Rest(1/8)], inf) , \p5, Pfunc { |e| postln(e[\degree], e[\degree]) });
|
|
|
|
~snare05 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~hydro_0, \chan, 10,
|
|
\midinote, Prand([39,40, 41, 49, 50], 32), \dur, Prand([1/8, 1/4, Rest(1/2)], inf) , \p5, Pfunc { |e| postln(e[\degree], e[\degree]) });
|
|
|
|
// -----
|
|
|
|
~kick00 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~hydro_0, \chan, 10,
|
|
\midinote, Prand([38], 32), \dur, Prand([1/8, 1/4, Rest(1/2)], inf) , \p5, Pfunc { |e| postln(e[\degree], e[\degree]) });
|
|
|
|
~kick01 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~hydro_0, \chan, 10,
|
|
\midinote, Prand([37, 38,], 32), \dur, Prand([1/8, 1/4, Rest(1/2)], inf) , \p5, Pfunc { |e| postln(e[\degree], e[\degree]) });
|
|
|
|
~kick02 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~hydro_0, \chan, 10,
|
|
\midinote, Prand([36,37,38], 32), \dur, Prand([1/8, 1/4, Rest(1/4)], inf) , \p5, Pfunc { |e| postln(e[\degree], e[\degree]) });
|
|
|
|
~kick03 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~hydro_0, \chan, 10,
|
|
\midinote, Prand([36,37], 32), \dur, Prand([1/8, 1/4, Rest(1/4)], inf) , \p5, Pfunc { |e| postln(e[\degree], e[\degree]) });
|
|
|
|
~kick04 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~hydro_0, \chan, 10,
|
|
\midinote, Prand([36,37,38], 32), \dur, Prand([1/8, 1/4, Rest(1/8)], inf) , \p5, Pfunc { |e| postln(e[\degree], e[\degree]) });
|
|
|
|
~kick05 = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~hydro_0, \chan, 10,
|
|
\midinote, Prand([38, 36,37], 32), \dur, Prand([1/2, 1/4, 1/8], inf) , \p5, Pfunc { |e| postln(e[\degree], e[\degree]) });
|
|
|
|
|
|
|
|
// =========================
|
|
|
|
r = Pseq( [~t0, ~t2, ~t1, ~t3, ~t1, ~t4, ~t4, ~t5, ~t4, ~t6], 1); // top part
|
|
t = Pseq( [~b1, ~b1, ~b2, ~b2, ~b3, ~b4, ~b4, ~b5, ~b5, ~b6 ], 1); // bottom part
|
|
|
|
~kick = Pseq( [Rest(20), ~kick00, ~kick01, ~kick02, ~kick03, ~kick04, ~kick04, ~kick03, ~kick04, ~kick02, ~kick03,~kick04,~kick04, ~kick5, ~kick5, ~kick04,~kick04,~kick05,~kick05,~kick04, ~kick04,~kick04,~kick04,~kick04 ], 1);
|
|
|
|
~snare = Pseq( [Rest(36), ~snare00, ~snare01, ~snare2, ~snare03, ~snare04, ~snare95, ~snare05, ~snare05 ], 1);
|
|
|
|
d = Pseq( [Rest(48), ~d00, ~d01, ~d02, ~d03, ~d04, ~d04, ~d05, ~d04, ~d05, ~d04, ~d05,], 1); // hydrogen part
|
|
|
|
z = Ppar( [r, t, d, ~kick, ~snare], 1 ).play; // in parallel
|
|
|
|
);
|
|
|
|
~b1.play;
|
|
// controls
|
|
|
|
t.pause;
|
|
|
|
z.stop;
|
|
z.start;
|
|
z.pause;
|
|
z.resume;
|
|
|