Skip to content
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

Notes "stuck" when using sustain pedal (MIDI CH 3 & 4) Other midi channels have problem as well... #1554

Closed
Sprolkyman opened this issue Feb 5, 2020 · 17 comments · Fixed by #1582
Labels
MIDI MIDI support related
Milestone

Comments

@Sprolkyman
Copy link

Sprolkyman commented Feb 5, 2020

Playing notes on external Keyboard on MIDI CH 3 & 4 (Maybe higher as well), and using sustain pedal, wont let go of the notes played. They will sound until the same notes are played again.
Cycling Sustain pedal does not help!
Using MIDI CH 1 or 2 does not cause this problem.

Please let us know your surge version
This information is all in the menu/about screen

  • Surge Version: (1.6.5 - 2020-02-04 )
  • Plugin type (AU)
  • Bits (64)

To Reproduce
Steps to reproduce the behavior:

  1. Using any patch that can sustain (I Think)
  2. Use Midi Channel 3 or 4 from controller to play note while holding down sustain pedal.
  3. Note Continues to play even if you let go of both pedal & Note
  4. To Stop Note(s) sounding, press on the same notes that are sounding, and they will stop as they should.
  5. No such problem when using MIDI Channel 1 or 2 !
    I have not tried higher Channels than No GUI with VST2 on Ableton Live 9.7 #4. ! (Due to my controller)

Expected behavior
Notes played should stop when letting go of key

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: MAC OSX Catalina & High SIerra
  • Host LOGIC PRO X
  • Version 10.4.8 (Latest)

Additional context
Add any other context about the problem here.

@baconpaul
Copy link
Collaborator

Are you in MPE mode?

But this might indeed be a legit bug; channels 3 and 4 are treated specially in surge to route between scenes if you are not in MPE mode. Sustain pedal should work of course but.

@baconpaul baconpaul added the MIDI MIDI support related label Feb 5, 2020
@baconpaul baconpaul added this to the 1.6.6 milestone Feb 5, 2020
@Sprolkyman
Copy link
Author

Sprolkyman commented Feb 5, 2020 via email

@baconpaul
Copy link
Collaborator

OK thanks. I'll take a look.
The sustain pedal is a bit tricky.
Oh one question: Does your keyboard send the sustain pedal on channel 3/4 with your midi, or does it send it on channel 1?
Or alternately could you attach a logic file zipped up which shows the break with your setup?
but if not I'm sure I can replicate.
Appreciate the report.

@Sprolkyman
Copy link
Author

Sprolkyman commented Feb 5, 2020 via email

@Sprolkyman
Copy link
Author

Sprolkyman commented Feb 5, 2020 via email

@baconpaul
Copy link
Collaborator

Cool thanks. Got it.

wonder what that purgeHoldBuffer around like 948 of SurgeSynthesizer.cpp is doing ... looks suspicious to me.

@baconpaul
Copy link
Collaborator

Oh yeah that's exactly where the bug is. Wow. That code is just weirdly wrong. I will need to think about and test it but thanks, should be able to fix it soon enough.

@Sprolkyman
Copy link
Author

Sprolkyman commented Feb 5, 2020 via email

@baconpaul
Copy link
Collaborator

Oh the "greek" means "jeez yeah you are exactly right, what's this weird bit of code sitting here that's been there forever even trying to do - that will kill sustain pedal releases on channel 3 and 4! Ahh well at least I know what to fix now"

Stay tuned to this issue, When I fix it there will be an update here and you can download a nightly with the fix.

@Sprolkyman
Copy link
Author

Sprolkyman commented Feb 5, 2020 via email

@Sprolkyman
Copy link
Author

ADDITIONAL SUSTAIN PROBLEM..!

All midi Channels!

I am playing around with Surge, checking out patches, and i get strange behavior on other MIDI Channels as well: This is an intermittent problem, but easy to replicate if you just keep on trying a couple of times.

  1. Hold down sustain pedal and then play the notes / chords, Shifting the sustain on and off as one does when playing. All of a sudden, : Holding down the played notes the sound stops if you go from an activated sustain (Pedal Down) to a release of the sustain. That is, still holding down the notes!!.

Expected is that if i one holds the notes down, they should hold their own sustain, so to say.. even if i let go of sustain.

Its like the notes that are pressed at this moment lost the key down signal, and what’s heard is the sound created when the pedal was pressed and the notes played. But when sustain is released it goes silent!

And its erratic! I Have checked other instruments, and they behave as they should!

@Sprolkyman Sprolkyman changed the title Notes "stuck" when using sustain pedal (MIDI CH 3 & 4) Notes "stuck" when using sustain pedal (MIDI CH 3 & 4) Other midi channels have problem as well... Feb 6, 2020
@baconpaul
Copy link
Collaborator

Yeah OK sustain is tricky beleive it or not, and we found and fixed some bugs in the MPE implementation with this release but didn’t do a full test.

For 1.6.6 I will add a comprehensive set of tests and get it working properly.

Appreciate your patience! Sorry for the bugs. The code is peculiarly hairy and I don;’t think it needs to be so I will probably just rejigger the whole sustain handling code.

@baconpaul
Copy link
Collaborator

Ahh OK here's the trick for the erratic state

Press and hold a key
Press the sustain pedal
Release the key and press and hold it again <-- At this point the voice is playing twice
Release the sustain pedal <-- At this point both the voices get killed

The reason is that press-while-sustained does't register as needing sustain to be held

if you press and hold a key without repeating it the sustain pedal works as it should.

Real bug. Looking.

baconpaul added a commit to baconpaul/surge that referenced this issue Feb 15, 2020
1. Midi channel 3 and 4 picked channel mask incorrectly.
   Make it mode aware and do the right thing
2. Multiple presses of a key on and off while the systain
   pedal was held mis-set-up the internal voice structures.

Closes surge-synthesizer#1554
@baconpaul
Copy link
Collaborator

OK I have a fix to both of these problems coming in. Stay tuned.

baconpaul added a commit that referenced this issue Feb 15, 2020
1. Midi channel 3 and 4 picked channel mask incorrectly.
   Make it mode aware and do the right thing
2. Multiple presses of a key on and off while the systain
   pedal was held mis-set-up the internal voice structures.

Closes #1554
@baconpaul
Copy link
Collaborator

OK @Sprolkyman this should now be fixed in the nightly at surge-synthesizer.github.io. We plan on doing a 1.6.6 release pretty soon for a couple of reasons so if you had a chance to test and confirm it would be appreciated.

@Sprolkyman
Copy link
Author

Sprolkyman commented Feb 16, 2020 via email

@baconpaul
Copy link
Collaborator

Super! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MIDI MIDI support related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants