algomom/sc/midimother.scd

57 lines
1.6 KiB
Plaintext
Raw Normal View History

2023-01-30 18:43:43 +01:00
"/home/rob/algomom/sc/motherMIDISetup.scd".load;
2023-01-26 10:36:56 +01:00
TempoClock.default.tempo = 60/60;
~xx = (
Pdef(\m_1).play(quant: 4); // TOP MOTHER
Pdef(\m_1_CC).play(quant:4); // CC 1
Pdef(\m_2).play(quant: 4); // BTM MOTHER NOTEON
Pdef(\m_2_CC).play(quant:4); // CC 1
)
Pdef(\m_1).stop; // NOTEON
Pdef(\m_1_CC).stop;
Pdef(\m_2).stop; // NOTEON
Pdef(\m_2_CC).stop;
////////////////////////////////////////
Pdef(\m_1).play(quant: 4); // TOP MOTHER
Pdef(\m_1_CC).play(quant:4); // CC 1
Pdef(\m_1).stop; // NOTEON
Pdef(\m_1_CC).stop;
// --------------- /
Pdef(\m_2).play(quant: 4); // BTM MOTHER NOTEON
Pdef(\m_2_CC).play(quant:4); // CC 1
Pdef(\m_2).stop; // NOTEON
Pdef(\m_2_CC).stop;
//////////////////////////////
Pbindef(\m_1,\scale,~s1,\degree,~d4,\dur,~r1,\octave,~o2, \mtranspose,0);
Pbindef(\m_2,\scale,~s1,\degree,~d4,\dur,~r2,\octave,~o2, \mtranspose,0);
// indiviudal controls //////////////
Pbindef(\m_1, \root, 4); Pbindef(\m_2, \root, 4);
Pbindef(\m_1, \mtranspose, 0); Pbindef(\m_2, \mtranspose, 0);
Pbindef(\m_1, \scale, ~s1 ); Pbindef(\m_2, \scale, ~s1);
Pbindef(\m_1, \octave, ~o0); Pbindef(\m_2, \octave, 2);
Pbindef(\m_1, \dur, ~r4); Pbindef(\m_2, \dur, ~r0);
Pbindef(\m_1, \degree, ~ddd); Pbindef(\m_2, \degree, ~ddd);
(
var a;
a = Pfunc({
//exprand(0.1, 0.3) + #[1, 2, 3, 6, 7].choose
~host.sendMsg("/sc3p5", rrand(1,100).asFloat); // send OSC message to P5
}).asStream;
{
a.do { |val|
~host.sendMsg("/sc3p5", rrand(1,100).asFloat); // send OSC message to P5
//Synth(\help_sinegrain, [\freq, val * 100 + 300]);
0.02.wait;
}
}.fork;
)