jpcima / ADLplug

FM Chip Synthesizer — OPL & OPN — VST/LV2/Standalone
Boost Software License 1.0
425 stars 22 forks source link

Proper way to get and load instruments from DOSBox? #46

Closed ghost closed 5 years ago

ghost commented 5 years ago

Hi. What is the most straightforward way to grab instruments from dosbox game and load one into ADLplug instance?

With JuceOPLVSTi its the following:

  1. Use DOSBox 0.72 to grab OPL data into DROv1 file
  2. Use dro2midi to get SBI instruments from DROv1 file
  3. Load desired instrument into JuceOPLVSTi instance

What would you recommend to accomplish this task when using ADLplug? With current dro2midi solution the drawback is that DROv2 format is not supported, so one needs to use an archived version of dosbox.

jpcima commented 5 years ago

Hello @gnidorah. The software is able to load SBI instruments directly (load instrument file).

For DOS games, there is a probability that the collections of instruments are accessible as files that OPL3BankEditor can recognize and then convert, you should try this first.

I'm not familiar yet with dro files and the dro2midi tool. Let me examine drov2 and see what I can do. It must be feasible to implement dro in the bank editor, I will study this.

ghost commented 5 years ago

@jpcima With other utility (dro2imf) I was able to get instruments:

  1. Use recent DOSBox to grab OPL data into DROv2 file
  2. Use dro2imf -type 1 to convert dro into imf file
  3. Open imf in OPL3BankEditor and export an instrument to be used with ADLplug But yes, native dro support in OPL3BankEdtior would be cool :-)
jpcima commented 5 years ago

But yes, native dro support in OPL3BankEdtior would be cool :-)

I programmed in OPL3BankEditor an Experimental importer of DRO v1&v2. It's largely untested, feel free to give a try anyway and offer feedback. It's available under the "Fresh dev builds".

You may access it by : File→Import instruments→Open bank DOSBox Raw OPL will be available in the choices.

If you want to help, you're welcome to post some samples.

ghost commented 5 years ago

@jpcima Thank you very much for your hard work!!! I will test, however holidays here in Russia are over, so I will be slow :disappointed: An unrelated question, do you know how to start dosbox dro capture in Linux? For me it only works in Windows. In Linux ctrl+alt+f7 doesn't start dro capture and I've tried different WM/DE.

ghost commented 5 years ago

From what I have here, Ultima VI Bootup and Main theme. Bootup (single instrument) is all fine both versions, Main has differences in some instruments in comparison to dro2midi/dro2imf (I should check gamemus though), but I don't find these instruments useful, meaningful instruments are correct. Let me know if you need files.

jpcima commented 5 years ago

An unrelated question, do you know how to start dosbox dro capture in Linux? For me it only works in Windows. In Linux ctrl+alt+f7 doesn't start dro capture and I've tried different WM/DE.

This would for sure be a problem, considering Linux reserves to itself the shortcuts ctrl+alt+Fn. I've not used the regular DOSBox, I used instead the DOSBox-X fork on Linux which has the capture option in the regular menu.

Let me know if you need files.

It will be appreciated. I have not taken time to populate OPL3BankEditor/Bank_Examples/DOSBox with some captures of my own; these are just samples I took from the adplay software.

jpcima commented 5 years ago

@gnidorah Here's the method to capture OPL in normal DOSBox.

You get into Key Mapper by a press of the Ctrl+F1 combination. Select the command "Cap OPL". Here, you can uncheck mod1/mod2 which stand for ctrl/alt (not sure which is). Then OPL capture will respond to the key F7 (or you can assign another).

capture du 2019-01-10 00-42-16

ghost commented 5 years ago

@jpcima Thank you! Here is the issue I've got. Lets take a single-instrument track from ultima6 as most simple case. I've tried to grab it on windows and linux dosbox multiple times (using dosbox 0.74-2 everywhere), and by some reason OPL3BankEditor always read linux capture incorrectly, while windows capture is read ok (4 instruments which don't match original versus 1 matching instrument). If I however convert linux capture into imf by dro2imf utility, OPL3BankEditor reads instrument from that imf correctly. Here are the files for demonstration: 1.zip

jpcima commented 5 years ago

I opened the issue over at https://github.com/Wohlstand/OPL3BankEditor/issues/126 Let's have the discussion over there where it's more relevant, and don't forget to subscribe on this other issue.

ghost commented 5 years ago

Thanks!