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 music “do-re-mi”. It’s for Windows and written in Rust.

Status

Features

Quick Start Guide

Environment Setup

Installation

cargo install --git https://github.com/cat2151/cat-play-mml.git --branch main --bin cat-play-mml

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

Playback

cat-play-mml cde

“Do-re-mi” will play.

Key Features

Usage

Basic Usage (Automatic server startup)

cat-play-mml cde

The first time you run it, the server will automatically start, and playback will begin in the background. The command will exit immediately, allowing you to enter the next command.

For subsequent executions, it sends playback data 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

Manual Server Startup (Advanced)

cat-play-mml --server

What is MML (Music Macro Language)?

MML is a language for describing music using text. It uses notations such as:

Technical Details

Architecture

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

Development Environment

Libraries Used

Project Goals

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

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 released under the MIT License.

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