fbpx


The MIDI Forum

  Thursday, 05 August 2021
  12 Replies
  0.9K Visits
0
Votes
Undo
  Subscribe
I have a file I am running through my editor. It should be adding missing program changes and bank selects.

In the middle of one track, there is this:
[20659] 6220: 95 34 00 -- Note Off
[20663] 10050: b5 00 00 -- Bank Select MSB
[20667] 10080: 95 3b 41 -- Note On

and a little further on, still the same track
[21461] 17740: 95 34 00 -- Note Off
[21465] 21570: b5 00 00 -- Bank Select MSB
[21469] 21600: 95 3b 41 -- Note On
There is no program change anywhere in the remainder of the track.

My instrument detection code relies on either A) a defined program change, or B) a NOTE ON on a track that does not yet have a program change present. Since this track does indeed have a program change at the beginning of the track, it seems that I do not pick up these rouge Bank Selects. Because they have no following program change, they do nothing anyway, correct?

I'm wondering if I should try to get my editor to pick them up, or if I should just leave it as is since the original file had non-functionable bank selects in it to begin with.

The beginning of that track has this, just FYI. Before and after running through my editor.
[20018] MTrk:
[20027] 0: ff03 -- Sequence Name: Funk Guitar
[20042] 0: ff04 -- Instrument Name: & Muted Guitar
[20060] 0: b5 79 00 -- Reset All Controllers
[20064] 0: b5 5d 50 -- Effects 3 Depth
[20067] 0: b5 5b 7f -- Effects 1 Depth
[20070] 0: b5 07 64 -- Channel Volume MSB
[20073] 0: b5 00 08 -- Bank Select MSB
[20076] 0: c5 1c -- Program Change
[20080] 900: 95 34 55 -- Note On


[20038] MTrk:
[20047] 0: ff03 -- Sequence Name: Funk Guitar
[20062] 0: ff04 -- Instrument Name: & Muted Guitar
[20080] 0: b5 79 00 -- Reset All Controllers
[20084] 0: b5 5d 50 -- Effects 3 Depth
[20087] 0: b5 5b 7f -- Effects 1 Depth
[20090] 0: b5 07 64 -- Channel Volume MSB
[20093] 0: b5 00 08 -- Bank Select MSB
[20096] 0: b5 20 00 -- Bank Select LSB
[20100] 0: c5 1c -- Program Change
[20104] 900: 95 34 55 -- Note On
more than a month ago
·
#10046
0
Votes
Undo
Jason,

Maybe the midi file you're testing has been used with other hardware that dis support bank selects, but has then been used with a setup that did not (or did less so) and bank selects were disabled but not completely.

However, yes, as you say, the bank select is not implemented until the Program Change command is supplied, so if there is no PC then the BS does nothing. Just for tidyness (and to avoid any confusion) if a PC command is removed then any associated BS commands should be removed as well - but maybe someone didn't know that?

Geoff
more than a month ago
·
#10053
0
Votes
Undo
It's possible. I am testing with a bunch of files downloaded from random places on the internet. I have come across some real doozies that were either made with a bad piece of software, or were improperly edited at some point in their lifetime. One particular file has 1931 bank selects(!!!) (a random mixture of repeating MSBs and LSBs) and 509 program changes, most of which are grouped together in 3s or 4s setting the same instruments over and over on the same channels. Another had the entire file duplicated within itself, so it had 21 tracks, and then those same 21 tracks added to the end. Others, like ones I made using someone's video game music conversion app, are full of invalid values for a bunch of things (values > 127 for things like volume). I'm slowly weeding out the bad eggs, but leaving a few that I think might be useful for testing robustness of my editor.
2 weeks ago
·
#10507
0
Votes
Undo
Thanks for the idea :)
I have added warnings about the unused Bank/RPN/NRPN in the latest version of https://github.com/jazz-soft/test-midi-files
Please check it out!
2 weeks ago
·
#10538
0
Votes
Undo
Thanks for the idea :)
I have added warnings about the unused Bank/RPN/NRPN in the latest version of https://github.com/jazz-soft/test-midi-files
Please check it out!
Haha! The first 913 lines of output for that particular file are
WARNING: offset xxxxx track x tick xxxxxx -- Obsolete Bank Select (bx x0 00 -- Bank Select xSB)
So maybe the other 1018 actually do something? :D

I'm attaching the file, in case you want to look it over to verify :p
2 weeks ago
·
#10569
0
Votes
Undo
I guess I will need to suppress the output if there are too many warnings of the same type.
Wait for the next release :)
one week ago
·
#10570
0
Votes
Undo
I guess I will need to suppress the output if there are too many warnings of the same type.
Wait for the next release :)
No, actually, I think it's important to keep them. Otherwise I wouldn't know which ones were giving the error. I was just laughing that the file is soooo messed up that that is the output of the test. I actually think maybe there should be MORE things marked, because while most of the non-errored bank selects are then followed by a program change (thus TECHNICALLY valid), they are not actually changing anything because it's the same thing 4 or 5 times, like so:

