isalin / TBbard

Automated FFXIV Bard Performer (Now with MIDI support!)
MIT License
36 stars 10 forks source link

Some MIDI files come up completely empty #18

Closed DanaGoyette closed 3 years ago

DanaGoyette commented 5 years ago

Among my random collection of midi files, there are a bunch that used to come up with blank track titles (see #14), but with the latest change, they now show up completely empty. There are also some midi files that have always appeared completely empty.

Here's one such file: http://www.pianoeducation.org/babakiev.mid

isalin commented 5 years ago

Hi!

I see what the issue is. When a midi file doesn't specify an instrument at all, the convention appears to be to just default to "Piano". I didn't consider that midi files could just skip specifying an instrument, and so when I added the thing that filtered out "blank instruments/channels", those ended up being removed as well.

I've attempted to implement a fix here: 1.12.zip

I would be great if you could test one or two of the other files that showed up empty and verify that the fix works!

DanaGoyette commented 5 years ago

Thanks, that seems to work, and even fixes some other midi files that had always been broken. Now I can actually play them and choose the tracks. Would it be worthwhile to show the assumed piano as something else, so such tracks can be distinguished from regular piano tracks?

isalin commented 5 years ago

Wonderful!

And good point. I've changed it so that it's now listed as "Unspecified" in the drop down instead, and uploaded the new version in the releases page.

Thank you for reporting the bug and helping out!