Skip to main content

MML (Music Macro Language) parser and player for Python

Project description

MML Parser and Player for Python

Python-based MML (Music Macro Language) parser and player.


pip install mmlparser


Examples, as well as simple songs written in MML, can be found in the directory mmlparser/examples, which can be played directly from a command line.

python -m mmlparser.examples.simple_player

To actually play the song, install pyrtmidi and make sure at least one MIDI output is available. The notes will be sent to the MIDI out device.

pip install rtmidi
python -m mmlparser.examples.simple_player

The code in examples/ plays musical notes with method, which relies on the blocking time.sleep() function. The async version, MMLParser.aplay(), may be used to play music concurrently with other asyncio tasks. See examples/ for some examples.

python -m mmlparser.examples.async_player


  • Triplets are not yet supported.
  • User event and repeat commands are not supported.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mmlparser, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size mmlparser-0.3.0-py3-none-any.whl (8.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size mmlparser-0.3.0.tar.gz (4.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page