SLADE icon indicating copy to clipboard operation
SLADE copied to clipboard

Playing a MIDI for the second time plays using default piano and drum instruments instead of the intended soundfont

Open ipaqmaster opened this issue 1 year ago • 2 comments

SLADE Version

3.2.6

OS

Linux

Editor

Resource editor

Steps to Reproduce and Observed Behavior

  1. Edit > Preferences > Audio
  2. Optionally check Automatically play audio entries when opened
  3. Select Use Fluidsynth,
  4. Set the gzdoom.sf2 soundfont file.
  5. In the Resource editor click any MIDI if you play it, it sounds correct. Autoplay may have also started playing it for you correct too.
  6. Click the play button despite having already started the song once. The currently selected MIDI restarts but only with piano instruments.

Expected Behavior

Playing a MIDI file the second time should start playback in the same way as the first time. Rather than starting playback with the instruments as the default piano.

Screenshots

No response

ipaqmaster avatar Oct 08 '24 23:10 ipaqmaster

I found the cause for this is fluid_synth_system_reset(fs_synth_) in stop() and have submitted a pull request that comments it out with a warning.

In local testing this appeared to fix this issue. https://github.com/sirjuddington/SLADE/pull/1738

ipaqmaster avatar Oct 09 '24 00:10 ipaqmaster

This might not be the best patch. I just experienced a long note hanging after stopping the playback of some MIDI.

Is it possible this is instead a problem with a latent Fluidsynth version?

ipaqmaster avatar Oct 09 '24 00:10 ipaqmaster

Made some changes to how this stuff works in a116a40c9e19e20d6cae4e646b6bcfaab0ee70df which should fix the issue (among other things). At least I can't reproduce the issue now

sirjuddington avatar Dec 21 '24 08:12 sirjuddington