diff --git a/sc/.gitignore b/.gitignore similarity index 100% rename from sc/.gitignore rename to .gitignore diff --git a/sc/midimother.scd b/sc/midimother.scd index 7fb02ef..1a909d6 100644 --- a/sc/midimother.scd +++ b/sc/midimother.scd @@ -1,12 +1,7 @@ -"/home/rob/gtr/motherMIDISetup.scd".load; +"/home/rob/algomom/sc/motherMIDISetup.scd".load; TempoClock.default.tempo = 60/60; -~host = NetAddr("localhost", 4859); // address de PROCESSING - -Pfunc - - ~xx = ( Pdef(\m_1).play(quant: 4); // TOP MOTHER diff --git a/sc/motherMIDISetup.scd b/sc/motherMIDISetup.scd index df02c8a..b806dd8 100644 --- a/sc/motherMIDISetup.scd +++ b/sc/motherMIDISetup.scd @@ -1,77 +1,61 @@ -/*RUN*/ +// /*RUN*/ + +s.boot; + +//"/home/rob/algomom/sc/motherPatterns.scd".load; -"/home/rob/gtr/motherPatterns.scd".load; MIDIClient.init; +MIDIClient.list; +MIDIClient.destinations; -~m32_1 = MIDIOut.newByName("MidiSport 4x4", "MidiSport 4x4 MIDI 1").latency_(Server.default.latency); +// connect for korg in +MIDIIn.connectAll -~m32_2 = MIDIOut.newByName("MidiSport 4x4", "MidiSport 4x4 MIDI 2").latency_(Server.default.latency); +//n = NetAddr("192.168.178.166", 47120); +n = NetAddr("localhost", 47120); -// setup of mother 32 noteon events +/*~m32_1 = MIDIOut.newByName("MidiSport 4x4", "MidiSport 4x4 MIDI 1").latency_(Server.default.latency); +~m32_2 = MIDIOut.newByName("MidiSport 4x4", "MidiSport 4x4 MIDI 2").latency_(Server.default.latency);*/ -Pdef(\m_1, Pbind( \type, \midi, \midicmd, \noteOn, \midiout, ~m32_1)).play(quant: 4); +~m32_1 = MIDIOut.newByName("SuperCollider", "in0").latency_(Server.default.latency); +~m32_2 = MIDIOut.newByName("SuperCollider", "in1").latency_(Server.default.latency); -Pdef(\m_2, Pbind( \type, \midi, \midicmd, \noteOn, \midiout, ~m32_2)).play(quant: 4); -// CC Control Message 1 ---> TOP Mother32 ASSIGN OUT -( Pdef(\m_1_CC, Pbind( \type, \midi, \midicmd, \control, \midiout, ~m32_1, - \ctlNum, 1, \control, Pexprand(72,127, inf), \dur, ~r1)).play(quant:4)); +// ////////////////////////////////////////////////////////////////// +// +// // setup of mother 32 noteon events +// +// Pdef(\m_1, Pbind( \type, \midi, \midicmd, \noteOn, \midiout, ~m32_1)).play(quant: 4); +// +// Pdef(\m_2, Pbind( \type, \midi, \midicmd, \noteOn, \midiout, ~m32_2)).play(quant: 4); +// +// +// // CC Control Message 1 ---> TOP Mother32 ASSIGN OUT +// +// ( Pdef(\m_1_CC, Pbind( \type, \midi, \midicmd, \control, \midiout, ~m32_1, \ctlNum, 1, \control, Pexprand(72,127, inf), \dur, ~r1)).play(quant:4)); +// +// // CC Control Message 1 ---> BOTTOM Mother32 ASSIGN OUT +// +// Pdef(\m_2_CC, Pbind( \type, \midi, \midicmd, \control, \midiout, ~m32_2, \ctlNum, 1, \control, Pexprand(77,127, inf), \dur, 1/8 )).play(quant:4); -// CC Control Message 1 ---> BOTTOM Mother32 ASSIGN OUT -Pdef(\m_2_CC, Pbind( \type, \midi, \midicmd, \control, \midiout, ~m32_2, \ctlNum, 1, \control, Pexprand(77,127, inf), \dur, 1/8 )).play(quant:4); -/////////////////////////////////// -//Pdef(\processing, Pfunc { ~host.sendMsg("/sc3p5", rrand(1,256).asFloat);}).play(quant: 4); -//~host.sendMsg("/sc3p5", rrand(1,256).asFloat); +// MIDIFunc.trace; +/*//MIDIIn.connectAll; -//https://sc-users.bham.ac.narkive.com/75iSw2f6/sending-osc-commands-instead-of-trigger-synths-with-patterns +~nK2srcID = MIDIIn.findPort("nanoKONTROL2", "nanoKONTROL2 nanoKONTROL2 _ CTR","nanoKONTROL2", "nanoKONTROL2 nanoKONTROL2 _ CTR").uid; +~nK2MIDIOut = MIDIOut.newByName("nanoKONTROL2", "nanoKONTROL2 nanoKONTROL2 _ CTR","nanoKONTROL2", "nanoKONTROL2 nanoKONTROL2 _ CTR"); +~nk2OutPort = 0;*/ -n = NetAddr("127.0.0.1", 47120); +//MIDIOut.connect(~nk2OutPort,~nK2MIDIOut.port); -//{50.do {n.sendMsg("/test",200.rand,200.rand);0.2.wait;}}.fork; +//~nk = NanoKONTROL2(s, srcID: ~nK2scrID, outport: ~nk2OutPort); -( Event.addEventType(\processingOSC, { | server | -var processingOscServer = NetAddr("192.168.178.166", 47120); -//var processingOscServer = NetAddr("127.0.0.1", 47120); -var notes = [~degree.value, ~ctranspose.value, ~velocity.value, -~sustain.value, ~lag.value, ~timingOffset.value].flop; +//postln(~nk.knobs[2][2].kr); -var bndl; -var timeNoteOn, timeNoteOff; +//~nk.knobs[2][2].kr -//processingOscServer.sendMsg("/test",200.rand,200.rand); -//processingOscServer.sendMsg("/sc3p5",200.rand, 200.rand); - -notes.do {|note| -processingOscServer.sendMsg("/sc3p5", note[0].asFloat); // send OSC message to P5 -processingOscServer.sendMsg("/mother2", note[1].asFloat); // send OSC message to P5 - -//processingOscServer.sendMsg("/mother1", 1920.rand); -//processingOscServer.sendMsg("/mother2", 1080.rand); -//processingOscServer.sendMsg("/sc3p5", rrand(1,256).asFloat); - -// sustain and timingOffset are in beats, lag is in seconds -//timeNoteOn = (thisThread.clock.tempo.reciprocal*note[5])+note[4]; -//timeNoteOff = -//(thisThread.clock.tempo.reciprocal*(note[3]+note[5]))+note[4]; -//{processingOscServer.sendMsg("/renoise/trigger/note_on", -1, -1, -//(note[0]+note[1]).asInt, note[2].asInt)}.defer(timeNoteOn); -//{processingOscServer.sendMsg("/renoise/trigger/note_off", -1, -1, -//(note[0]+note[1]).asInt)}.defer(timeNoteOff); -} -}); -) - -( Pdef(\processingA, Pbind(*[ type: \processingOSC, - dur: 1/8, degree: Pseq([2,5,12,200,600,900,1000], inf), ]); )) - -( Pdef(\processingB, Pbind(*[ type: \processingOSC, - dur: 1/8, ctranspose: Pseq([2,5,12,300,600,900], inf), ]); )) - -Pdef(\processingA).play(quant: 4); // TOP MOTHER -Pdef(\processingA).stop; -Pdef(\processingB).play(quant: 4); // TOP MOTHER -Pdef(\processingB).stop; +//{ SinOsc.ar(~nk.knobs[2][2].kr, 0, 0.5) }.play; +// n = NetAddr("127.0.0.1", 47120); \ No newline at end of file diff --git a/segments/00-NEOBAROQUE.scd b/segments/00-NEOBAROQUE.scd index 9dd72ec..6382321 100644 --- a/segments/00-NEOBAROQUE.scd +++ b/segments/00-NEOBAROQUE.scd @@ -1,61 +1,9 @@ - //// MINIMAL BAROQUE GROOVE - -~r0 = Pn(1/8, 16); - +( TempoClock.default.tempo = 60/60; +//TempoClock.default.tempo = 30/60; -TempoClock.default.tempo = 30/60; - - - -~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); - -~rs = Pseq([ -/* Pconst(32, Pseq([~rx0],inf)), - Pconst(32, Pseq([~r3],inf)), - Pconst(32, Pseq([~r3],inf)), - Pconst(32, Pseq([~r04],inf)),*/ - Pconst(64, Pseq([~r0],inf)), - - /*Pconst(32, Pseq([~rx0],inf)), - - Pseq([~rx2],32), - Pseq([~rx3],32), - - Pseq([~r03],8), - Pseq([~r04],8), - Pseq([~r0],8), - Pseq([~r0],8), - Pseq([~r04],8), - //Pseq([~r16],8), - Pseq([~r0],inf),*/ -],inf); - -~rb = Pseq([ -/* Pconst(32, Pseq([~rx0],inf)), - Pconst(32, Pseq([~r0],inf)), - Pconst(32, Pseq([~r04],inf)), - Pconst(32, Pseq([~r03],inf)),*/ - Pconst(64, Pseq([~r0],inf)), - - // - // Pseq([~rx0],32), - // Pseq([~rx1],32), - // Pseq([~rx2],32), - // Pseq([~rx3],32), - // - // Pseq([~r03],8), - // Pseq([~r04],8), - // Pseq([~r0],8), - // Pseq([~r0],8), - // Pseq([~r04],8), - // //Pseq([~r16],8), - // Pseq([~r0],inf), -],inf); +// scales / pitch structure //////// ~s0 = Scale.harmonicMinor; ~s1 = Scale.melodicMinor; @@ -63,15 +11,94 @@ TempoClock.default.tempo = 30/60; ~s3 = Scale.whole; ~s4 = Scale.chromatic; -~bassroot = Pseq([0,4,2,3,1,4, 0],1); -~bassroot16 = Pdup(32, Pseq([0,4,2,3,1, 4,0],1)); +// 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); -~d0 = Pxrand([0,2,4,6],32); +// 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), @@ -80,106 +107,223 @@ TempoClock.default.tempo = 30/60; Pn( ~d3, 1), Pn( ~d1, 1), Pn( ~d4, 1), + Pn( ~d4, 1), Pn( ~d0, 1), + ], 1); -Pbindef(\m_2, \octave, ~o1); -Pbindef(\m_2, \degree, ~bassroot16); +// octavisation patterns -n = NetAddr("192.168.178.166", 47120); -n.sendMsg("/mother1", 200.rand.asFloat ); +~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 +///////////////////////////////////////////////// +// e harmonic minor (\root 4) /////////////////// +//var ~t1, ~t2, ~t3, ~t4, b1, b2, b3, b4, a, b, r ,t, q , w; -Pbindef(\m_1, \root, 4, \scale,~s2, \degree, ~dseq, \octave, ~o1, \dur,~rb, +// ========================= +// 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]); - postln(e[\octave]); + 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]); }, ); -Pbindef(\m_2, \root, 4, \scale,~s2, \degree, ~bassroot16, \octave, 3, \dur,~rb, - \p5, Pfunc { |e| n.sendMsg("/mother2", (e[\degree]).asFloat ); }, - \rotation, Pfunc { |e| n.sendMsg("/rotation2", (e[\octave]).asFloat ); }, + + +// ========================= +// 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]); + }, ); - -/// try -var a, b, r ,t, q , w; - -a = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~m32_2, +~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("/rotation1", (e[\octave]).asFloat ); + \rotation, Pfunc { |e| n.sendMsg("/rotation2", (e[\octave]).asFloat ); postln(e[\degree], e[\octave]); }, ); -b = Pbind( \type, \midi, \midicmd, \noteOn, \midiout, ~m32_2, - \root, 4, \scale,~s2, \degree, ~dseq, \octave, ~o3, \dur,~rb, +~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("/rotation1", (e[\octave]).asFloat ); + \rotation, Pfunc { |e| n.sendMsg("/rotation2", (e[\octave]).asFloat ); postln(e[\degree], e[\octave]); }, ); -q = Pbind(\type, \midi, \midicmd, \noteOn, \midiout, ~m32_1, - \root, 4, \scale,~s2, \degree, ~bassroot16, \octave, ~o1, \dur,~rb, +~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("/rotation1", (e[\octave]).asFloat ); + \rotation, Pfunc { |e| n.sendMsg("/rotation2", (e[\octave]).asFloat ); postln(e[\degree], e[\octave]); }, ); -w = Pbind( \type, \midi, \midicmd, \noteOn, \midiout, ~m32_1, - \root, 4, \scale,~s2, \degree, ~dseq, \octave, ~o3, \dur,~rb, +~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("/rotation1", (e[\octave]).asFloat ); + \rotation, Pfunc { |e| n.sendMsg("/rotation2", (e[\octave]).asFloat ); postln(e[\degree], e[\octave]); }, ); -r = Pseq( [a,b,a,b], 1); -t = Pseq( [w,q,w,q], 1); +~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]); + }, +); -z = Ppar( [r,t], inf ).play; +// 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; - -/// - -Pbindef(\m_1, \degree, ~dseq); -Pbindef(\m_2, \degree, ~dseq); -Pbindef(\m_2, \degree, ~bassroot16); -Pbindef(\m_1, \octave, 3); -Pbindef(\m_1, \octave, ~o3); - -Pbindef(\m_1, \scale, ~s0); -Pbindef(\m_2, \scale, ~s0); - -Pbindef(\m_2, \octave, ~o1); -Pbindef(\m_2, \octave, ~o2); -Pbindef(\m_2, \octave, ~o1); - - -// CC Control Message 1 ---> TOP Mother32 ASSIGN OUT -( Pdef(\m_1_CC, Pbind( \type, \midi, \midicmd, \control, \midiout, ~m32_1, - \ctlNum, 1, \control, Pexprand(50,127, inf),\dur, 1/16)).play(quant:4)); - -// CC Control Message 1 ---> BOTTOM Mother32 ASSIGN OUT -Pdef(\m_2_CC, Pbind( \type, \midi, \midicmd, \control, \midiout, ~m32_2, \ctlNum, 1, \control, Pexprand(77,127, inf), \dur, 1/8 )).play(quant:4); - - -Pdef(\m_1).play(quant: 4); // TOP MOTHER -Pdef(\m_2).play(quant: 4); // BTM MOTHER NOTEON - -Pdef(\m_1).stop; -Pdef(\m_2).stop; - diff --git a/start_all_apps.sh b/start_all_apps.sh index 09c41c8..f96bd5d 100755 --- a/start_all_apps.sh +++ b/start_all_apps.sh @@ -3,23 +3,24 @@ kill `pidof ardour-7.2.0~ds0` killall -9 qjackctl jackd guitarix sclang scide; -/usr/bin/jackd -aa -u -dalsa -r44100 -p256 -n3 -D -Chw:U192k -Phw:U192k & +#/usr/bin/jackd -aa -u -dalsa -r44100 -p256 -n3 -D -Chw:U192k -Phw:U192k & +/usr/bin/jackd -u -dalsa -r44100 -p256 -n3 -D -Chw:PCH -Phw:PCH & sleep 1; -guitarix & +#guitarix & # sclang -D gtr.scd & -scide gtr.scd & +scide & -gnome-terminal --title=NODE SERVER -- sh ./setup/comms_start.sh & +#gnome-terminal --title=NODE SERVER -- sh ./setup/comms_start.sh & sleep 4; rm recordings/ardour/gtr-2022-11-28-15-07-41/*.bak & rm recordings/ardour/gtr-2022-11-28-15-07-41/*.history & -ardour recordings/ardour/gtr-2022-11-28-15-07-41/gtr-2022-11-28-15-07-41.ardour & +#ardour recordings/ardour/algomom/algomom.ardour & sleep 5;