falkTX / Carla

Audio plugin host
https://kx.studio/carla
1.56k stars 144 forks source link

Repeating notes with sustain pedal kills the first notes #1395

Open paoloperrone opened 3 years ago

paoloperrone commented 3 years ago

Carla 2.3.0-RC2. When a synth (tried: ZynAddSubFX) or an SFZ (tried: Salamander Grand Piano) is loaded and a midi controller is used, and CC are allowed for the sustain pedal to work, the following happens: With the sustain pedal activated, if one plays the same note twice with little time in between, the first time with high velocity, and the second time with low velocity, the first note is "killed", and the volume suddenly drops. This is particularly undesirable for piano sounds, since it's not how the sustain pedal of a real piano works (the first note should stay).

What seems to be happening (but I'm not an expert) is that when the sustain pedal is active, internally to the plugin all "noteoff" events are delayed, but only until the note is played again. When the note is played again, the "noteoff" is let through, and then the new note is played. But this is just my theory.

falkTX commented 3 years ago

I dont see how this is anything related to carla. carla just receives the midi events and sends them to the plugins it is up to plugins to then handle those.

paoloperrone commented 3 years ago

Isn't it still a Carla problem if it happens with its sfz engine? (Just asking, not an expert.)

falkTX commented 3 years ago

the sfz engine inside carla is to be replaced at some point, I am not really going to spend time/effort on it.

it is worth trying out with a few synths to make this situation more clear.

paoloperrone commented 3 years ago

Apparently, the problem does not come up with MDA Piano.

Dmitry-Sl commented 4 months ago

I met the same problem. Used "Salamander piano" and "Piano in 162" soundfonts from sfzinstruments.github.io on Carla patchbay on Debian 11 with live midi input from midi-keyboard and on Carla VST on Windows in a sequencer with prepared midi. On both cases I see the same problem - when sustain pedal is pressed (CC64 > 64) previously played notes are muted after playing same notes afterwards (same pitch). It's very noticeble when "second" notes are played with low velocity (eg. 50 after 100).

For reference i send same midi to NI Kontakt with NI Noire piano - a top-level library (on Windows in a sequencer - NI Kontakt and Carla VST were on different tracks, containing same MIDI-objects) and there were no such problems. On hardware Yamaha P45 also there are no such problems - it behaves like NI Kontakt.

This makes Carla unusable for piano performances. Offtop: I'll be thankful if someone suggests me good realtime SFZ player for debian, I used Sfizz, but it's very buggy at least on ARM64 - I switched from Sfizz to Carla and I thought that all bugs and enourmous processor loading were gone, but then I noticed the bug mentioned above.

I make these tests on Carla downloaded and installed last 2 weeks - probably the latest version.