added segments as composition descriptors

master
Rob Canning 2023-01-19 14:26:29 +01:00
parent fd40bdca22
commit 88e2630c90
7 changed files with 165 additions and 28 deletions

View File

@ -2,6 +2,12 @@
TempoClock.default.tempo = 60/60;
~host = NetAddr("localhost", 4859); // address de PROCESSING
Pfunc
~xx = (
Pdef(\m_1).play(quant: 4); // TOP MOTHER
Pdef(\m_1_CC).play(quant:4); // CC 1
@ -36,3 +42,20 @@ 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;
)

View File

@ -11,6 +11,7 @@ MIDIClient.init;
// 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
@ -21,3 +22,50 @@ Pdef(\m_2, Pbind( \type, \midi, \midicmd, \noteOn, \midiout, ~m32_2)).play(quan
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);
https://sc-users.bham.ac.narkive.com/75iSw2f6/sending-osc-commands-instead-of-trigger-synths-with-patterns
(
Event.addEventType(\processingOSC, { | server |
var processingOscServer = NetAddr("127.0.0.1", 4859);
var notes = [~midinote.value, ~ctranspose.value, ~velocity.value,
~sustain.value, ~lag.value, ~timingOffset.value].flop;
var bndl;
var timeNoteOn, timeNoteOff;
processingOscServer.sendMsg("/sc3p5", rrand(1,256).asFloat);
notes.do {|note|
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);
}
});
)
(
Pbind(*[
type: \processingOSC,
legato: Pgauss(0.2,0.05,inf),
dur: 0.2,
degree: [2,5,12],
ctranspose: Pseq([0,0,0,0,4,4,4,4,5,5,5,5],inf),
velocity: Pgauss(64,10,inf),
]).play;
)

View File

@ -17,6 +17,32 @@ Pbindef(\m_1, \scale,~s1,\degree,~d4,\octave,7,\dur,~rrr );
Pbindef(\m_2, \scale,~s1,\degree,~d4,\octave,~o3,\dur,~rrr );
(
p = Pn(Plazy {
Pbindef(\m_1, \scale,~s1,\degree,~d4,\octave,rrand(3,8),\dur,1/8 )
},3).play
)
( a = Pbind( \type, \midi, \midicmd, \noteOn, \midiout, ~m32_1,
\scale,~s1,\degree, Pseq([0,1,2,3,4,5], 4), \octave, 5, \dur,1/8)
).asStream;
( b = Pbind( \type, \midi, \midicmd, \noteOn, \midiout, ~m32_1,
\scale,~s1, \degree,Pseq([0,1,2,3,4,5,6,7,8], 4), \octave,3, \dur,1/8)
).asStream;
Prand([a,b],inf).play;
Ppar
//////////////////////////////////
~d = Pseq((0..7), inf);

View File

