Skip to content
Snippets Groups Projects
Commit 772072ec authored by Albert Gräf's avatar Albert Gräf
Browse files

Improve bendin compatibility with vanilla.

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.
parent cfb218c7
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment