Fix Sustained voices being held after ALL_CTRL_OFF

This commit is contained in:
derselbst 2022-02-25 18:38:09 +01:00
parent 62ed1c813d
commit 764ceae1ef
2 changed files with 10 additions and 0 deletions

View file

@ -1794,6 +1794,9 @@ fluid_synth_cc_LOCAL(fluid_synth_t *synth, int channum, int num)
case ALL_CTRL_OFF: /* not allowed to modulate (spec SF 2.01 - 8.2.1) */
fluid_channel_init_ctrl(chan, 1);
// the hold pedals have been reset, we maybe need to release voices
fluid_synth_damp_voices_by_sustain_LOCAL(synth, channum);
fluid_synth_damp_voices_by_sostenuto_LOCAL(synth, channum);
fluid_synth_modulate_voices_all_LOCAL(synth, channum);
break;

View file

@ -122,6 +122,13 @@ int main(void)
for (chan = 0; chan < fluid_synth_count_midi_channels(synth); chan++)
{
const fluid_channel_t* channel = synth->channel[chan];
if(channel->channel_type == CHANNEL_TYPE_DRUM)
{
// drum channels won't spawn voices
continue;
}
test_portamento_fromkey(synth, chan);
fluid_synth_system_reset(synth);