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

Clobbering of PORTAMENTO_CTRL on "reset all controllers" #1050

Closed
rianhunter opened this issue Feb 22, 2022 · 4 comments
Closed

Clobbering of PORTAMENTO_CTRL on "reset all controllers" #1050

rianhunter opened this issue Feb 22, 2022 · 4 comments
Labels
Milestone

Comments

@rianhunter
Copy link

FluidSynth version

$ fluidsynth --version
FluidSynth runtime version 2.1.7
Copyright (C) 2000-2021 Peter Hanappe and others.
Distributed under the LGPL license.
SoundFont(R) is a registered trademark of E-mu Systems, Inc.

FluidSynth executable version 2.1.7
Sample type=double

Describe the bug

When handling CC#121 "reset all controllers" fluidsynth will clobber PORTAMENTO_CTRL to zero without setting it to INVALID_NOTE using fluid_channel_clear_portamento. This will cause the next portamento to glide from midi note 0.

Expected behavior

I'm not sure what the intended behavior is supposed to be but at the bare minimum the PORTAMENTO_CTRL should not be clobbered without invalidating it. Either it should be invalidated or left alone.

Steps to reproduce

  1. Send note on on middle C (60)
  2. send reset all controllers CC#121
  3. Enable portamento (send non-zero to CC#5)
  4. Enable portament footswitch (send 127 to CC#65)
  5. Enable legato footswitch (send 127 to CC#68)
  6. send note on on C5 (72)

You will notice that it glides from midi note 0 instead of midi note 60. It should glide from midi note 60.

Additional context

The offending code is in fluid_channel_init_ctrl()

@rianhunter rianhunter added the bug label Feb 22, 2022
@derselbst derselbst added this to the 2.2 milestone Feb 22, 2022
@rianhunter
Copy link
Author

After looking more into how "reset all controllers" is intended to be used, it's my opinion that PORTAMENTO_CTRL should be invalidated. #1049 (comment)

@derselbst
Copy link
Member

I guess PORTAMENTO_CTRL should only be invalidated if Portamento is enabled. That's because PORTAMENTO_CTRL could be used as modulator source. And I'm afraid that unconditionally invalidating it would result in some audible glitches.

@derselbst
Copy link
Member

Nevermind. I'll unconditionally invalidate it and take care of INVALID_NOTE separately.

@derselbst
Copy link
Member

Same!

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

No branches or pull requests

2 participants