@ -29,7 +29,7 @@ TempoClock.default.tempo = 60/60;
Pseq([~r04],8),
//Pseq([~r16],8),
Pseq([~r0],inf),*/
],1);
],inf);
~rb = Pseq([
/* Pconst(32, Pseq([~rx0],inf)),
@ -51,13 +51,40 @@ TempoClock.default.tempo = 60/60;
// Pseq([~r04],8),
// //Pseq([~r16],8),
// Pseq([~r0],inf),
],1);
],inf);
Pbindef(\m_1, \scale,~s0,\degree,~ddd,\octave, ~o3,\dur,~rs );
Pbindef(\m_2, \scale,~s0,\degree,~ddd,\octave, ~o1,\dur,~rb );
~s0 = Scale.harmonicMinor;
~s1 = Scale.melodicMinor;
~s2 = Scale.gong;
~s3 = Scale.whole;
~s4 = Scale.chromatic;
Pdef(\m_1).play(quant: 4); // TOP MOTHER
Pdef(\m_2).play(quant: 4); // BTM MOTHER NOTEON
~bassroot = Pseq([0,4,2,3,1,4, 0],1);
~bassroot16 = Pdup(32, Pseq([0,4,2,3,1, 4,0],inf));
~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);
~dseq = Pseq([
Pn( ~d0, 1),
Pn( ~d4, 1),
Pn( ~d2, 1),
Pn( ~d3, 1),
Pn( ~d1, 1),
Pn( ~d4, 1),
Pn( ~d0, 1),
], inf);
Pbindef(\m_2, \octave, ~o1);
Pbindef(\m_2, \degree, ~bassroot16);
// e harmonic minor
Pbindef(\m_1, \root, 4, \scale,~s0,\degree,~dseq,\octave, ~o3,\dur,~rs );
Pbindef(\m_2, \root, 4, \scale,~s0,\degree, ~bassroot16,\octave, ~o1, \dur, ~rb );
// CC Control Message 1 ---> TOP Mother32 ASSIGN OUT
( Pdef(\m_1_CC, Pbind( \type, \midi, \midicmd, \control, \midiout, ~m32_1,
@ -65,3 +92,10 @@ Pdef(\m_2).play(quant: 4); // BTM MOTHER NOTEON
// 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;

View File

@ -1,7 +1,7 @@
//Pdup
// rhinosorous ///////////////////////////////////
TempoClock.default.tempo = 90/60;
TempoClock.default.tempo = 70/60;
~durs = [1/16,1/8, 3/16, 1/4, 1/3, 3/8, 1/2, 5/8, 2/3, 3/4, 7/8, 1, 5/4, 2]; //16 beats
@ -15,35 +15,39 @@ TempoClock.default.tempo = 90/60;
~df = Pseq([1,1,3,1,1,1,5,1,2,1,8,1,13],1);
// Place([Pn(1/8, {[2,5,8,13].choose}), 1, [3,5,8,13], Rest(1) ], 4),
~durpat = Pseq([ // .sum to check
1,1,3,1,1,1,5,1,2,1,8,1,13,
Pconst(32, ~wdurs),
Pseq([Pn(1/16, 8), 4,3.5], 1), // 8
1,1,3,1,1,1,5,1,2,1,8,1,13,
Pseq([1/2, 1/2, 1/2, 1/6, 1/6, 1/6, 5], 4), // 28
Pseq([1/6,1/6,1/6,1/6,1/6,1/6, 3], 4), // 16
//Pseq([1/6,1/6,1/6,1/6,1/6,1/6], 4),
//Pseq([3/8, 1/8, 1/6, 1/6, 1/6, Rest(3), 2 ], 8),
Pconst(21, Pseq([5,3,5,8],1)),
Rest(32)
//1,1,3,1,1,1,5,1,2,1,8,1,13, // 13 events
//Pconst(32, ~wdurs), // 32 beats / 8 bars
//Ppatlace([
//Place([Pn(1/8, { [2,5,8,13].choose }), 1, [3,5,8,13], Rest(1) ], 4),
// INSTALL NEW SUPERCOLLIDER FOR PDUP
//Pdup(Pseq([2,3,5,8],inf), Pseq([1/8, 1/3, 1/5, 1/8],inf)),
Pdup(Pseq([2,3,5,8],inf),
Pseq([
Place([1/8, 1/3, 1/5, [1/8, 1/2, 1/16, 1/4] ], 4 ) ],inf )),
//Place([ Prand( [13,5], 3), 1/8, 1, [3,5,8,13], Rest(1) ] , 4).trace,
//1,1,3,1,1,1,5,1,2,1,8,1,13, // 13 events
//Pseq([1/2, 1/2, 1/2, 1/6, 1/6, 1/6, 5], 4), // 28
//Pseq([1/6,1/6,1/6,1/6,1/6,1/6, 3], 4), // 16
//Pconst(21, Pseq([5,3,5,8],1)),
Rest(8)
], 1);
~octptn = Pseq([
Pfin(13, Pn(4,inf)),
Pconst(32, Pn(7,inf)),
Pconst(8, Pn(3, inf)),
Pconst(32, Pn(6,inf)),
Pconst(32, Pn(3, inf)),
Pfin(13, Pn(4,inf)),
Pconst(28, Pn(7,inf)),
Pconst(16, Pn(5,inf)),
Pconst(21, Pn(4,inf)),
], inf);
//~deg = Pseq((0..11) ++ Pseq([8,9,10,11],3) ++ (11..0) ++ [\rest], 1);
//~deg = Pseq((0..11) ++ [\rest], 4);
~prime = Pseq( (0..11) , 1);
~retro = Pseq( (11..0) , 1);
@ -51,7 +55,7 @@ TempoClock.default.tempo = 90/60;
~melodyB = Pseq([~prime, ~retro, ~prime], inf);
Pbindef(\m_1, \dur, ~durpat, \octave, ~octptn, \scale, ~op, \degree,~melodyA);
Pbindef(\m_2, \dur, ~durpat, \octave, 3, \scale,~op, \degree,~melodyB, inf);
Pbindef(\m_2, \dur, ~durpat, \octave, 3, \scale,~op, \degree,~melodyB);
//Pchain

View File

@ -1,5 +1,5 @@
kill `pidof ardour-6.5.0~ds0`
kill `pidof ardour-7.2.0~ds0`
killall -9 qjackctl jackd guitarix sclang scide;

View File

@ -5,6 +5,8 @@ const osc = require('osc')
const readline = require('readline')
const fs = require('fs')
const SerialPort = require('serialport')
const port = 6676
// Vzemi iz argumenta
const tty = process.argv[2]