View on GitHub

cat-play-mml

cat-play-mml

cat-play-mml

Japanese English

🎵 Music Macro Language (MML) Parser and Player

| Item | Link | |——|——–| | 📊 Development Status | generated-docs/development-status |

Overview

cat-play-mml is a CLI tool that plays music using Music Macro Language (MML). Inputting the string cde will play the “do-re-mi” musical notes. It is for Windows and written in Rust.

Status

Features

Quick Start Guide

Environment Setup

Installation

cargo install --force --git https://github.com/cat2151/cat-play-mml.git

That’s it! It will be installed on your Windows machine directly from GitHub.

Playing Music

cat-play-mml cde

Do-Re-Mi will play.

Key Features

Usage

Basic Usage (Automatic Server Startup)

cat-play-mml cde

Upon first execution, the server automatically starts in the background, and music playback begins. The command immediately exits, allowing you to input the next command.

For subsequent executions, it sends the music to the already running server:

cat-play-mml efg

Server Control

Stop playback:

cat-play-mml --stop

Shut down the server:

cat-play-mml --shutdown

Check for new builds:

cat-play-mml check

Start self-update:

cat-play-mml update

Manual Server Startup (Advanced Users)

cat-play-mml --server

What is MML (Music Macro Language)?

MML is a language for describing music using text. It uses the following notation:

Technical Details

Architecture

  1. Parser: Uses tree-sitter to convert MML text into an AST.
  2. Intermediate Representation: Converts AST into musical data structures.
  3. Audio Generation: Generates audio waveforms from the intermediate representation.
  4. Playback: Outputs audio using an audio library.

Development Environment

Libraries Used

Project Goals

Top Priority Goals

Next Goals

Out of Scope

cat-play-chord (Under Consideration)

cat-play-chord is a project (under consideration) that generates and plays MML from chord notation using chord2mml.

Future Outlook for MML to SMF

SMF to Nuked-OPM friendly JSON (Under Consideration)

Nuked-OPM friendly JSON player

Real-time FM Tone Editor

Proposal, Draft

Proposal, Draft

cat-edit-mml

Additional Notes

For Developers: How to Build, Install, and Run

# Build & Run *In the cloned directory*
cargo run --release cegb

# Install *In the cloned directory*
cargo install --path .

# Run *Once installed, you can run it from any directory like this*
cat-play-mml cegb

License

This project is licensed under the MIT License.

*The English README.md is automatically generated by GitHub Actions using Gemini’s translation based on README.ja.md.