Skip to content

Commit

Permalink
Make the drum channel substitution algorithm more comprehensible
Browse files Browse the repository at this point in the history
  • Loading branch information
derselbst committed Feb 8, 2025
1 parent e3c62fa commit 758da2d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/synth/fluid_synth.c
Original file line number Diff line number Diff line change
Expand Up @@ -3135,9 +3135,13 @@ fluid_synth_program_change(fluid_synth_t *synth, int chan, int prognum)
/* Percussion: Fallback to preset 0 in percussion bank */
if(channel->channel_type == CHANNEL_TYPE_DRUM)
{
subst_prog = 0;
subst_bank = DRUM_INST_BANK;
preset = fluid_synth_find_preset(synth, subst_bank, subst_prog);
if(!preset)
{
subst_prog = 0;
preset = fluid_synth_find_preset(synth, subst_bank, subst_prog);
}
}
/* Melodic instrument */
else
Expand Down

0 comments on commit 758da2d

Please sign in to comment.