Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mmftool

mmfplayer powered by M5_Emu*.dll for cross compiling on macos.

Goal

run on jDosbox

Install

build

$ brew intall mingw-w64
$ git clone ...
$ make

Usage

prepare

DefMA3_16.vm3
M5_EmuHw.dll
M5_EmuSmw5.dll

run

gui

$ brew intall wine-crossover
$ MMFTOOL_MASTER_VOLUME=20 wine mmftool.exe

cli

$ brew intall wine-crossover
$ MMFTOOL_MASTER_VOLUME=20 wine mmftoolc.exe foo.mmf

environment variable

  • MMFTOOL_MASTER_VOLUME ... player volume 0 to 127
  • MMFTOOL_MIDI_CSV ... 1 to 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 before EmuInitialize.
  • MMFTOOL_TELEMETRY ... 1 to say what is being played, for a host program that is watching (mdplayer draws a visualizer from it). See below.

telemetry

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.

References

TODO

  • make M5_Emu*.dll architecture independent like this

About

🎹 mmfplayer powered by M5_Emu*.dll for cross compiling on macos

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages