Ken;<br><br><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>The following code causes an &quot;event parsing error!&quot; whenever a 2-byte MIDI message such as a program change is sent:
</blockquote><div><br><br>Yes, that&#39;s a known issue, at least on Linux (I take it you are on Linux from your pgp sig ). On Windows it does work, or more likely, Windows let&#39;s itself be tricked more easily by ChucK abuse(?).
<br><br>Right now ChucK asumes MIDI mesages are three bytes. Of cource a third byte can be padded on at the end and strictly speaking it should be dropped by all listening devices since you anounce at the start that there will only be one data byte but clearly RTAudio tries to parse them as ChucK hands them to him and fails.
<br><br>Personally I don&#39;t think RTAudio should fail there since the MIDI spec clearly incoporates that there might be data that a device doesn&#39;t understand and that it should leave it be. I also think a update to ChucK&#39;s MIDI with function names like for the newed HID version and proper message lengths would be very welcome.
<br><br><br>Sorry, no fix but that&#39;s the how&amp;why.<br><br>Yours,<br>Kas.<br></div></div>