Skip to main content

MML Parser and Player for Python

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

Installation

pip install mmlparser

Examples

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/simple_player.py plays musical notes with MMLParser.play() 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/async_player.py for some examples.

python -m mmlparser.examples.async_player

Limitations

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

Release files for mmlparser 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mmlparser 0.3.0
File Size Uploaded
mmlparser-0.3.0.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mmlparser 0.3.0
File Interpreter ABI Platform
mmlparser-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.7 kB

Release files / mmlparser-0.3.0.tar.gz

Download URL mmlparser-0.3.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
21ee4538f12a362ebf3e4bb64f8a882b6215ddba8504ffe34377912258252d04
BLAKE2b-256 checksum
How to use checksums
b5b2440fd71c7ab5e5c102f58651b0ae1b6ea6e8e4746a8764fa3ece64149bdc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release files / mmlparser-0.3.0-py3-none-any.whl

Download URL mmlparser-0.3.0-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ebcc8d6409e1280c89ecb088d9d747f2c878e720b777e37130b485ae9e67eb19
BLAKE2b-256 checksum
How to use checksums
f1ebfd40b46c650e6deb80fba121750f1e6671e813037b297a6049bd414ddf54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page