On Tue, Aug 7, 2012 at 11:48 AM, Kassen
On 7 August 2012 17:39, Julian Faust
wrote: Hi all,
Hey Julian.
Is it possible to send arbitrary midi messages like F0 00 01 61 03 04 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F F7 (for example) ? I understand that you can work with hex, but it seems that MidiMsg is fixed at 3 data slots, and MidiIn and MidiOut interface via MidiMsg. Is there any way to use MidiOut without MidiMsg? Or possibly overload the class with a more flexible message holder?
Maybe :-). our MIDI works with the mentioned 3 byte messages, but in the past I managed to "cheat" it and reliably send 2 byte messages (patch and bank changes). I think I left the 3rd byte blank or maybe I set it to zero (might be the same thing). Anyway, by chopping up your message into 3 byte blocks and sending those in order you might be able to get it through, I have high hopes for that.
I'd appreciate it if you'd report back any findings.
Me too.
I typically use Processing + rwmidi to send MIDI to ChucK and have
been wanting to do the same within ChucK.
http://processing.org
https://github.com/heuermh/rwmidi
I started here but haven't got too far
https://github.com/heuermh/lick/blob/master/ControlChangeMidiMsg.ck
https://github.com/heuermh/lick/blob/master/NoteOffMidiMsg.ck
https://github.com/heuermh/lick/blob/master/NoteOnMidiMsg.ck
https://github.com/heuermh/lick/blob/master/MeeBlipMidi.ck
See also forwarded thread below.
michael
---------- Forwarded message ----------
From: Michael Heuer
Michael Heuer wrote:
Lucas Zawacki wrote:
I think this hidden gem was mentioned by Kassen somewhere and I've used it ever since to manipulate MIDI: http://www.rattus.net/~packrat/audio/ChucK/
Ah yes, thanks Lucas, just found this on the ChucK wiki. Is the author Bruce on the mailing list?
He used to be, at least, that's how I first heard about this, I think. People develop and intrests change; I'm not sure he still is on the list.
Maybe someone else can help explain this part to me then? I'm not good at bit-twidding. ((command & 0xf) << 4) | ((channel - 1) & 0xf) => midimessage.data1; command | channel => command; byte1 & 0x7f => midimessage.data2; byte2 & 0x7f => midimessage.data3; midiport.send(midimessage); Why is the ... => command; line there? Isn't that dead code? The bitwise and value for data2 and data3 (0x7f) is not the same I see in this java midi library (0xff) https://github.com/heuermh/rwmidi/blob/2d73ac726f5000c85dd7aa3eb160872acb60a... Thanks, michael