Incorrect sustain handling?

Hi,

The response to the sustain pedal is not according to the MIDI CC description.
MIDI spec:
CC 64: ≤63 off, ≥64 on
Zynthian:
CC 64: 0 off, >0 on

Is that on purpose?
Of course I can program my pedal that it sends 0 or 127 for some CC values, but maybe it’s better to follow the standard?

Kind regards,
Hans.

Unless I’m misunderstanding, zynthian will just push the CC64 value to the engine. So which engine are you using? Does it work like that for all the engines?

I tried LinuxSampler, Sfizz and ZynaddSubFx

The MIDI log in webconf showed only 0 for an input of 0 and 127 for higher.

I just added code to normalize the values on my side, thus avoiding the problem. I will revert that to give more details.

I will look further into this tomorrow.

EDIT:
Can’t reproduce it anymore :unamused_face:

At least for a moment several weeks ago I can say that zynthian hands over continuous “half pedalling” correctly. I connected my Yamaha YDP 143 digital piano via usb with pianoteq, and it worked. In my opinion most of how CC64 arrives at the engine you’re currently using depends on how the connected midi device translates the physical pedal connected to it. If you connected a two-state sustain pedal to your midi controller’s sustain pedal input it might be the controller itself which determines how it translates the analog state that there are two wires connected or not.

This doesn’t mean that there might not be any changes I didn’t realize in the last couple of weeks.

1 Like

Agreed.

To eliminate this uncertainty I connected my Akai thing that sends a CC64 with arbitrary values. This also gave the above result.

And this I also can not reproduce.

I change too many things I think, and then sometimes a strange situation arises. So be it.

How do you determine the response (off/on)? What was the expected behaviour? The engine defines how it interpretes CC64 values in terms of letting notes sustain or not. If you’d program an engine yourself, it would still receive plain CC64 values, but you could decide you’d want all odd numbers sustaining and all even numbers not sustaining (what you wouldn’t do of course because it would not match the MIDI spec). In sfz you can even define it within your sfz file (altering the default). Here’s how sfizz handles it:

The documentation is a little odd, because it states opcode “sustain_lo” being a floating point value with default 0.5f, but a range of 0 to 127. But it gives a hint that it considers (integer) values <=63.5f as non sustaining.

Quite simple, I can hear it.

Interesting. I did not know that.

btw all works now and I added a piece of code to the pedals so they react as on/off switches.