[chuck-users] MIDI event problems-- no note-off events

Stefan Blixt stefan.blixt at gmail.com
Mon Apr 20 16:11:38 EDT 2009

IIRC, note offs are sometimes sent as note ons (0x9n = 144 for channel 0)
with velocity 0, and sometimes as the dedicated note off message  (0x8n =
128 for channel 0) - which of these methods you get depends on the
So try removing the "if (msg.data1 != 144) continue" lines, change the next
if line to "if (msg.data1 != 144 and msg.data3 > 0)", and change else to
"else if (msg.data1 == 128)", and see how that works. This is coded off the
top of my head, but I hope you see what I mean.


On Mon, Apr 20, 2009 at 6:45 AM, Andrew C. Smith <acsmith at willamette.edu>wrote:

> I'm running into problems getting the MIDI polyphony working.
> Specifically, in the ChucK examples, I'm catching all of the noteon
> messages but none of the noteoffs.  One thing, I don't really
> understand what "off @=> us[note];" is supposed to do, when "off" is
> an Event.  Basically, all of my noteon messages are coming as [144 key
> vel] while my noteoffs are coming as [128 key 64].  How does this
> work?  I don't see anything for message 128 in the source code.  I'm
> testing on this one:
> http://chuck.cs.princeton.edu/doc/examples/midi/polyfony2.ck
> Thanks everyone.  I tried reprogramming my keyboard (Korg Kontrol49)
> but I couldn't figure out how to make it work.
> Andrew
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users

Release me, insect, or I will destroy the Cosmos!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20090420/d2fc8a6e/attachment.htm>

More information about the chuck-users mailing list