adplug / adplay-unix

AdPlug's UNIX console-based frontend
GNU General Public License v2.0
12 stars 15 forks source link

[FR] output to midi #7

Closed ildar closed 7 years ago

ildar commented 7 years ago

is it possible to do midi output? Either file→file or file→synth or both?

Malvineous commented 7 years ago

Not really, because OPL is very different to MIDI. There are other tools like DRO2MIDI that can convert some OPL formats to MIDI, but they require a fair bit of effort to get decent sounding MIDI versions. If you can get AdPlug to write to .raw and then use DRO2MIDI on that, you should be able to get some sort of MIDI version of a song AdPlug can play. The hardest part is figuring out which of the trillions of different OPL instruments should map to which of the 128 MIDI ones.

ildar commented 7 years ago

🙂 I understand it better now, thank you. I suggest we can close it for now, if you don't mind. Though I think the output with messy instruments could be somewhat useful, but I can't ask about it as I myself not quite ready to experiment with it right now. Thanks again.

Malvineous commented 7 years ago

No worries. I think this kind of conversion doesn't really belong in a music player though. There are plenty of other programs that can do a much better job :-)

ildar commented 6 years ago

BTW it seems that chiptunes are more straightforward to convert to Module files then MIDI. E.g. a brilliant converter SPC to module: https://github.com/uyjulian/spc2it

Malvineous commented 6 years ago

Most music formats are better suited to direct conversion. The problem is that AdPlug is designed to "convert" every format into OPL data for playback, and further converting this OPL data into MIDI or any other notation-based format is tricky. In order to convert it directly to another format, all the code for every single file format would have to be rewritten.

For my own libgamemusic project I wanted to be able to perform file format conversions so it was designed from the ground up with this in mind, which means playback is a little more difficult but conversion is much easier and more reliable.

But even with this method, you are still faced with manual work like selecting which OPL instruments should be replaced with which MIDI ones, so it's never going to be fully automatic.