[chuck-users] Sending raw midi / sysex
heuermh at gmail.com
Tue Aug 7 16:15:34 EDT 2012
On Tue, Aug 7, 2012 at 11:48 AM, Kassen <signal.automatique at gmail.com> wrote:
> On 7 August 2012 17:39, Julian Faust <julian.faust at gmail.com> 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.
I typically use Processing + rwmidi to send MIDI to ChucK and have
been wanting to do the same within ChucK.
I started here but haven't got too far
See also forwarded thread below.
---------- Forwarded message ----------
From: Michael Heuer <heuermh at gmail.com>
Date: Mon, Mar 19, 2012 at 11:21 AM
Subject: Re: [chuck-users] utility code for sending MIDI messages
To: ChucK Users Mailing List <chuck-users at lists.cs.princeton.edu>
> 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
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;
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)
More information about the chuck-users