haxo-rs icon indicating copy to clipboard operation
haxo-rs copied to clipboard

Program change above the available programs of user soundfont "leaks over" into the default soundfont

Open Ekolide opened this issue 1 year ago • 0 comments

Hi. I'm assuming this is a software issue, which is why I'm posting it here.

When using the program change hardware controls, going above the last available program in a soundfont starts loading programs from the default soundfont. It might be the case that it starts loading programs in the default soundfont from where the user soundfont ended. That is, if a Soundfont contains 4 programs, when "overflowing" over to program 5, it starts playing program 5 of the default Soundfont. When getting to the end of the default soundfont, behavior is as expected, the last available program keeps getting re-selected.

I've attached counting.sf2 (made of a CC0 sample) which contains four programs. Each program is a voice saying the number of the program it's on. The expected behavior after program 4, which is a voice saying "four", is that changing to program 5 simply won't work. It should re-select the last available program, program 4.

What actually happens is that a sort of e-piano sound is loaded. I expect this might be program 5 of the default soundfont, but I haven't checked. From there, you can freely select programs up to the end of the default soundfont, which is a gunshot sound. When attempting to go "above" the available program of the gunshot sound, it keeps re-selecting the gunshot sound. When attempting to go back "down" to program 4, 3, 2, and 1, it successfully loads those sounds of the user soundfont counting.sf2.

I am using the rPi Zero image downloaded today.

In the previous rPi Zero build I was using, there would be a similar behavior, but it wouldn't load into the default soundfont. Instead it would loop back to the first available program and keep "counting up", and I had to use the hardware controls to shift back down into a program number that Fluidsynth could use. That is, when shifting to program 5 of counting.sf2 it would actually load program 1. When shifting to program 6, it would load program 1. When shifting to program 7 it would load program 1, and so on. Interestingly I still had to go "back down" through programs 6 and 5 from there before I would get back into program 4, which would successfully load. Don't know if that information is of use as it is of an old version.

I do think there is a lot of potential in being able to switch between different soundfonts, but I don't think that this is a solution we want to stay with.

Let me know if there's any questions or if my explanation was unclear.

Thanks!

counting.sf2.zip

Ekolide avatar Jan 06 '24 14:01 Ekolide