Wohlstand / libADLMIDI

A Software MIDI Synthesizer library with OPL3 (YMF262) emulator
GNU Lesser General Public License v3.0
170 stars 17 forks source link

Implement an alternative format of `banks.ini` to allow easier remove/reorder of banks without dealing with ordered numbers #253

Open mmontag opened 2 years ago

mmontag commented 2 years ago

A while back you said bank IDs in the banks.ini need to be continuous (e.g., [bank-0], [bank-1], [bank-2], etc.) but this makes banks.ini hard to edit (well, in my case... I won't touch it).

Any chance to fix this quirk?

Wohlstand commented 7 months ago

You could make a new, your own, banks.ini file and supply it as CMake argument, you don't need to take my original one and inherit it for your needs, you can just make yor own one. It should work.

Wohlstand commented 7 months ago

I also forgot to note: that original banks.ini file is designed to hardly link ID of each bank, because IDs of every bank should not being changed during removing of any bank from the middle. That's required for backward compaitibility with software that expects certain built-in bank ID for the use instead of using the supplied WOPL file.

Wohlstand commented 7 months ago

Anyway, a question: is this still being needed?

mmontag commented 7 months ago

Thanks, you can close based on your advice to create my own banks.ini. However, my-custom-banks.ini is still hard to edit, so I wish the bank ID number was optional/implicit.

Wohlstand commented 7 months ago

Again, the reason why bank id is required - to ensure the full backward compatibility between previous versions (supposed to don't pop entries from a middle, but replace them with others without breaking a count, or append new to end of the whole list, again, to preserve previous IDs being not changed). I can understand if you trying to re-order banks according your tastes or ideas, and this concept needs a different thing, so, I can agree. Alternative solution: you may want to convert all banks into WOPL format, and then, supply each of them via adl_openBankData() call rather than use embedded banks (you may want to completely disable use of embedded banks then [by related CMake argument]). I'll remain this open and I'll try to implement a kind of the second format (I'll add the field into header section to specify what format should be used).