space-wizards / RobustToolbox

Robust multiplayer game engine, used by Space Station 14
https://spacestation14.io
Other
548 stars 409 forks source link

Super synthesizer sometimes plays wrong instruments #1986

Closed brndd closed 2 years ago

brndd commented 3 years ago

When using the super synthesizer to play the attached MIDI file, the following error is produced in the console and the playback substitutes the lead synth instrument in the song for a piano.

[WARN] midi.fluidsynth: Instrument not found on channel 9 [bank=128 prog=1], substituted [bank=128 prog=0]

touhou_8_stage4a_boss_reimu.zip

gradientvera commented 3 years ago

That warning is not relevant, channel 9 is percussion only.

gradientvera commented 3 years ago

Also, moved the issue since I think it fits this repo more

brndd commented 3 years ago

I have a suspicion the warning could be a result of some kind of misparsing or the instrument code mangling events, because it doesn't occur when playing the same MIDI file back from the command line using Fluidsynth with fluidsynth -a pulseaudio /usr/share/soundfonts/default.sf2 touhou_8_stage4a_boss_reimu.mid. It also doesn't happen when I play the file back using the WIP server-side MIDI playback I'm working on.

gradientvera commented 3 years ago

No, this is most likely MidiProgram on the renderer being changed to 1 (the default for the super synth) which causes it to set the channel 9 instrument to 1, which is not valid with its default bank 128.

gradientvera commented 2 years ago

Fixed by https://github.com/space-wizards/space-station-14/pull/7365