# AI MusiMuse

# 016_COMPOSITION_PLANNER.md

Version 1.0

---

# Purpose

The Composition Planner creates the high-level plan of a musical piece.

It does not generate events.

It does not generate notes.

It does not generate audio.

Instead,

it decides

what should happen,

when,

and why.

---

# Pipeline

Goal

↓

Planner

↓

Composition Plan

↓

Composer

↓

MusiScript

↓

Renderer

---

# Philosophy

Planning always precedes composition.

The Composer never improvises the whole track.

Instead,

it follows a plan,

while remaining free to adjust details.

---

# Planning Levels

Planning occurs at three levels.

Global

↓

Section

↓

Local

---

# Global Plan

The global plan defines

overall duration

overall evolution

overall emotion

overall structure

Example

```
Length

6 min

Evolution

Slow

Energy

Low → High → Low

Ending

Ambient Fade
```

---

# Section Plan

Each section receives

purpose

expected duration

energy target

density target

transition strategy

Example

```
Intro

Goal

Create Atmosphere

Duration

60 sec

Energy

0.18

Density

0.20
```

---

# Local Plan

Inside each section

the planner creates milestones.

Example

```
0018

Introduce Motion

0042

Prepare Bass

0105

Increase Width

0125

Transition
```

---

# Milestones

Every milestone contains

id

goal

priority

expected duration

completion criteria

---

# Planning Constraints

The planner must respect

Target Length

User Constraints

Style Model

Available Motifs

Energy Budget

Density Budget

---

# Planning Outputs

The planner produces

Sections

Goals

Milestones

Expected Curves

Target Motifs

Transition Intentions

---

# Expected Curves

The planner defines

Energy

Density

Brightness

Movement

Emotion

These are target curves,

not measured curves.

---

# Planning Horizon

The planner always looks ahead.

Example

Current

↓

30 sec

Future

↓

120 sec

The planner continuously maintains a planning horizon.

---

# Replanning

If later composition diverges,

the planner may

adjust future milestones,

merge sections,

extend transitions,

delay climax.

Planning remains adaptive.

---

# Planning Strategies

The architecture supports multiple planners.

Examples

Rule-Based

Statistical

Search-Based

Transformer

Hybrid

The Composer remains independent from the planning strategy.

---

# Style Guidance

The planner uses the Style Model.

Example

```
Typical intro

55 seconds

↓

Planned intro

58 seconds
```

Example

```
Typical climax

75%

↓

Place climax near

430
```

---

# Novelty

The planner intentionally introduces variation.

Example

```
Normally

4 sections

↓

This track

5 sections
```

Provided

style coherence remains acceptable.

---

# Explainability

Every planned milestone is explainable.

Example

```
Milestone

Introduce Theme

Reason

Appears after atmospheric intro
in 81% of reference tracks.
```

---

# Failure Recovery

If planning becomes inconsistent,

the planner may

remove milestones

split sections

change durations

regenerate a branch

---

# Design Principles

Planning before composition.

Plans are deterministic.

Plans are explainable.

Plans are renderer-independent.

Plans evolve during composition.

---

# Long-Term Goal

The Composition Planner should behave like an experienced composer,

who first imagines the entire journey,

and only afterwards begins writing individual musical ideas.