-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabling MPE mode while a pitch bend is active causes the pitch bend to stick forever #6490
Comments
I think this also is partly dependent on which channel your bend is on when you toggle MPE mode. Surge will respond to global channel pitch bend distinctly from MPE bend but some info on midi state which did this would be helpful |
Heya @selenologist Well this doesn't happen on macos Can you give me some more details of the channels and midi messages? Or capture a midi file where it happens if you activate MPE half way through? |
Aha, I see now - I forgot to mention the pitch bend has to happen on a channel other than channel 1, because we handle channel 1 pitch bend the same in MPE mode so the reset to zero will still work in MPE mode. Here while MPE mode was disabled I dragged from a C to D-ish on my linnstrument which was using channel 2, then turned on MPE mode and released the note. Then I played another note on channel 3 that shouldn't have had any bend applied to it. |
Right I see why this is happening. Basically:
which means if you are not in MPE mode and send in a bend on channel 3, then turn on MPE, the global bend will still be set and releasing the channel 3 bend won't change it. Essentially "all bends act like global bends" switches from true to false The problem is we don't know where the pre-toggle bend came from. That is, if you sent a bend on channel 0 and then turned it on, you want that bend to stick. So fixing this properly is a wee bit hairy. Fixing it less properly (namely, when you toggle MPE your global pitch bend and all channel state pitch bend goes to zero) is easier but will lead to other play problems. Also we don't have a single code point to toggle MPE - we update the atomic directly in a few spots. So even going that route requires a bit of a refactor. If you do get stuck in this way, send a pitch bend on channel 0 of 0 will fix your system. So with all of that explained, I'm going to bump this out of 1.1.1; it's an edge case and its tricky to fix and the fix interacts with quite a bit of the rest of the code. Not a 'first point' thing. but now i see why it happens. Thanks! |
Maybe we could just all-sound-off when toggling MPE on, IF we have any voices active? Not terrific, but... |
So doing that is the similar work as fixing the bend, because i have to find all the places that toggle and make a little API for it. But yeah that actually makes sense to me. The voices mean something totally different and their state will be all wrong anyway. |
@baconpaul I have fixed this, somehow. This seems to work just fine!
|
oh clever |
Bug Description:
Enabling MPE mode while a pitch bend is active causes Surge to remain detuned, because in MPE mode pitch bend is handled differently. Surge will remain detuned.
Surge XT Version
This information is found on the About screen, which you get to from the bottom right menu.
Version: Surge XT 1.1.HEAD.beab6b17 (filter lib wasn't clean - rest of build is)
Build: 2022-07-26 @ 15:56:33 on 'rainbow/local' with 'Clang-14.0.6' using JUCE 6.1.6
System: Linux 64-bit VST3 on AMD Ryzen 7 2700X Eight-Core Processor
Host: Ardour @ 48.0 kHz
Reproduction Steps:
Steps to reproduce the behavior:
Expected Behavior:
Maybe when we toggle MPE mode we should reset pitch bend.
The text was updated successfully, but these errors were encountered: