# AI MusiMuse

# 015_MUSISCRIPT.md

Version 1.0

---

# Purpose

MusiScript is the internal composition language of AI MusiMuse.

The Composer never generates audio.

The Composer generates MusiScript.

Every renderer consumes MusiScript and produces audio.

---

# Philosophy

MusiScript is not MIDI.

MusiScript is not a DAW project.

MusiScript is not MusicXML.

MusiScript represents musical intention.

---

# Pipeline

Composer

↓

MusiScript

↓

Renderer

↓

Audio

---

# Design Goals

Human-readable

Deterministic

Renderer-independent

Versioned

Composable

Extensible

---

# File Structure

A MusiScript document consists of

Header

Global Parameters

Timeline

Events

Metadata

---

# Header

Example

VERSION 1

STYLE_MODEL 3

SEED 18273645

TRACK_LENGTH 360

---

# Global Parameters

Examples

BPM 72

KEY D_MINOR

TIME_SIGNATURE 4/4

ENERGY_TARGET LOW

DENSITY_TARGET MEDIUM

---

# Timeline

The timeline is divided into Sections.

Example

SECTION Intro

START 0.0

END 42.5

GOAL CreateAtmosphere

---

SECTION Development

START 42.5

END 120.0

GOAL IncreaseEnergy

---

SECTION Break

START 120.0

END 145.0

GOAL ReduceDensity

---

# Event Types

Every event belongs to a category.

Structure

Harmony

Rhythm

Texture

Dynamics

Automation

FX

Control

---

# Texture Events

Examples

PAD_START

PAD_STOP

DRONE_START

DRONE_STOP

BASS_ENTER

BASS_EXIT

LEAD_ENTER

LEAD_EXIT

NOISE_LAYER

---

# Harmony Events

Examples

SET_KEY

CHANGE_MODE

CHANGE_CHORD

MODULATE

RETURN_THEME

---

# Rhythm Events

Examples

START_PULSE

STOP_PULSE

DOUBLE_TEMPO

HALF_TEMPO

SHIFT_GROOVE

---

# Dynamics Events

Examples

INCREASE_ENERGY

DECREASE_ENERGY

INCREASE_DENSITY

REDUCE_DENSITY

EXPAND_TEXTURE

---

# Automation Events

Examples

FILTER_OPEN

FILTER_CLOSE

REVERB_INCREASE

REVERB_DECREASE

DELAY_INCREASE

PAN_MOVE

---

# FX Events

Examples

RISE

IMPACT

REVERSE

SWELL

NOISE_HIT

---

# Parameters

Every event contains

TIME

TYPE

PARAMETERS

Example

EVENT

TIME 42.5

TYPE PAD_START

PARAM

Instrument WarmPad

Volume 0.72

Filter 380Hz

---

# Goals

Events may reference goals.

Example

GOAL CreateAtmosphere

EVENT PAD_START

GOAL IncreaseEnergy

EVENT BASS_ENTER

---

# Dependencies

Events may depend on previous events.

Example

WAIT_FOR

PAD_START

THEN

FILTER_OPEN

---

# Groups

Events may be grouped.

GROUP ThemeA

PAD

BASS

TEXTURE

END_GROUP

---

# Randomization

Events may contain variation ranges.

Example

Volume

0.70 ±0.03

Delay

450 ±20 ms

This preserves uniqueness while remaining deterministic.

---

# Renderer Responsibilities

The renderer decides

Which VST to use

Which samples to load

Which synthesizer to choose

How automation is implemented

MusiScript never contains renderer-specific details.

---

# Versioning

Every file stores

Script Version

Style Version

Renderer Version

Schema Version

---

# Validation

Every MusiScript file must satisfy

Valid timeline

No overlapping sections

Deterministic ordering

Known event types

Valid parameters

Consistent references

---

# Extensibility

New event types can be added

without modifying existing renderers.

Unsupported events may be ignored gracefully.

---

# Long-Term Goal

MusiScript should become the universal internal language of AI MusiMuse.

Every Composer produces it.

Every Renderer consumes it.

This separation allows independent evolution of composition and sound generation.