{"id":44190059,"url":"https://github.com/Daninet/mtxt","last_synced_at":"2026-02-21T18:00:54.643Z","repository":{"id":325790777,"uuid":"1070244837","full_name":"Daninet/mtxt","owner":"Daninet","description":"A human-writable text format for musical notes, timing, and expression.","archived":false,"fork":false,"pushed_at":"2026-01-18T19:38:10.000Z","size":196,"stargazers_count":189,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-18T23:58:18.395Z","etag":null,"topics":["format","midi","music","notation","sheet-music","text"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Daninet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-05T15:02:01.000Z","updated_at":"2026-01-18T17:59:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Daninet/mtxt","commit_stats":null,"previous_names":["daninet/mtxt"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Daninet/mtxt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daninet%2Fmtxt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daninet%2Fmtxt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daninet%2Fmtxt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daninet%2Fmtxt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Daninet","download_url":"https://codeload.github.com/Daninet/mtxt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daninet%2Fmtxt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29689644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T15:51:39.154Z","status":"ssl_error","status_checked_at":"2026-02-21T15:49:03.425Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["format","midi","music","notation","sheet-music","text"],"created_at":"2026-02-09T17:00:39.543Z","updated_at":"2026-02-21T18:00:54.635Z","avatar_url":"https://github.com/Daninet.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# MTXT - Music Text Format\n\nMTXT is a human-editable, text-based format for representing musical performance data. It stores events with precise timing, pitch, and expression values in a simple line-based structure that's easy to edit without requiring specialized tools.\n\nThe format is designed for cases where exact performance details matter - arbitrary timings, micro-tuning, dynamic changes, and other expressive parameters. MTXT avoids binary encoding, making it suitable for manual and AI-assisted editing.\n\n## Features\n- **Beat-based**: Events are placed on fractional beats using simple decimal notation (e.g., in a 4/4 time signature, 1 beat = 1 quarter note, so 3.25 represents 3 quarter notes plus 1 sixteenth note).\n- **One event per line**: Easy to search and modify with any text editor.\n- **Human-friendly**: Use of musical note names (C4, D#3, etc.) and custom note aliases (e.g. `kick` or `Cmaj7`). Hand-crafted files are practical and expressive.\n- **Transitions**: Built-in support for gliding continuous parameters (CC, tempo) with customizable curves and timing.\n- **Real-time ready**: Supports streaming musical events and real-time data transfer with transitions and flexible timing.\n- **Microtonal support**: Built-in cents notation for notes (e.g. `C4+50`, `D4-25`) and global tuning commands for alternate tuning systems and just intonation.  \n- **Flexible organization**: Events can be written in any order in the file, with the parser handling chronological sorting.\n- **MIDI compatible**: Reference implementation includes MIDI to MTXT and MTXT to MIDI conversion.\n- **LLM compatible**: Can be easily generated and manipulated by language models.\n- **Future-proof**: Supports up to 65535 channels, arbitrary CC parameters with custom string keys and custom metadata.  \n\n## Quick Example\n```\nmtxt 1.0\nmeta global title Sunrise Melody\nmeta global author Jane Composer\n\n// Define aliases for drums and chords\nalias kick C1\nalias Cmaj7 C4,E4,G4,B4\n\n// Global tempo and time signature\n0.0 tempo 100\n0.0 timesig 4/4\n\n// Set defaults for channel, duration, and velocity\nch=0\ndur=1.0\nvel=0.8\n\n// Set voice. \"John's bright grand\" has precedence, but it falls back to a more generic \"piano\" if not found.\n0.0 voice piano, John's bright grand\n\n// Start silently\n0.0 cc volume 0.0\n\n// Fade in volume over 3.0 beats, ending at beat 4.0\n4.0 cc volume 1.0 transition_time=3.0 transition_curve=0.5\n\n// Play melody (uses default duration and velocity from above, unless overridden)\n0.0 note C4\n2.0 note G4 vel=0.5\n// Notes can be put in arbitrary order, the parser will sort them\n1.0 note E4 \n2.0 note G4 vel=0.5\n\n// Chords can also be played (defined above as an alias for C4,E4,G4,B4 notes)\n1.0 note Cmaj7 dur=2.0 vel=0.2\n\n// Tempo ramp\n8.0 tempo 120 transition_time=4.0\n\n// Microtonal note (12TET equal temperament C4 + 50 cents)\n3.0 note C4+50\n```\n\n## Rust Library and CLI Tool\n\nThis repository includes a reference implementation in Rust that provides:\n\n- **Library (`mtxt`)**: Rust crate for parsing and writing MTXT files, with MIDI conversion features.\n- **CLI tool**: Command-line utility for converting between MIDI and MTXT formats with built-in transforms. Builds can be downloaded from [releases](https://github.com/Daninet/mtxt/releases).\n\n\n### Basic Usage\n\n```bash\nmtxt input.mid output.mtxt # MIDI to MTXT\nmtxt input.mtxt output.mid # MTXT to MIDI\nmtxt input.mtxt output.mtxt --sort # transform MTXT file and sort events by time\n```\n\n### Transform Options\n\nThe CLI supports various transforms that can be applied during conversion:\n\n**Musical Transforms:**\n- `--transpose \u003cSEMITONES\u003e` - Transpose all notes by semitones (e.g., `--transpose +2` or `--transpose -12`)\n- `-q, --quantize \u003cGRID\u003e` - Quantize timing to a grid (e.g., `4` for quarter notes, `16` for 16th notes)\n- `--offset \u003cBEATS\u003e` - Offset all events by beats (e.g., `--offset 1.5`, `--offset -0.5`). Events shifted to negative times are removed.\n- `--swing \u003cAMOUNT\u003e` - Apply swing feel (0.0 to 1.0)\n- `--humanize \u003cAMOUNT\u003e` - Add timing randomization for humanization (0.0 to 1.0)\n\n**Channel Filtering:**\n- `--include-channels \u003cCHANNELS\u003e` - Include only specific channels (comma-separated, e.g., `1,2,10`)\n- `--exclude-channels \u003cCHANNELS\u003e` - Exclude specific channels (comma-separated, e.g., `1,2,10`)\n\n**File Organization:**\n- `--apply-directives` - Apply global directives to events (inline parameters)\n- `--extract-directives` - Extract common inline parameters into global directives\n- `--merge-notes` - Merge note on / off pairs into note shorthand events with durations\n- `--group-channels` - Group events by channel\n- `--sort` - Sort events by time\n- `--indent` - Enable timestamp padding\n\n---\n\n## MTXT Specification\n\n## Versioning\n\n- First line must declare version:\n  ```\n  mtxt 1.0\n  ```\n\n## Structure\n\n- A file consists of:\n  1. Version line\n  2. Global metadata (optional)\n  3. Events (can be in any timestamp order)\n\n## Timing\n\n- All times are in beats specified as fractional numbers. e.g. in a 4/4 time signature, 1 beat = 1 quarter note, so 3.25 represents 3 quarter notes plus 1 sixteenth note.\n- This allows changing the tempo and time signature without affecting the timing of events.\n- Events may appear in any order in the file; the parser will sort them before playback\n- Precision is limited to 5 decimal places (5 microseconds at 120 BPM).\n\n## Commands\n\n### version (mtxt)\n```\nmtxt \u003csemver\u003e\n```\n- Declares the file format version in the major.minor format (e.g., `mtxt 1.0`).\n- Must be the first non-comment line.\n\n### meta\n```\n// global meta (applies to the entire file and all channels)\nmeta global \u003ctype\u003e \u003cvalue\u003e\n// channel meta (applies to a single channel), starting from the specified time\n[\u003ctime\u003e] meta [ch=\u003c0..65535\u003e] \u003ctype\u003e \u003cvalue\u003e\n```\n- Adds metadata (e.g., `title`, `author`, `copyright`, `trackname`, custom types).\n- Value extends from the type to the end of the line (or until inline comment).\n- Channel is optional, if not specified it inherits the channel from the previous `ch` command. \n- Time is optional, defaults to 0.0.\n- See [Standard Meta Types](#standard-meta-types) for a list of standard types.\n- Newline characters in \u003cvalue\u003e need to be escaped to avoid breaking the syntax.\n\n#### Standard Meta Types\n\n| Type           | Description      | Example                                   |\n| -------------- | ---------------- | ----------------------------------------- |\n| `title`        | Song title       | `meta global title My Song`               |\n| `author`       | Composer/author  | `meta global author John Doe`             |\n| `copyright`    | Copyright notice | `meta global copyright © 2024 Music Corp` |\n| `composer`     | Composer name    | `meta global composer John Doe`           |\n| `name`         | Channel name     | `meta ch=1 name Lead Guitar`              |\n| `instrument`   | Instrument name  | `meta ch=2 instrument Steinway Grand`     |\n| `smpte`        | SMPTE offset     | `meta global smpte 00:00:00:00`           |\n| `keysignature` | Key signature    | `4.0 meta ch=3 keysignature C major`      |\n| `text`         | General text     | `meta text Verse 1`                       |\n| `lyric`        | Lyrics           | `5.0 meta lyric Hello world`              |\n| `marker`       | Marker/cue point | `6.0 meta marker Chorus`                  |\n| `cue`          | Cue point        | `7.0 meta cue Solo begins`                |\n| `program`      | Program name     | `meta global program Piano Ballad`        |\n| `device`       | Device name      | `meta global device OpenPiano 1000`       |\n| `key`          | Key signature    | `meta global key C major`                 |\n| `date`         | Creation date    | `meta global date 2024-01-01`             |\n| `genre`        | Musical genre    | `meta global genre Rock`                  |\n| `album`        | Album name       | `meta global album Greatest Hits`         |\n| `url`          | Related URL      | `meta global url https://example.com`     |\n| `artist`       | Performer name   | `meta global artist The Band`             |\n| `license`      | Usage license    | `meta global license CC-BY-4.0`           |\n| `generator`    | Software tool    | `meta global generator MySequencer v1.0`  |\n\n\n### ch (channel directive)\n```\nch=\u003c0..65535\u003e\n```\n- Sets the default MIDI channel for subsequent events.\n- Inline `ch=\u003cN\u003e` on events overrides the default for that event only.\n- Required before channel-dependent events that omit inline `ch`.\n\n### alias (note naming)\n```\nalias \u003cname\u003e \u003cvalue\u003e\n```\n- Defines a named alias for a note pitch or a chord.\n- `\u003cname\u003e`: Alphanumeric identifier (e.g., `snare`, `Cmaj7`).\n- `\u003cvalue\u003e`: Target note(s), comma-separated if multiple.\n- No timestamp. Applies to all subsequent events in the file until overridden.\n- Name is case-insensitive.\n- Example:\n  ```\n  alias snare C2\n  alias Cmaj7 C4,E4,G4,B4  // chord alias\n  0.0 note snare\n  1.0 note Cmaj7          // plays all 4 notes\n  ```\n\n### vel (default note-on velocity)\n```\nvel=\u003c0.0..1.0\u003e\n```\n- Sets the default note-on velocity.\n- Inline `vel=\u003cN\u003e` on `note`/`on` overrides for that event.\n\n### offvel (default note-off velocity)\n```\noffvel=\u003c0.0..1.0\u003e\n```\n- Sets the default note-off velocity.\n- Inline `offvel=\u003cN\u003e` on `note`/`off` overrides for that event.\n- Defaults to `1.0` if not set.\n \n### dur (default note duration)\n```\ndur=\u003cfloat\u003e\n```\n- Sets the default note duration in beats.\n- Inline `dur=\u003cN\u003e` on `note` overrides for that event.\n- Defaults to `1.0` if not set.\n \n### transition settings\n```\ntransition_curve=\u003cfloat\u003e\ntransition_interval=\u003cfloat\u003e\n```\n- Sets default transition parameters for `cc` and `tempo`.\n- `transition_time` must be specified per event (default `0.0`).\n- See **Transitions** section for details.\n- Defaults: `curve=0.0`, `interval=1.0`.\n\n### note (shorthand)\n```\n\u003ctime\u003e note \u003cNOTE\u003e [dur=\u003cfloat\u003e] [vel=\u003c0..1\u003e] [offvel=\u003c0..1\u003e] [ch=\u003c0..65535\u003e]\n```\n- Emits note-on at `\u003ctime\u003e` and note-off at `\u003ctime + dur\u003e`.\n- Uses defaults from `dur`, `vel`, `offvel`, and `ch` unless overridden.\n- `\u003ctime\u003e` is absolute beat `BEAT.SUB` (0-based). Example: `3.5`.\n- `\u003cNOTE\u003e` can be a standard note name or an `alias`.\n- Standard names support `C..B` with `#`/`b`, octave required (e.g., `C4`).\n  - Allowed: `C, C#, Db, D, D#, Eb, E, F, F#, Gb, G, G#, Ab, A, A#, Bb, B`\n  - **Case insensitive**: Both uppercase and lowercase are accepted (`C4`, `c4`, `Bb2`, `bb2`, `F#3`, `f#3`)\n  - Double accidentals **not allowed**.\n  - Microtonal: `+N`/`-N` cents (range `-99..+99`), applied via pitch bend. Examples: `C4+50` (50 cents sharp), `D4-25` (25 cents flat), `bb2+10.5` (10.5 cents sharp). Positive values require `+`.\n\n### on (note-on)\n```\n\u003ctime\u003e on \u003cNOTE\u003e [vel=\u003c0..1\u003e] [ch=\u003c0..65535\u003e]\n```\n- Emits a note-on only; useful for streaming.\n- Uses default `vel` and `ch` unless overridden.\n\n### off (note-off)\n```\n\u003ctime\u003e off \u003cNOTE\u003e [offvel=\u003c0..1\u003e] [ch=\u003c0..65535\u003e]\n```\n- Emits a note-off only; useful for streaming.\n- Uses default `offvel` and `ch` unless overridden.\n\n### cc (control change)\n```\n\u003ctime\u003e cc [note] \u003ccontroller\u003e \u003cvalue\u003e [ch=\u003c0..65535\u003e] [transition_curve=\u003cfloat\u003e] [transition_time=\u003cfloat\u003e] [transition_interval=\u003cfloat\u003e]\n```\n- Sends a control change. `\u003ccontroller\u003e` identifies the parameter.\n- `\u003cvalue\u003e` is `[0.0..1.0]`. Uses default `ch` unless overridden.\n- Uses global transition defaults unless overridden inline.\n- Optional `note` to apply CC to a specific note. If a note is specified, it applies to that note only.\n- When a note is not specified, it applies to all notes within a channel. \n- Arbitrary string keys can be used for custom parameters (e.g., `cc my_param 0.5`).\n\n#### Standard CC Names\n\n| Name                | Range         | Description                                                                     |\n| ------------------- | ------------- | ------------------------------------------------------------------------------- |\n| `pitch`             | `-12.0..12.0` | Pitch bend in semitones. 0=none, 1 = one semitone up, `-0.005` = half cent down |\n| `aftertouch`        | `0.0..1.0`    | Channel or Polyphonic Aftertouch                                                |\n| `vibrato`           | `0.0..1.0`    | Vibrato depth (Modulation Wheel)                                                |\n| `vibrato_rate`      | `0.0..1024.0` | Vibrato rate in Hz                                                              |\n| `breath`            | `0.0..1.0`    | Breath controller pressure                                                      |\n| `foot`              | `0.0..1.0`    | Foot controller pedal position                                                  |\n| `portamento`        | `0.0..1.0`    | Portamento glide time                                                           |\n| `volume`            | `0.0..1.0`    | Channel volume level                                                            |\n| `balance`           | `-1.0..1.0`   | Stereo balance (left \u003c 0, right \u003e 0)                                            |\n| `pan`               | `-1.0..1.0`   | Stereo panning position (left \u003c 0, right \u003e 0)                                   |\n| `expression`        | `0.0..1.0`    | Expression (secondary volume, relative to main)                                 |\n| `sustain`           | `0.0..1.0`    | Sustain pedal (damper) on/off (\u003e 0.5 is on)                                     |\n| `portamento_switch` | `0.0..1.0`    | Portamento on/off switch (\u003e 0.5 is on)                                          |\n| `sostenuto`         | `0.0..1.0`    | Sostenuto pedal on/off (\u003e 0.5 is on)                                            |\n| `soft`              | `0.0..1.0`    | Soft pedal (una corda) on/off (\u003e 0.5 is on)                                     |\n| `legato`            | `0.0..1.0`    | Legato footswitch on/off (\u003e 0.5 is on)                                          |\n| `sound_variation`   | `0.0..1.0`    | Sound variation                                                                 |\n| `timbre`            | `0.0..1.0`    | Timbre/harmonic intensity                                                       |\n| `resonance`         | `0.0..1.0`    | Resonance/Harmonic Content                                                      |\n| `attack`            | `0.0..1.0`    | Attack time                                                                     |\n| `decay`             | `0.0..1.0`    | Decay time                                                                      |\n| `hold`              | `0.0..1.0`    | Hold time                                                                       |\n| `sustain_level`     | `0.0..1.0`    | Sustain level (envelope)                                                        |\n| `release`           | `0.0..1.0`    | Release time                                                                    |\n| `cutoff`            | `0.0..1.0`    | Filter cutoff frequency (Brightness)                                            |\n| `reverb`            | `0.0..1.0`    | Reverb send level                                                               |\n| `tremolo`           | `0.0..1.0`    | Tremolo depth                                                                   |\n| `tremolo_rate`      | `0.0..1024.0` | Tremolo rate in Hz                                                              |\n| `chorus`            | `0.0..1.0`    | Chorus send level                                                               |\n| `detune`            | `0.0..1.0`    | Detune depth                                                                    |\n| `phaser`            | `0.0..1.0`    | Phaser depth                                                                    |\n| `distortion`        | `0.0..1.0`    | Distortion/Drive amount                                                         |\n| `compression`       | `0.0..1.0`    | Compression amount                                                              |\n| `local_control`     | `0.0..1.0`    | Local control on/off (\u003e 0.5 is on)                                              |\n| `polyphony`         | `1.0..1024.0` | Polyphony count (rounded to int). 1=mono                                        |\n\n### voice (instrument selection)\n```\n\u003ctime\u003e voice [ch=\u003c0..65535\u003e] \u003cvoice_list\u003e\n```\n- Sets the instrument voice for the channel.\n- `\u003cvoice_list\u003e` is a comma-separated list of voice names (e.g., `piano, acoustic piano, john's super piano`).\n- The synthesizer should use the **last** voice in the list that it supports.\n- It is recommended to use a standard voice from `instruments.md` as the first item for compatibility.\n\n\n### tempo\n```\n\u003ctime\u003e tempo \u003cbpm\u003e [transition_curve=\u003cfloat\u003e] [transition_time=\u003cfloat\u003e] [transition_interval=\u003cfloat\u003e]\n```\n- Sets tempo in BPM at `\u003ctime\u003e`.\n- Uses global transition defaults unless overridden inline.\n- By default, tempo is at 120 BPM at the start of the file.\n\n### timesig\n```\n\u003ctime\u003e timesig \u003cNUM\u003e/\u003cDEN\u003e\n```\n- Sets time signature; affects beat interpretation after `\u003ctime\u003e`.\n- By default, time signature is 4/4 at the start of the file.\n\n### tuning\n```\n\u003ctime\u003e tuning \u003ctarget\u003e \u003ccents\u003e\n```\n- By default, notes are defined with equal temperament tuning (12TET).\n- Sets the global tuning offset for a note or pitch class.\n- `\u003ctarget\u003e` can be a pitch class (e.g., `C`, `F#`) or a specific note (e.g., `C4`).\n- `\u003ccents\u003e` is in range `[-100.0..+100.0]`. Positive values must use `+`.\n- Tuning is additive: `Final Pitch = Standard Pitch + Tuning + Note Offset`.\n- Changes are instantaneous (no interpolation).\n- Specific note tuning overrides pitch class tuning.\n- Example:\n  ```\n  0.0 tuning E -13.7   // Flatten all Es\n  0.0 tuning G +3.5    // Sharpen all Gs\n  0.0 tuning E4 0.0    // Exception: E4 is standard tuning (overrides previous line)\n  ```\n\n### reset\n```\n\u003ctime\u003e reset [target]\n```\n- Resets state variables to defaults.\n- `\u003ctarget\u003e` options:\n  - `all` (default): All notes off, all controllers reset, tuning cleared on all channels.\n  - `ch=\u003cN\u003e`: Resets controllers and turns off notes on specific channel.\n  - `tuning`: Clears all global tuning definitions.\n- Example:\n  ```\n  10.0 reset all\n  12.0 reset ch=1\n  14.0 reset tuning\n  ```\n\n### sysex\n```\n\u003ctime\u003e sysex \u003chex-bytes\u003e\n```\n- Sends raw SysEx bytes (space-separated hex, including `F0`/`F7` as needed).\n- Example: `12.0 sysex F0 7E 7F 09 01 F7`\n\n### Comments\n```\n// full-line comment\n\u003ccommand\u003e // inline comment\n```\n- Everything after `//` is ignored by the parser (except for `://` in URLs).\n\n## Transitions\n\nUse transitions to glide a continuous parameter to a target value by a specific beat, with a chosen feel.\n\n- Supported on: `cc`, `tempo`.\n- Fields:\n  - `transition_curve=\u003calpha\u003e` controls the feel of the glide:\n    - `0.0` (linear): steady change from start to finish (default)\n    - `\u003e 0` (gentle start → speeds up): musical \"ease-in\", swells late.\n    - `\u003c 0` (fast start → settles): musical \"ease-out\", arrives smoothly.\n  - `transition_time=\u003cduration\u003e` (`τ`) is the glide length in beats. Defaults to `0.0` (instant jump). The change begins at `T − τ` and reaches the target at command time `T`.\n  - `transition_interval=\u003cduration\u003e` is the minimum time between each value update in milliseconds. Defaults to `1.0` (as fast as possible).\n\nExamples:\n- `0.0 cc pitch 0.0` — pitch is `0.0` at `0.0`.\n- `1.0 cc pitch 0.5 transition_time=0.2` — pitch glides to `0.5` value between beats `0.8` and `1.0`.\n- `5.0 cc pitch 0.95 transition_curve=0.5 transition_time=1.5` — starts at `3.5`, accelerates toward `0.95` near `5.0`.\n- `7.0 cc volume 0.2 transition_curve=-0.4 transition_time=2.0` — begins at `5.0`, moves quickly then coasts into `0.2` at `7.0`.\n\nCurve definition:\n- `value(t) = V0 + (V1 − V0) * ( s + max(α,0) * (s^4 − s) − max(−α,0) * ((1 − (1 − s)^4) − s) )`\n- `s = (t − (T − τ)) / τ`; if `τ = 0`, the change is instant at `T`.\n\nNotes:\n- Each transition needs a defined value before its end time `T` to establish the start (`V0` at `T − τ`). If no prior value exists, this is an error.\n- Overlapping transitions on the same parameter/channel: the new transition immediately aborts the previous at the current value and takes over. When segments conflict, the one with the later end beat (`T`) has precedence.\n\n\n## Common note lengths\n\n|                       | Fraction | Expanded          | Beats     |\n|-----------------------|----------|-------------------|-----------|\n| Whole                 | `4/1`    |                   | 4.0       |\n| Half                  | `2/1`    |                   | 2.0       |\n| Quarter               | `1/1`    |                   | 1.0       |\n| Eighth                | `1/2`    |                   | 0.5       |\n| Sixteenth             | `1/4`    |                   | 0.25      |\n| Thirty-second         | `1/8`    |                   | 0.125     |\n| Dotted half           | `3/1`    | `2 + 1`           | 3.0       |\n| Dotted quarter        | `3/2`    | `1 + 1/2`         | 1.5       |\n| Dotted eighth         | `3/4`    | `1/2 + 1/4`       | 0.75      |\n| Dotted sixteenth      | `3/8`    | `1/4 + 1/8`       | 0.375     |\n| Double-dotted quarter | `7/4`    | `1 + 1/2 + 1/4`   | 1.75      |\n| Double-dotted eighth  | `7/8`    | `1/2 + 1/4 + 1/8` | 0.875     |\n| Quarter triplet       | `2/3`    | `1 * 2/3`         | 0.666667  |\n| Eighth triplet        | `1/3`    | `1/2 * 2/3`       | 0.333333  |\n| Sixteenth triplet     | `1/6`    | `1/4 * 2/3`       | 0.166667  |\n| Quarter quintuplet    | `4/5`    | `1 * 4/5`         | 0.8       |\n| Eighth quintuplet     | `2/5`    | `1/2 * 4/5`       | 0.4       |\n| Sixteenth quintuplet  | `1/5`    | `1/4 * 4/5`       | 0.2       |\n| Quarter septuplet     | `4/7`    | `1 * 4/7`         | 0.571429  |\n| Eighth septuplet      | `2/7`    | `1/2 * 4/7`       | 0.285714  |\n| Sixteenth septuplet   | `1/7`    | `1/4 * 4/7`       | 0.142857  |\n\n## License\n\nCopyright © 2025 Dani Biró\n\nMTXT specification and reference implementation are dual-licensed under the Apache-2.0 license or the MIT license, at your option.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDaninet%2Fmtxt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDaninet%2Fmtxt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDaninet%2Fmtxt/lists"}