Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upMusic sets (including DOS music) broken after trying other music sets #7438
Comments
This comment has been minimized.
This comment has been minimized.
What operating system/MIDI driver are you using? |
This comment has been minimized.
This comment has been minimized.
Windows 10/default of binary installation. |
This comment has been minimized.
This comment has been minimized.
Are that happened also 1.9.0? |
This comment has been minimized.
This comment has been minimized.
There were definitely some tunes in OpenMSX that set registered parameters in bad ways which bled over to other tunes, the major example was the pitch bend range. That's being handled in the music drivers (both Win32 and DMusic) to reset those parameters before every tune. I'm trying to reproduce this now but so far not having any luck. Maybe I should find/write some tool to determine what controllers, RPN/NRPN, and possibly even SysEx, those various sets use. |
This comment has been minimized.
This comment has been minimized.
Okay now I managed to reproduce it, with Scott Joplin Anthology's title melody (The Entertainer) losing one or more channels. I'm not yet sure which tune caused it, but I have some debugging code in now that logs which controllers and parameters are being touched. (I only ever see anything touch RPN 0, which is being reset every time.) |
This comment has been minimized.
This comment has been minimized.
I'm not finding which particular tune is causing it (since it may also depend on how far into it has been played), but I think the safest bet would be to make MidiFile objects keep track of which controllers/parameters need to be reset after playback, so the synth/output can get a sequence to do that at the end. (Resetting everything every time can be very slow, so it's best to construct a minimal reset sequence.) |
This comment has been minimized.
This comment has been minimized.
Makes sense, but just to check, when you say "resetting everything", do you mean just sending the one Reset All Controllers message? I'm finding it a bit hard to believe there's no way to normalize everything quickly for the next song, on a 21st century computer. |
This comment has been minimized.
This comment has been minimized.
I checked the MIDI data being sent, via MIDI-OX, and it should be sending both All Notes Off and Reset All Controllers messages on every channel between every song. I don't understand why "reset all controllers" does not in fact reset all controllers on any of the synths I have tried. |
This comment has been minimized.
This comment has been minimized.
Strange! Well, thanks for looking at it. |
This comment has been minimized.
This comment has been minimized.
I was gonna post this as a new issue, but looking through, I found this would be a good place to put it. Version of OpenTTD
Expected resultThe full song with all of its notes should still be played, even after several hours of flipping through tracks and music sets. Actual resultAfter a few hours of flipping through and playing tracks and changing the music set several times, the "dmusic" driver will stop playing certain MIDI note channels, meaning that you will get less and less notes until eventually the driver stops playing MIDI music at all. Steps to reproduce
|
This comment has been minimized.
This comment has been minimized.
I'll try to reproduce and possibly include a fix in #7620 |
This comment has been minimized.
This comment has been minimized.
@James103 |
Version of OpenTTD
1.9.0RC1
Expected result
Each music set should play back as its author intended, regardless of sample volume set by other music sets.
Actual result
Sample volumes from one music set affect later sets chosen, or perhaps some samples are disabled. If unfamiliar with the music in question, noticeable effects include odd gaps and a strange 'sparseness' which sounds like one-finger playing.
Steps to reproduce
List of sets:
Only marking "affected" when I'm sure. It's hard to be sure without being familiar with each set, which would take me a long time.