[L2Ork-dev] MIDI bugs and fixes

Laurent Willkomm willkomm at pt.lu
Tue Jun 14 09:00:22 UTC 2016


On 06/13/2016 09:51 PM, Albert Graef wrote:

...
> 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. :)
>
> 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?
>
> Opinions?
>
> Albert
>
> --
> Dr. Albert Gr"af
> Computer Music Research Group, JGU Mainz, Germany
> Email: aggraef at gmail.com <mailto:aggraef at gmail.com>
> WWW: https://plus.google.com/+AlbertGraef
>
>
> _______________________________________________
> L2Ork-dev mailing list
> L2Ork-dev at disis.music.vt.edu
> http://disis.music.vt.edu/listinfo/l2ork-dev
>

Hi list,
I noticed the bendin/bendout problem and sent a report to PD-list on 10 
Feb 2010, added some observations on 24 Feb 2010 as nobody replied to 
it. A patch was submitted by mrpeach to fix this ([ 
pure-data-Patches-2958837 ] Fix bendout on alsa), but I don't know when 
and on which release it was applied.

L.Willkomm
Noise Watchers Unlimited
Philharmonie Luxembourg



(Copy of my 2010 message:)

[bendout] takes values -8191..+8192; if given values below/above these 
limits it will send the same MIDI messages as on the limits.

So the pddp-Helppatch is wrong when it tells us 0..127.

The MIDI messages generated:
0 -> [bendout 0] gives E0 00 40
1 -> [bendout 0] gives E0 01 40
-1 -> [bendout 0] gives E0 7F 3F on WinXP, MacOSX and Linux-RawMidi, but

0 -> [bendout 0] gives E0 00 00
1 -> [bendout 0] gives E0 01 00
-1 -> [bendout 0] gives E0 7F 7F on Linux-AlsaMidi

So AlsaMidi tries to send the 14bit value as signed integer instead of 
unsigned int centered at 0x2000. Sending these messages to a sound 
module makes it jump to the pitchbend limits.

(Pd was 0.41.4 extended, MIDI monitored by Midiox on a second computer.)






More information about the L2Ork-dev mailing list