Routing disables program change

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Routing disables program change

Francesco Ariis
Hello fluidsynths developers and users,

    I need help with a routing issue. Let me briefly describe my goal
first: I want fluidsynth to play each note at a fixed volume, regardless
of how hard or soft I hit the keys.

What I did is:

- invoke fluidsynth (1.1.11) as

    fluidsynth -a alsa -g 2 -r 44100 -c 1 -f ~/cfg/non-dot/fluidsynth_organ ~/cfg/data/audio/jeux-sf/jeuxdorgues21.SF2

- The contents of ~/cfg/non-dot/fluidsynth_organ are

    router_clear
    router_begin note
    router_par2 0 127 0 100
    router_end

The routing trick works (each note is rendered at uniform velocity), but
I cannot change the program.
I launched fluidsynth with -v and program_change events are not displayed
(they work if I do not load the config file).

What can I do to diagnose/fix this?
Thanks in advance
-F

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: Routing disables program change

Aere Greenway-2
Francesco:

Assuming you're using Linux, there's a Debian package called
'qmidiroute' you can install, that will handle what you need, and do a
lot more, if you ever need it.

- Aere

On 10/24/19 1:15 PM, Francesco Ariis wrote:

> Hello fluidsynths developers and users,
>
>      I need help with a routing issue. Let me briefly describe my goal
> first: I want fluidsynth to play each note at a fixed volume, regardless
> of how hard or soft I hit the keys.
>
> What I did is:
>
> - invoke fluidsynth (1.1.11) as
>
>      fluidsynth -a alsa -g 2 -r 44100 -c 1 -f ~/cfg/non-dot/fluidsynth_organ ~/cfg/data/audio/jeux-sf/jeuxdorgues21.SF2
>
> - The contents of ~/cfg/non-dot/fluidsynth_organ are
>
>      router_clear
>      router_begin note
>      router_par2 0 127 0 100
>      router_end
>
> The routing trick works (each note is rendered at uniform velocity), but
> I cannot change the program.
> I launched fluidsynth with -v and program_change events are not displayed
> (they work if I do not load the config file).
>
> What can I do to diagnose/fix this?
> Thanks in advance
> -F
>
> _______________________________________________
> fluid-dev mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/fluid-dev


--
Sincerely,
Aere



_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: Routing disables program change

Marcus Weseloh
In reply to this post by Francesco Ariis
Hi Francesco,

There are rules for multiple event types:
- note (note on/off)
- cc (control change)
- prog (program change)
- pbend (pitch bend)
- cpress (channel pressure / aftertouch)
- kpress (polyphonic pressure / aftertouch)
 
And for each of these types, there is a default rule defined that passes all events for all midi channels unchanged. Now your config starts with "router_clear", which deletes all these default rules and means no midi events will pass at all.

So after clearing all rules and creating your custom ones, you would need to recreate the default rules for all event types that you need. For example, if you want to have the fixed velocity on note events, pass cc and prog events unchanged and drop all the rest, you could do the following:

router_clear

router_begin note
router_par2 0 127 0 100
router_end   

router_begin cc
router_end   

router_begin prog
router_end  


Alternatively, as Aere has already mentioned, you could use an external router. But for simple modifications like your fixed velocity, the internal router is definitely a good option. 
Yet another option would be to use a Soundfont editor like Polyphone and configure a fixed velocity for all presets you want to play.

All the best
Marcus

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: Routing disables program change

Francesco Ariis
On Thu, Oct 24, 2019 at 11:44:08PM +0200, Marcus Weseloh wrote:
> So after clearing all rules and creating your custom ones, you would need
> to recreate the default rules for all event types that you need. For
> example, if you want to have the fixed velocity on note events, pass cc and
> prog events unchanged and drop all the rest, you could do the following:

Works like a charm, Thanks Marcus!
-F


_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev