[solved] Fluida.lv2 and Bank Changes

All your LV2 and LADSPA goodness and more.

Moderators: MattKingUSA, khz

Post Reply
User avatar
Impostor
Established Member
Posts: 1386
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 145 times
Been thanked: 360 times

[solved] Fluida.lv2 and Bank Changes

Post by Impostor »

Having compiled Fluida on Linux Mint 20.2, it seems to work fine, except for the fact that I cannot change banks with soundfonts having more than one (e.g. FluidR3_GM.sf2).

Selecting sounds from banks other than bank 000 in the GUI menu doesn't work, and sending LSB or MSB bank changes from the midi keyboard doesn't work either. I'm stuck in bank 000.

Tested in MusE and QTractor. Anybody have a clue? Did compiling go wrong somehow, or is it a bug, or a user error?

Edit: just to be sure it's not fluidsynth itself acting up, I ran fluidsynth from the terminal, and there bank change commands from the midi keyboard did work.

Last edited by Impostor on Thu May 11, 2023 10:45 am, edited 2 times in total.
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 358 times

Re: Fluida.lv2 and Bank Changes

Post by j_e_f_f_g »

Is this FluidSynth version you're using LV2 format? Foolishly, the LV2 spec tosses away MIDI Program Change, and therefore Bank Select, messages. It assumes the host is going to implement a proprietary "extension" for changing the "patch".

Fortunately, some hosts ignore this part of the LV2 spec, and implement MIDI support anyway. Just make sure you send the Bank Select message before the Program Change message. That's because the bank doesn't actually change until the subsequent Program Change is sent. Of course, both messages must be sent. Furthermore, this are 2 Bank Select messages (controller 0 and 32) that are used together to extend the range of bank numbers. Some devices require both bank messages to be sent, even if controller 32's value is always 0. So to select program 4 on bank 1:

Code: Select all

176 0 1
176 32 0
192 4

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

User avatar
Impostor
Established Member
Posts: 1386
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 145 times
Been thanked: 360 times

Re: Fluida.lv2 and Bank Changes

Post by Impostor »

I got it working now, partly at least.

Don't know why it didn't seem to work before, but I can send Bank LSB# with the midi keyboard, and toggling between bank 0 and bank 8 does indeed work.

But, Fluida's GUI does not respond to the bank changes (in the selected bank/instrument box), and also, selecting banks in its GUI menu still doesn't work.

I'll try j.e.f.f.g's method to try to send midi CC from a midi track to see if that works...

Edit: Yes. In Muse, automating controller 32 does change the banks correctly, even when I don't change instruments.
With instrument fixed, changing controller 32 between 0 and 8 (or rather, 1 and 9, since 0=1:) does correctly change the sound.

User avatar
Impostor
Established Member
Posts: 1386
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 145 times
Been thanked: 360 times

Re: [partly solved] Fluida.lv2 and Bank Changes

Post by Impostor »

It apparently was a bug in fluida. It's fixed in the master now.

Now, with compiling I get a fatal error about lv2.h missing, but changing line 25 in fluida.h to

#include <lv2/core/lv2.h>

instead of

#include <lv2.h>

fixed that.

Post Reply