fbpx
Skip to main content

MIDI Forum

Verifying validity ...
 
Notifications
Clear all

Verifying validity of a MIDI file (Windows)

21 Posts
3 Users
0 Reactions
7,894 Views
Jason
Posts: 441
Honorable Member
Topic starter
 

It is Notepad++. It has a "compare" plugin that will find the differences between two text files.

I use the print option of test-midi-files and save the output in to a text file.

I do it for the original midi file, and my modified midi file.

Then I run them through the compare plugin, and it shows me where there are differences between the two files. That's how I was able to sort out that my inserts were going wrong sometimes, or that it works correctly. (Plus the warnings at the top of the files when test-midi-files detects a problem)

 
Posted : 04/07/2021 7:42 am
Jason
Posts: 441
Honorable Member
Topic starter
 

So in that screenshot, you can see the test-midi-files output for the original file on the left, and my modified file on the right. If there are new lines in the text file, it colors them green. It also marks differences in similar lines around it.

So in that screenshot, I should have had a Bank Select MSB and Bank Select LSB in both of the green areas. But my positioning was off with some of my code, so the results came out unexpected for the first one (Bank MSB, Undefined, General Purpose Controller)

Unfortunately, with the byte offset added in to the text files now, it's much harder for the plugin to track these differences, and I copied over the previous install of test-midi-files, so I no longer have it :p So having it as an option instead of always on (maybe an option to disable it but leave it on by default, like --nobyteoffset) would help if I need to do future comparisons.

 
Posted : 04/07/2021 7:53 am
Jason
Posts: 441
Honorable Member
Topic starter
 

I was able to recover the previous "no byte offset" version from a restore point, so I have them both now. But an option would be great 😀

 
Posted : 04/07/2021 8:03 am
Sema
 Sema
Posts: 182
Reputable Member
 

[quotePost id=9627]I was able to recover the previous "no byte offset" version from a restore point, so I have them both now. But an option would be great :D[/quotePost]
That was a smart solution 🙂
There is another script at https://github.com/jazz-soft/JZZ-midi-SMF that can print MIDI file without the offsets: `node test.js yourfile.mid`

 
Posted : 04/07/2021 9:38 am
Sema
 Sema
Posts: 182
Reputable Member
 

Please check out the latest version, it has two options now:
'print' -- print without the offset
'inspect' -- print with the offset

 
Posted : 10/07/2021 6:48 pm
Jason
Posts: 441
Honorable Member
Topic starter
 

Thanks! I'll check it out in the next few days. I assume it will work just as well as before 😉

 
Posted : 10/07/2021 8:36 pm
Page 2 / 2
Share: