-
Notifications
You must be signed in to change notification settings - Fork 42
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
issue with MIDI_0088.MID and MIDI_0089.HMI from Daggerfall #176
Comments
I was wrong to mark this as an HMI issue: it is not. There is a confusion of |
For the record, libtimidity reports 0m 56s for MIDI_0088.MID. |
Interestingly, wildmidi-0.3.12 is OK: it reports 0m 56s just like libtimidity. |
That is interesting... @chrisisonwildcode this needs to be fixed before we ship 0.4.2 since it is likely the cause to other such midi rendering problems we've had since going to 0.4 any idea? |
Looking into this issue with extra long times being reported.
…Sent from my iPhone
On 3 Aug 2017, at 7:24 am, sezero ***@***.***> wrote:
For the record, libtimidity reports 0m 56s for MIDI_0088.MID.
Something is crazy with libwildmidi.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
PING? |
@chrisisonwildcode any results? |
PING ? |
PING ? |
PING: Any chance that anyone will have a look at this? |
Unless this can be properly debugged, we can always have the xmi converted to midi using xmi2mid.c which should give us the correct results. Is this an acceptable solution @sezero ? |
No: This issue is not restricted to hmi or xmi files, but seen with plain midis too. |
To re-summarize the issue:
|
Attached output of |
If you count up the time elapsed on each track, does that match up with the known 'good' time or does devtest behave like wildmidi now? (sorry, didn't check, at work) |
Didin't look closely either. (I'm at work too :) |
approx_total_samples corrupted after load loop in f_midi.c
|
Also see: #149 (comment) |
Working on DevTest first to fix reported midi time length issue then will port to f_midi.c. I know what the issue is, and am reworking it right now. I expect to have a solution by the end of today for DevTest and f_midi.c. |
What is the issue? |
This issue seems to be resolved in DetTest for other HMI/MIDI files but the particular HMI reported still showing 166min on a particular track.
Exploring further |
So I've looked at the raw MIDI-0089.HMI file and this is what I found. in the fifth track, just before the 3rd last event, there appears to be a huge delta (aka timing data) causing the track length (at that point) to go from just 56secs to 166mins. Extending the output of DevTest shows this as well.
and
Both DevTest and f_hmi.c behave the same way with this file. Unless there is a fundamental issue with how we interpreted the HMI format I gotta put this particular issue down to a bad file. |
MIDI-0088.MID has a similar issue, massive delta before the last few events within one of its tracks. Interestingly enough the bad delta is almost the same length as the bad delta in MIDI-0089.HMI f_midi.c parses midi files slightly differently to DevTest but both have the same result. Unless someone comes up with a fundamental flaw in how we parse the files in relation to their respective formats I'm gonna have to put it down to bad data within the files mentioned that results in extra long times. I could look at adding work arounds for files that appear extra long by looking at where the lat event that effects notes is in relation to the reported length and snip off the dead space. But that would need to be up for discussion first. P.S. Looking for midi files that report extra long times within wildmidi … |
Well. there is a fundamental flaw somewhere, because neither wildmidi-0.3 nor libtimidity has any problems with this file. |
that's at least something to go on. |
I will have a good look at 0.3 tomorrow. I just know that after looking at the hexdump of MIDI_0088.MID that there is an issue similar to MIDI-0089.HMI in that a delta is excessively large. You can see from the hexdump above that I tend to separate out the commands within the file to trace whats going on. its a long process when all else fails. And I only resorted to the hexdump because I thought we may be reading the file wrong. |
Sorry for the delay. Had to send new computer back for replacement after it failed. On my radar for this weekend after #186. This is because I'm going to have to work through the midi file byte by byte to ensure we are reading the data in properly, and that we are processing it correctly with running events and stuff. I will be starting off by quickly seeing what 0.3 does with it including the 0.3 DevTest (which probably needs some lovin as well but will leave that for a later date). Since I already know that its track 5 of the midi file thats creating the issue I will either be able to find the issue with 0.4 branch or discover 0.3 does something extra with event timing after the last note off within a track (which sounds like something I might have done in my original versions of wildmidi). |
PING |
This is the only serious issue to block a new 0.4.3 release. |
PING? |
@chrisisonwildcode ping |
This is a bit old now, but I'd like to add that the music can be found at https://images.uesp.net/d/df/Dfmusics2.zip |
Old, maybe, but still not resolved (maybe I haven't tried hard enough.)
That does not explain why the wildmidi-0.3 branch (or libtimidity which |
Timidity makes allowances, and tries to handle corruptions. I believe that @chrisisonwildcode had mentioned wildmidi-0.3 (and earlier) had done a similar thing, and 0.4 no longer does it (for whatever reason). |
A thought for you to consider. The "fix" you are looking for will most likely eliminate the pause at the end of the file, which some have naturally as I've described. WildMidi already skips pauses at the beginning of files. Sometimes, what fixes one file can break others. The BEST solution is to fix broken MIDI files using an editor rather than have the MIDI player work around it. |
OK, closing this as wontfix |
MIDI_0089.HMI from http://www.vgmpf.com/Rips/Daggerfall-DOS.zip
reports 166m 34s with wildmidi.
As one would expect, wav output from the latter is about 30MB whereas
the wav output from the former is about 1.3GB. Something is certainly
broken in f_hmi.c.
The text was updated successfully, but these errors were encountered: