Wohlstand / OPL3BankEditor

A small cross-platform editor of the OPL3 FM banks of different formats (Downloads in README below)
GNU General Public License v3.0
143 stars 12 forks source link

Instrument names are truncated to 9 characters instead of 8 when converting to IBK #204

Closed SenhorFlibble closed 1 year ago

SenhorFlibble commented 1 year ago

I've been playing around with DMXOPL banks, trying to make them work in MBF 2.04 (Doom source port), and I noticed that while I can load GENMIDI.op2 from the DMXOPL project and save it as IBK, the instrument names are truncated to 9 characters, whereas the original format only allows for 8 characters max, as described here.

While this does not seem to affect how the actual instruments work in IBK, the files thus generated are not opened correctly by other utilities like SBTimbre. Only if I manually correct all instrument names not to exceed 8 characters, can IBK files generated by OPL3BankEditor (I'm using version 1.5.1 for Win32) be properly recognized by SBTimbre.

(I'm not suggesting that this is an important feature, but making generated IBK files accurate to their original specs would be neat.)

Wohlstand commented 1 year ago

Lemme check the thing... Seems a small mistake in the code...

Wohlstand commented 1 year ago

Just now I made a small fix that should fix this problem: I actually forgot to write a terminator to 9'th byte which should properly truncate the instrument name to 8 characters.

Wohlstand commented 1 year ago

Please try to test out the CI-built version (you will find links in the ReadMe) document, it should work properly now.

Wohlstand commented 1 year ago

@SenhorFlibble, Did you tested this?

Wohlstand commented 1 year ago

Okay, I closing this.

SenhorFlibble commented 1 year ago

@SenhorFlibble, Did you tested this?

I just ran a little test, some names are now truncated properly, but there's a another issue: some instrument names are not displayed at all for some reason: sbtimbre_013 Here's what these looks like in the editor, there's a non-truncated name on the list and no name in the editing field: missing_instrument_names

Wohlstand commented 1 year ago

This is another, unrelated issue, when name was blank, and OPL3-BE showing default MIDI names only (not custom). These names are just empty, unfilled, and OPL3-BE showing default MIDI name as a fallback when instrument name is empty.

Wohlstand commented 1 year ago

I could allow (separately) auto-filling of empty names using a shorten variants.