[ 368] 13888: b1 20 00 -- Bank Select LSB
[ 372] 13888: b1 00 00 -- Bank Select MSB
[ 376] 13888: b1 20 00 -- Bank Select LSB
[ 380] 13888: c1 27 -- Program Change (Synth Bass 2)
[ 383] 13888: 91 24 5f -- Note On
[ 387] 14008: 81 24 40 -- Note Off
[ 392] 14688: 91 24 57 -- Note On
[ 396] 14748: 81 24 40 -- Note Off
[ 400] 14808: 91 24 5f -- Note On
[ 404] 14928: 81 24 40 -- Note Off
[ 408] 15048: 91 24 5f -- Note On
[ 413] 15208: 81 24 40 -- Note Off
[ 418] 15528: 91 24 5f -- Note On
[ 423] 15728: 81 24 40 -- Note Off
[ 427] 15728: b1 20 00 -- Bank Select LSB
[ 431] 15728: b1 00 00 -- Bank Select MSB
[ 435] 15728: b1 00 00 -- Bank Select MSB
[ 439] 15728: b1 20 00 -- Bank Select LSB
[ 443] 15728: c1 27 -- Program Change (Synth Bass 2)
[ 446] 15728: 91 1e 5f -- Note On
[ 450] 15748: 81 1e 40 -- Note Off
[ 454] 15748: b1 20 00 -- Bank Select LSB
[ 458] 15748: b1 00 00 -- Bank Select MSB
[ 462] 15748: b1 00 00 -- Bank Select MSB
[ 466] 15748: b1 20 00 -- Bank Select LSB
[ 470] 15748: c1 27 -- Program Change (Synth Bass 2)
[ 473] 15748: 91 26 5f -- Note On

Clearly there's no point to ANY of those bank selects or program changes after 372, 376, and 380, as they are all just resetting what is already set. :p
one week ago
·
#10581
0
Votes
Undo
Nobody is going to read thousand warnings.
Please check the latest version, the output looks like this:


WARNING: offset 296 track 2 tick 11928 -- Obsolete Bank Select (b1 20 00 -- Bank Select LSB)
WARNING: offset 300 track 2 tick 11928 -- Obsolete Bank Select (b1 00 00 -- Bank Select MSB)
WARNING: offset 368 track 2 tick 13888 -- Obsolete Bank Select (b1 20 00 -- Bank Select LSB)
WARNING: offset 427 track 2 tick 15728 -- Obsolete Bank Select (b1 20 00 -- Bank Select LSB)
WARNING: offset 431 track 2 tick 15728 -- Obsolete Bank Select (b1 00 00 -- Bank Select MSB)
WARNING: offset 454 track 2 tick 15748 -- Obsolete Bank Select (b1 20 00 -- Bank Select LSB)
WARNING: offset 458 track 2 tick 15748 -- Obsolete Bank Select (b1 00 00 -- Bank Select MSB)
WARNING: offset 516 track 2 tick 17548 -- Obsolete Bank Select (b1 20 00 -- Bank Select LSB)
WARNING: offset 520 track 2 tick 17548 -- Obsolete Bank Select (b1 00 00 -- Bank Select MSB)
WARNING: offset 535 track 2 tick 17668 -- Obsolete Bank Select (b1 20 00 -- Bank Select LSB)
and 903 more of "Obsolete Bank Select" ...


Question for native English speaker: is there a better word to use instead of "Obsolete"?
one week ago
·
#10582
0
Votes
Undo

Question for native English speaker: is there a better word to use instead of "Obsolete"?


Unnecessary or redundant.
one week ago
·
#10583
0
Votes
Undo
Thanks! Will change to "Unnecessary" in the next release...
one week ago
·
#10584
0
Votes
Undo
Sema,

Maybe the more accurate word here would be superfluous.

I assume that the first instance of each message (regarding a specific BS/PC) would be retained, it's just the repeats of the same message that are not required.

Redundant would be more appropriate than unnecessary, but superfluous would be slightly more accurate?

Geoff
one week ago
·
#10585
0
Votes
Undo
How about "Unused" ?
one week ago
·
#10586
0
Votes
Undo
[quotePost id="10581"]Nobody is going to read thousand warnings.
[/code]
I would. :p I'm actually using it to tell me exactly where problems are so I can (try to) fix them. If it just says "903 more" then I would continuously have to fix a few, re-run the test, fix a few more, rerun the test...

By having them all there, I can see that tracks 2, 6, 7, and 9 all have a pile of extra bank selects. If it didn't show them all, I wouldn't know about 6, 7, or 9 without manually scanning through to find them myself.

But that being said, I am NOT fixing this particular file. This is just a worst-case example. And I mean worst! :D

I think "Unnecessary" gets the point across. It means "not needed".
"Redundant" means "repeated", which would not apply to a bank select that is not followed by a program change, as in my original post.
"Unused" doesn't really work, because technically they are used, they just don't do anything useful.
  • Page :
  • 1
There are no replies made for this post yet.
Be one of the first to reply to this post!