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
4 hours 31 min ago
16 hours 39 min ago
1 day 45 min ago
1 day 2 hours ago
1 day 16 hours ago
1 day 17 hours ago
1 day 17 hours ago
1 day 17 hours ago
1 day 18 hours ago
1 day 19 hours ago