Wohlstand / OPN2BankEditor

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

TextFormat: support FMP4 format as well as existing FMP7 format #99

Closed atsushieno closed 4 years ago

atsushieno commented 4 years ago

context: https://github.com/Wohlstand/OPN2BankEditor/issues/81 / https://github.com/Wohlstand/OPN2BankEditor/pull/82

In FMP distribution from 199x, there was a default template bank definition file (88NEIRO.TPI) whose format was like this:

"Harpsichord
'@ 0
   AR DR SR RR SL TL KS ML DT
'@ 31,12, 4,10, 1,32, 0,12, 0
'@ 31, 2, 4, 6,15,57, 3,15, 1
'@ 31,12, 4, 6, 0,30, 0, 1, 0
'@ 31, 5, 7, 7, 2, 0, 2, 3, 4
'@ 2,7

On the other hand, this is what we see from "Copy to FMP":

'@ FA 0
'@   0,  0,  0,  0,  0,  0,  0,  0,  0,   0
'@   0,  0,  0,  0,  0,  0,  0,  0,  0,   0
'@   0,  0,  0,  0,  0,  0,  0,  0,  0,   0
'@   0,  0,  0,  0,  0,  0,  0,  0,  0,   0
'@   0,  0

There are some notable differences, but so far what I find annoying is that the last parameter (AM/DT2) was optional in the original format, while it was mandatory without this fix.

jpcima commented 4 years ago

Hello. Under the PMD textformat, you maybe noticed that there exists 2 variants. (createPmdOpnFormat/createPmdOpmFormat) Since DT2 is specific to OPM chips, perhaps it's the same case here?

In this case perhaps we want "FMP (OPN)" and "FMP (OPM)" as distinct formats, the same as PMD.

atsushieno commented 4 years ago

Hmm maybe...? I didn't notice those two PMD formats. I only know much about FMP - IIRC DT2 was introduced in much later versions of FMP4.x, and when it was introduced it was optional for (obviously) backward compatibility.

Looks like you reference the syntax from FMP7 when you mention OPM as well as OPN. They seem have different syntaxes. There was no "FA" part in FMP4 and thus it brings incompatibility with older tone definition files.

jpcima commented 4 years ago

Now you mention it, that's familiar indeed. I saw distinctions between formats FMP and FMP7. (Bambootracker-related probably) So what we have currently as "FMP" that's FMP7, and your harpsichord above is FMP4? Then we likely have to do 2 distinguished formats for these cases.

atsushieno commented 4 years ago

Okay, based on your feedback and some official FMP7 docs - I took advantage of being able to read Japanese :-), I have made changes and now there are three formats. It does not really support OPM (see the commit message for the details) but does not lose any existing feature.