<div dir="ltr"><div><div><div><div><div>Hi Ico,<br><br></div>I just sent you another pull request which fixes midiout on ALSA:<br><br><a href="https://github.com/pd-l2ork/pd/pull/36">https://github.com/pd-l2ork/pd/pull/36</a><br><br>It's a really long-standing bug, and has been in every Pd version in Linux as long as I can remember. The previous implementation of sys_alsa_putmidibyte() in s_midi_alsa.c is broken -- it just spits out malformed 1-byte "sysex" messages for each byte that goes into midiout. You can see that if you run the cyclone/seq-help.pd patch and hook it up to kmidimon or qmidiroute to watch the MIDI output. My new implementation does the necessary buffering and parsing using the appropriate ALSA routines to emit proper MIDI messages. It also works fine with system realtime and exclusive messages.<br><br></div><div>I don't foresee any adverse effects from this changeset, as it just fixes some functionality which wasn't working at all previously. <br></div><div><br></div>Is there some kind soul who would take care of submitting this upstream so that vanilla Pd gets fixed as well? I don't have the time to do that myself right now.<br><br></div>Talking about long-standing MIDI bugs in Pd, there's another one which I haven't fixed yet although it's probably easy to do. The bendin object produces an unsigned value range of 0 thru 16383, while the bendout object expects a signed range of -8192 thru +8191. Which means that you have to translate the values when routing pitch bends from MIDI input to MIDI output. Again, you can observe that with Kmidimon on Linux or MidiMonitor on the Mac, and it affects all different Pd flavors (vanilla, extended, l2ork). I recall that I talked to Miller about this a few years ago, but then forgot to follow up on it. Am I the only one to notice this? I can't believe that. :)<br><br></div>Anyway, I'm not sure whether it actually makes sense to still fix the bendin/bendout issue at this point, as there's probably a gazillion patches out there which assume this behavior. Maybe there's even a rationale behind it?<br><br></div>Opinions?<br clear="all"><div><div><div><div><div><div><br></div><div>Albert<br><br></div><div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Dr. Albert Gr"af<br>Computer Music Research Group, JGU Mainz, Germany<br>Email: <a href="mailto:aggraef@gmail.com" target="_blank">aggraef@gmail.com</a><br>WWW: <a href="https://plus.google.com/+AlbertGraef" target="_blank">https://plus.google.com/+AlbertGraef</a></div></div>
</div></div></div></div></div></div></div>