Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FluidSynth MIDI player sometimes fails to find presets in SoundFont on bank > 0 #1475

Open
mrbumpy409 opened this issue Jan 24, 2025 · 0 comments
Labels

Comments

@mrbumpy409
Copy link
Contributor

mrbumpy409 commented Jan 24, 2025

FluidSynth version

2.4.2

Describe the bug

When attempting to play an AWE32 MIDI file with its accompanying SoundFont loaded into bank 1, FluidSynth's MIDI player often fails to find the bank 1 presets, even though they exist in the SoundFont.

Steps to reproduce

  1. Download and extract bank_select_test.zip.
  2. [Optional] Copy the settings from fluidsynth.cfg into your FluidSynth configuration file, editing the file path to point to the synthgs-sf2_04-compat.sf2 SoundFont included in the zip file. This will set the AWE32 GS bank as the General MIDI SoundFont and set the effects engine to better match AWE32 levels.
  3. Start FluidSynth and load the MIDI file. If you copied the configuration file options in step 2 above, run this command:
    fluidsynth "/path/to/Altitude.mid"
    
    If you didn't do step 2, run this command instead:
    fluidsynth "/path/to/synthgs-sf2_04-compat.sf2" "/path/to/Altitude.mid"
    
  4. The MIDI file will start playing automatically, but you'll need to stop it and load Altitude.sf2 into bank 1. From the FluidSynth command line, enter the following commands:
    player_stop
    load "/path/to/Altitude.sf2" bankofs=1
    
  5. Start MIDI playback again from the beginning:
    player_start
    player_cont
    

Result

Fluidsynth often (if not always) prints warnings about not being able to find one or more instruments on bank 1, though the number of instruments it can't find varies from playback to playback. For example, here is the terminal output from restarting playback several times:

> player_cont
> fluidsynth: warning: Instrument not found on channel 0 [bank=1 prog=1], substituted [bank=0 prog=1]
fluidsynth: warning: Instrument not found on channel 1 [bank=1 prog=2], substituted [bank=0 prog=2]
fluidsynth: warning: Instrument not found on channel 2 [bank=1 prog=11], substituted [bank=0 prog=11]
fluidsynth: warning: Instrument not found on channel 3 [bank=1 prog=3], substituted [bank=0 prog=3]
fluidsynth: warning: Instrument not found on channel 8 [bank=1 prog=12], substituted [bank=0 prog=12]
fluidsynth: warning: Instrument not found on channel 12 [bank=1 prog=9], substituted [bank=0 prog=9]
fluidsynth: warning: Instrument not found on channel 13 [bank=1 prog=8], substituted [bank=0 prog=8]
fluidsynth: warning: Instrument not found on channel 15 [bank=1 prog=10], substituted [bank=0 prog=10]
player_start
player current pos:0, end:86399, bpm:151

> fluidsynth: warning: Instrument not found on channel 0 [bank=1 prog=1], substituted [bank=0 prog=1]
fluidsynth: warning: Instrument not found on channel 1 [bank=1 prog=2], substituted [bank=0 prog=2]
fluidsynth: warning: Instrument not found on channel 3 [bank=1 prog=3], substituted [bank=0 prog=3]
fluidsynth: warning: Instrument not found on channel 8 [bank=1 prog=12], substituted [bank=0 prog=12]
fluidsynth: warning: Instrument not found on channel 13 [bank=1 prog=8], substituted [bank=0 prog=8]
fluidsynth: warning: Instrument not found on channel 15 [bank=1 prog=10], substituted [bank=0 prog=10]
player_stop
player current pos:1575, end:86399, bpm:151

> player_start
player current pos:0, end:86399, bpm:151

> player_cont
> fluidsynth: warning: Instrument not found on channel 0 [bank=1 prog=1], substituted [bank=0 prog=1]
fluidsynth: warning: Instrument not found on channel 3 [bank=1 prog=3], substituted [bank=0 prog=3]
fluidsynth: warning: Instrument not found on channel 8 [bank=1 prog=12], substituted [bank=0 prog=12]
fluidsynth: warning: Instrument not found on channel 13 [bank=1 prog=8], substituted [bank=0 prog=8]
fluidsynth: warning: Instrument not found on channel 15 [bank=1 prog=10], substituted [bank=0 prog=10]
player_stop
player current pos:26407, end:86399, bpm:151

As you can see, each time playback is restarted, it fails to find a different number of instruments. For each channel with an error message, the wrong instrument will sound during MIDI playback, as that channel's preset will be falling back to the preset on bank 0.

Furthermore, channel 10 (percussion) is supposed to be selecting the drum kit on bank 1, but it is silently falling back to bank 0 with no error message.

Expected result

FluidSynth should be able to find the presets that are present the loaded SoundFont(s). You can hear what the instruments are supposed to sound like by listening to the included recording of Altitude rendered on a Sound Blaster Audigy2 ZS.

Additional context

If it matters, I am running FluidSynth in KDE neon, which is based on Ubuntu 22.04. My version of FluidSynth was compiled from source.

@mrbumpy409 mrbumpy409 added the bug label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy