77 lines
2.4 KiB
Plaintext
77 lines
2.4 KiB
Plaintext
/*RUN*/
|
|
|
|
"/home/rob/gtr/motherPatterns.scd".load;
|
|
|
|
MIDIClient.init;
|
|
|
|
~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);
|
|
|
|
// 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);
|
|
|
|
|
|
///////////////////////////////////
|
|
|
|
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
|
|
|
|
n=NetAddr("127.0.0.1", 47120);
|
|
{50.do {n.sendMsg("/test",200.rand,200.rand);0.2.wait;}}.fork;
|
|
|
|
(
|
|
|
|
Event.addEventType(\processingOSC, { | server |
|
|
var processingOscServer = NetAddr("127.0.0.1", 47120);
|
|
var notes = [~midinote.value, ~ctranspose.value, ~velocity.value,
|
|
~sustain.value, ~lag.value, ~timingOffset.value].flop;
|
|
|
|
var bndl;
|
|
var timeNoteOn, timeNoteOff;
|
|
|
|
//processingOscServer.sendMsg("/test",200.rand,200.rand);
|
|
processingOscServer.sendMsg("/sc3p5",200.rand, 200.rand);
|
|
processingOscServer.sendMsg("/col", 255.rand);
|
|
|
|
|
|
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: 1/8,
|
|
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(quant: 4);
|
|
)
|
|
|