David, please make sure to send a copy of your mails to the mailing list.
> However if I then assign another FSchannel to be percussion e.g.fluid_synth_set_channel_type(synth, 12, CHANNEL_TYPE_DRUM);this channel plays the instrument I have assigned in channel 9 as well as the percussion (and sounds awful).
Did you send a note off on channel 12? Did you issue fluid_synth_program_reset()?
> Do the channel_type commands above also set the bank?
No. They only set the channel type, which is basically a no-op to the user. The type is only considered on a program change event to determine a fallback instrument bank. That said: I cannot recommend to switch channel types back and forth with fluid_synth_set_channel_type(). You should rather turn all channels into melodic ones and select percussion by setting the bank (using e.g. fluid_synth_bank_select()) appropriately to what it is in your soundfont (usually bank 128).
Also note that I must correct myself: The bank selection mode only matters when using fluid_synth_cc(). fluid_synth_bank_select() is not affected by it, you were correct. Sry for the confusion.
Tom
14. Jan. 2019, 16:47:24 CET:
> Thanks Tom
> I do not think I need to change the mode from the default - however I do need to COMPLETELY undo the default bank and channel type for FS channel 9 (default percussion channel) and I do need to set other different FS channels to play percussion.As you suggestfluid_synth_set_channel_type(synth, 9, CHANNEL_TYPE_MELODIC);does allow me to assign a midi instrument to this default percussion channel and it plays OK.
> However if I then assign another FSchannel to be percussion e.g.fluid_synth_set_channel_type(synth, 12, CHANNEL_TYPE_DRUM);this channel plays the instrument I have assigned in channel 9 as well as the percussion (and sounds awful).
> Do the channel_type commands above also set the bank? or should I perhaps also usefluid_synth_bank_select(synth, 9, 1); //the normal bank for melodic instruments and fluid_synth_bank_select(synth, 12, 127);//127? 128? the normal bank for percussion
> to set the banks of these channels?
> David (csw900)
>