Skip to content
Snippets Groups Projects
Forked from Jonathan Wilkes / purr-data
Loading
Albert Graef's avatar
Albert Gräf authored
This adds an option to make bendin use the vanilla range of 0..16383 for
compatibility. As was observed a long time ago, this is at odds with the
bendout range of -8192..8191, and was thus fixed in pd-l2ork at some
point. But Miller Puckette has decided that this bug won't *ever* be fixed in
vanilla, and this is even documented in vanilla's midi-help.pd patch.

This discrepancy breaks a lot of patches involving MIDI, so a compatibility
option is needed. It's been possible to use -legacy to get vanilla's bendin,
but it's better not to conflate legacy iemgui positioning issues with the
bendin implementation. The former won't usually break interoperability, but
the latter does.

So, as suggested by Ico Bukvic, we add a flag as an optional second argument
to bendin instead. If present, this option explicitly denotes the target
range: zero means the default (pd-l2ork, signed) output range, nonzero the
vanilla-compatible unsigned range. In addition, there's a new -legacy-bendin
command line option which makes unsigned output the default for bendin objects
which don't specify the range explicitly. You'll want to put this into your
startup flags in the preferences if you need out-of-the-box vanilla
compatibility.
772072ec
History
Name Last commit Last update