I've been trying to put together a MIDI example but finding Pure data really difficult to get my head around!
One thing I've found is that I think currently [bendin] is faulty, and should produce values between 0 and 16384 instead of from -8192 to 8191. So a no-bend message would come through as 8192. No idea why this is, but it is clearly stated in the Vanilla Pd help page for MIDI objects:
Known bug: [bendin] and [bendout] are inconsistent. While [bendin] outputs values from 0 to 16383, [bendout] takes values from -8192 to 8191 - this won't change.
Then I've been hitting against what I thought should be easy: let's say I want to send pitch bend messages based on some parameter, but I only want to send them when the parameter changes. There's a [change] object for that - but in my patch at least it doesn't work as I'd expect. I've tried combinations of
[change], but still I get a steady stream of identical pitch bend messages coming out. I guess it has something to do with our parameter
[receive] objects firing every block, but still I thought
[change] would filter out duplicate values.
If anyone wants to have a look the patch it is here: https://www.rebeltech.org/patch-library/patch/PD_MIDI
This exercise also reminds me we don't have support for
[stripnote] for that matter. The first two would be kind of important if we want to distinguish between different MIDI ports, e.g. the USB Host and Device interfaces.