sirjuddington / SLADE

It's a Doom editor
https://slade.mancubus.net
GNU General Public License v2.0
710 stars 109 forks source link

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

Open ipaqmaster opened 4 weeks ago

ipaqmaster commented 4 weeks ago

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 commented 4 weeks ago

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 commented 4 weeks ago

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?