Wrong delay
tjsrocha94 opened this issue · 5 comments
I have this MIDI file and I used a MIDI editor to eliminate all of its tracks but one. This track only starts to play at 21.448 but when I run miditones on the one-track file, it says that the initial delay is 3,784 seconds. Can you explain to me why does this happen?
Thx ;)
I can't say for sure, but I'm guessing that there are still remnants in the MIDI file of the eliminated tracks that start 3784 seconds before the music actually starts. Try using the -lp option and see if you get any hints from the beginning of the parsing log.
You can probably get around the problem by manually editing the initial delay in the output bytestream to be much shorter.
I eliminated everything, all the events and tracks, from the MIDI file except the track I wanted and it still does the same thing. I tried to compare the file with one track with the original one with all the tracks and compared other delays and some aren't even approximate, so it doesn't matter much to alter just the first one. When I analysed the logs, from what I understood, the values of the delays have a different values from the other 2 files, Maybe there really is something that I can't see in the editor that affects the file. I'm trying to send you the files in case you wanted to check'em out but this isn't accepting the zip. Anyway, thanks for your attention. I'll try to figure out some other solution.
I haven't gotten the file. If you want, you can send to len@shustek.com.
Thanks for the sending the files. It is a bug! Long delays could cause a 32-bit integer overflow when the tempo is slow. I fixed it by doing 64-bit intermediate calculations, even for the 32-bit version. See if that works for you.
I imagined it would be something like that. I'm glad I could help. Now I've already finished my school project so I don't need it anymore but next time I will know where to come for help with MIDI files.
Thanks again :)