Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Audio MML Music Macro Language in Unity

Discussion in 'Audio & Video' started by dpoly, Jan 10, 2023.

  1. dpoly

    dpoly

    Joined:
    Nov 10, 2016
    Posts:
    35
    The aim is to play music/sound effects defined in MML (text files for ancient 8-bit chiptunes) in Unity, either interpreting the codes or perhaps converting to MOD files on the fly.

    It was very popular in Japan, there are online converters, but I can't find any software or tools to do even half the job.

    Any suggestions welcome. The reasons for wanting to use MML are solid, so that's not really up for debate.
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,992
    check github for anything related (or something that at least converts to another format, which might be then easier to use)
    if could find c# or c++ libraries, could try calling them from unity:
    https://github.com/Enichan/textplayer
    https://github.com/captainys/MMLPlayer
    https://edugit.org/Teckids/hacknfun/libs/mmllib
    https://www.posemotion.com/macrotune/ *export wav, and some dll files for devs?

    for those online converters,
    could probably make some script that uploads your file there and downloads results..
     
  3. dpoly

    dpoly

    Joined:
    Nov 10, 2016
    Posts:
    35
    Thanks! From what I see
    • textplayer is just the parser, no output
    • MMLplayer generates wave files
    • mmlib is Python, and seems to target low level hardware
    • macrotune is a desktop program oriented towards composing and editing.
    So MML parsers exist (but it's pretty easy anyway). Maybe I need to focus on how to create MOD files by API, and just write the parser myself. I can't find that either so far.
     
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,992