munt / munt

A multi-platform software synthesiser emulating pre-GM MIDI devices such as the Roland MT-32, CM-32L, CM-64 and LAPC-I. In no way endorsed by or affiliated with Roland Corp.

Home Page:http://munt.sourceforge.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve ROM files loading algorithm in the SMF2WAV conversion command-line tool

sergm opened this issue · comments

Current behaviour

Currently, the tool is only capable of searching two sets of ROM files in a specified directory. These two sets have hard-coded names ["CM32L_CONTROL.ROM", "CM32L_PCM.ROM"] and ["MT32_CONTROL.ROM", "MT32_PCM.ROM"], yet the CM32L files take priority over the MT32 ones. There is no check implemented wrt. correspondence these filenames to the actual machine model. Also, the priorities are hard-coded, it is not possible to make the tool load the MT32 files in case the CM32L files are present in the same directory.

Desired behaviour

The tool should feature a ROM scanning function. It should be capable of searching in a specified directory and loading ROM files for a particular machine model regardless of filenames. A new command-line option (e.g. -i / --machine-id) should be introduced for specifying either the exact desired machine model or a pattern. The backend for this feature becomes available in libmt32emu with #47.

  • When the exact machine model is specified, the corresponding ROM files of all known types (including full and/or partial ROM images) should be searched for and loaded into the emulation engine. All other irrelevant files in the directory should be ignored.
  • When a pattern is specified (or, by default, any available ROM set is searched for), the CM-32L ROMs should still have higher priority that MT-32 ROMs, yet higher control ROM version should always win if multiple are available.

Upon successful startup, the tool should indicate the machine model, for which the ROM files have been loaded and are being used.