mmfplayer powered by M5_Emu*.dll for cross compiling on macos.
run on jDosbox
$ brew intall mingw-w64
$ git clone ...
$ makeDefMA3_16.vm3
M5_EmuHw.dll
M5_EmuSmw5.dll
$ brew intall wine-crossover
$ MMFTOOL_MASTER_VOLUME=20 wine mmftool.exe$ brew intall wine-crossover
$ MMFTOOL_MASTER_VOLUME=20 wine mmftoolc.exe foo.mmfMMFTOOL_MASTER_VOLUME... player volume 0 to 127MMFTOOL_MIDI_CSV...1to output score by midi csv style (gui only)MMFTOOL_SAMPLE_RATE... what the dll synthesizes at; only 22050, 32000, 44100 and 48000 work, and anything else is refused rather than played as silence. Read beforeEmuInitialize.MMFTOOL_TELEMETRY...1to say what is being played, for a host program that is watching (mdplayer draws a visualizer from it). See below.
With MMFTOOL_TELEMETRY=1 the cli writes what it is playing to stdout, every line starting
#MT so that it can be told from the ordinary messages beside it. The whole score goes out once,
before playback, while the machine is idle; during playback nothing goes out but the position, so
that the emulated PC a host may be running this on keeps its cpu for synthesis. See telemetry.c.
| line | what it is |
|---|---|
#MT1 fmt= dbase= gbase= start= stop= |
the score follows; start is the point in the file the dll plays from, and the position below counts from there |
#MTn <ms> <ch> <key> <vel> <gate> |
a note, with the length it is held for |
#MTc <ms> <ch> <cc> <value> |
a control change |
#MTr <ms> <ch> <program> |
a program change |
#MTb <ms> <ch> <bend> |
a pitch bend, 14 bits |
#MTz <count> |
that is all of the score |
#MTs |
playing now |
#MTp <ms> |
the position, about ten times a second |
#MTe |
the song is over |
The times are the file's own, which is why start matters: a file may name a start point and the
dll begins there, so a host has to move the score back by it to have the two on one clock.
- make
M5_Emu*.dllarchitecture independent like this