I was trying to send data from SC to Processing and find some issues.
Firstly, in terms of communication speed, does it really matter if I send MIDI or OSC? Is it all under UDP or TCP ?
Secondly, I had some problem when trying to send MIDI from SC to Processing, because the processing library for that (The Midi Bus) lacks documentation and seems to be incomplete.
For instance, I was only able to send NoteOn, NoteOff, Pitch and tradicional Control messages, which means that everything was constrained to values between 0 and 127. I tried to send PitchBend messages or SongPtr which could allow 16383, but the Processing library doesn’t recognized them.
I was sending MIDI messages exactly in this way:
// Pattern Guide Cookbook 04: Sending MIDI MIDIClient.init; // if not already done ( // substitute your own device here var mOut = MIDIOut.newByName("FastLane USB", "Port A").latency_(Server.default.latency); p = Pbind( \type, \midi, // this line is optional b/c noteOn is the default // just making it explicit here \midicmd, \noteOn, \midiout, mOut, // must provide the MIDI target here \chan, 0, // degree is converted to midinote, not just frequency \degree, Pwhite(-7, 12, inf), \dur, Pwrand([0.25, Pn(0.125, 2)], #[0.8, 0.2], inf), \legato, sin(Ptime(inf) * 0.5).linexp(-1, 1, 1/3, 3), \amp, Pexprand(0.5, 1.0, inf) ).play(quant: 1); ) p.stop;
Is it possible to use this same Pattern's template of sending MIDI to send OSC instead?
Is there a way of sendinh MIDI from SC to Processing with "any" range of values?