I wanted this for my Akai MPK mini. It sends Prog Changes messages only for the pads (on channel 9) and not for the keys (on channel 0). However you can remap the Prog Change messages. FluidSynth has a built-in midi router, however it is not (yet!) exposed by Qsynth. I added code to the qsynthMainForm.cpp to do the remapping:
$ git diff diff --git a/src/qsynthMainForm.cpp b/src/qsynthMainForm.cpp index 6e40f67..6549d98 100644 --- a/src/qsynthMainForm.cpp +++ b/src/qsynthMainForm.cpp @@ -2109,6 +2109,26 @@ bool qsynthMainForm::startEngine ( qsynthEngine *pEngine ) } } + fluid_midi_router_clear_rules(pEngine->pMidiRouter); + fluid_midi_router_rule_t* rule; + + // pass thru notes unmodified + rule = new_fluid_midi_router_rule(); + fluid_midi_router_rule_set_chan(rule, 0, 16, 1.0, 0); + fluid_midi_router_rule_set_param1(rule, 0, 255, 1.0, 0); + fluid_midi_router_add_rule(pEngine->pMidiRouter, rule, FLUID_MIDI_ROUTER_RULE_NOTE); + + rule = new_fluid_midi_router_rule(); + fluid_midi_router_rule_set_chan(rule, 0, 16, 1.0, 0); + fluid_midi_router_rule_set_param1(rule, 0, 255, 1.0, 0); + fluid_midi_router_add_rule(pEngine->pMidiRouter, rule, FLUID_MIDI_ROUTER_RULE_CC); + + // map pads (ch9) prog change over to channel 0 + rule = new_fluid_midi_router_rule(); + fluid_midi_router_rule_set_chan(rule, 9, 9, 0.0, 0); /* Map all on channel 9 to 0 */ + fluid_midi_router_rule_set_param1(rule, 0, 255, 1.0, 0); /* Match all commands */ + fluid_midi_router_add_rule(pEngine->pMidiRouter, rule, FLUID_MIDI_ROUTER_RULE_PROG_CHANGE); + // Run the server, if requested. if (pSetup->bServer) { #ifdef CONFIG_FLUID_SERVER
Copyright (C) 2006-2024 rncbc aka Rui Nuno Capela. All rights reserved.
Powered by Drupal
Recent comments
1 hour 52 min ago
16 hours 52 min ago
16 hours 55 min ago
18 hours 37 min ago
21 hours 53 min ago
22 hours 23 min ago
23 hours 37 min ago
23 hours 45 min ago
1 day 8 hours ago
1 day 6 hours ago