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

Support for other instrument formats part 2 #71

Open freq-mod opened 5 years ago

freq-mod commented 5 years ago

Since OPN instrument format support was brought back, it seems that there are more formats that could be supported here:

examples.zip

jpcima commented 5 years ago

S98 is already supported in the importer, having 2612 and 2608. In principle it supports OPL chips too, let me know if you have some.

EDIT and OPM, for which we can implement OPN2BankEditor its own support

freq-mod commented 5 years ago

Ah, I forgot that there is a support for S98 already, sorry about that.

EDIT and OPM, for which we can implement OPN2BankEditor its own support

Isn't OPM supported already? Do you rather mean, in context of YM2151 chip support?

jpcima commented 5 years ago

Isn't OPM supported already? Do you rather mean, in context of YM2151 chip support?

YM2151 instruments have a potential to translate to the OPN because of similarity. What I mean: it's an idea to import YM2151 from the VGM and S98.

Btw, @Wohlstand has just merged the VGM for YM2608.

freq-mod commented 5 years ago

As for 2151, I can't find any .s98 log of any OPM music, only VGMs. Right now, YM2151 VGMs are actually recognized by a bank editor (i.e. no error comes up) but editor doesn't see any instrument inside it

jpcima commented 5 years ago

For this, the VGM importer needs to handle the opcode 0x54, and transmit this to a simulated OPM chip. It's similar to RawYm2612ToWopi in the principle, except not implemented at the moment.

freq-mod commented 5 years ago

BTI works fine (as of now it reads FM instruments only) but it would be neat to support BTM modules import as banks, if it would be possible.

jpcima commented 5 years ago

Yes definitely, I've wanted to do this too after BTI was added. Also Rerrah has released the new specification 1.2.0 which makes it needed to update BTI for this.

freq-mod commented 5 years ago

I forgot about it, but YM2151 VGM/VGZs now work! The only things left are BTI v1.2 and BTMs, that will also solve "Add support for OPNA-specific bank / instrument file formats are also can be used here" task from #46 I think.

farvardin commented 5 years ago

MML support would be great to be able to use OPN2BankEditor as a sound editor for this format.

This tool (dmf2pmd.py) https://gist.github.com/Pigu-A/a51a4f3b83a238579e225e06098ba4e7 can already convert from a Deflemask module into MML, including instrument support.

freq-mod commented 5 years ago

I have some problems with importing FM instruments from a certain batch of YM2151 VGMs - bank editor recognizes them as legit VGMs, but doesn't see any instruments in it, yet they're clearly there. example - 07 Easy To Go [Stage 1 Manhattan City].zip

jpcima commented 5 years ago

@papiezak Correct, it seems this VGM is incorrectly read. I'm going to check it.

@farvardin I totally forgot of MML also because of doing other things. Are there collections of samples of these? (and the other text formats)

jpcima commented 5 years ago

@papiezak Fixed VGM at commit a0126bc

freq-mod commented 5 years ago

Are there collections of samples of these? (and the other text formats)

mmltexts.zip Here are examples of several mml formats:

P.S: thanks for the fix.

jpcima commented 5 years ago

It's neat, thanks for these. I've got to check if my parser is able to handle the whole set of these.

farvardin commented 5 years ago

Nice samples papiezak!

Here is also a working example of one of my tune, with full source and compilation process, if you need to try with pmd98, just type make compile and make play (there is also a player, using wine):

http://garvalf.online.fr/var/upload/temp/pmd98_201907.zip

freq-mod commented 5 years ago

just type make compile and make play

@farvardin, yeah, but DOSbox is needed to compile the track... but it works nevertheless.

jpcima commented 5 years ago

It's very interesting. Thanks for sharing it.

Another thing about VGM I just remembered; it's the support of dual FM chips. It's an element of VGM specification which @Wohlstand has implemented in OPNMIDI-based midi2vgm: there exist a secondary opcode which calls the second chip, and this VGM import doesn't handle it.

VGMrips has some arcade systems with dual chip configuration.

jpcima commented 5 years ago

Many text formats are implement in the PR #82. I am apparently able to load PMD instruments from all of the samples.

The functionality is found under the "Convert" drop-down. It adds the conversions in both directions, and it uses the system clipboard.

freq-mod commented 5 years ago

Thanks for all the great work @jpcima! There is one small catch though - in some .mmls there are PMD instuments of following format: @12 4 7 21 4 2 4 2 40 0 12 3 0 0 24 12 4 6 2 0 0 4 7 0 1 21 4 2 4 2 35 0 6 7 0 0 24 12 4 6 2 0 0 2 3 0 1 They aren't imported properly in bank editor, paramenters are wrongly interpreted. OPNI of how this instrument should be - @12.zip

jpcima commented 5 years ago

@papiezak it has 4 excess numbers in comparison to PMD samples I examined. Is this another variant? maybe it's a OPM form of PMD ?

freq-mod commented 5 years ago

@jpcima, no, it's from an OPNA song

freq-mod commented 4 years ago

@jpcima, sorry to report, but .BTI instruments import don't work anymore. Newest .bti spec is 1.4.0, trying to import it throws error about bad file format.

Wohlstand commented 3 years ago

At MML (the MML2VGM) the instrument name is supported:

'@ L4 0 "<Instrument Name Here>"