# AI MusiMuse

# 008_COMPOSITION_ARCHITECTURE.md

Version 1.0

---

# Purpose

Music is not a sequence of sounds.

Music is a sequence of ideas.

The goal of this layer is to transform low-level musical events into a semantic representation suitable for learning musical composition.

---

# Hierarchy

```
Audio

↓

MusicDNA

↓

Timeline

↓

Composition

↓

Style

↓

Composer
```

Every layer increases abstraction.

---

# Timeline

Timeline describes

"What happened."

Example

```
00:00

Pad

00:32

Bass

00:58

Lead

01:44

Break

02:20

Noise

03:10

Lead returns
```

Timeline is objective.

It is directly observable.

---

# Composition

Composition describes

"Why did it happen."

Instead of events

```
Bass

Lead

Pad
```

Composition contains

```
Expectation

Growth

Release

Silence

Return

Resolution
```

---

# Composition Units

Every composition is divided into units.

Example

```
Intro

↓

Build

↓

Development

↓

Break

↓

Recovery

↓

Ending
```

These units are semantic.

They are independent from instruments.

---

# Musical Ideas

Every unit contains one or more musical ideas.

Examples

```
Ambient atmosphere

Slow tension

Wide space

Minimal rhythm

Bright climax

Calm ending
```

Ideas may repeat.

Ideas may evolve.

Ideas may disappear.

---

# Musical Graph

Instead of storing music as a list,

the system stores relationships.

Example

```
Atmosphere

↓

Main Theme

↓

Variation A

↓

Variation B

↓

Break

↓

Main Theme

↓

Ending
```

Every node represents one musical idea.

---

# Graph Node

Every node contains

```
id

type

start

end

duration

energy

density

confidence
```

---

# Graph Edge

Edges describe transitions.

Example

```
Theme

↓

Development

```

Transition metadata

```
energy change

tempo change

harmonic change

density change

transition type
```

---

# Transition Types

Examples

```
Fade

Cut

Build

Drop

Expansion

Reduction

Modulation

Silence
```

---

# Composition Complexity

Each composition receives statistics.

Examples

```
graph depth

branch count

average transition length

average section duration

average energy slope

repetition ratio

development ratio
```

---

# Motifs

The system attempts to identify recurring ideas.

Example

```
Theme A

↓

Variation

↓

Theme A

↓

Variation

↓

Theme A
```

The motif itself becomes a reusable object.

---

# Sections vs Ideas

Sections are physical.

Ideas are semantic.

Example

```
Intro

contains

Atmosphere

+

Expectation
```

---

# Emotional Curve

Every composition contains an emotional curve.

Examples

```
Calm

↓

Curiosity

↓

Growth

↓

Peak

↓

Release

↓

Silence
```

This curve is independent from BPM.

---

# Energy Curve

Energy is represented separately.

Example

```
100%

       /\

80%   /  \

60%__/    \____

40%

20%

0%
```

Energy and emotion are different concepts.

---

# Density Curve

Density describes

How many musical elements are active.

Example

```
Pads

Bass

Lead

FX

Percussion

Noise
```

↓

```
0

1

2

5

7

3

1
```

---

# Instrument Independence

Composition must never depend on

```
Piano

Synth

Violin

Kick
```

Instead

```
Harmony

Rhythm

Texture

Pulse

Motion

Space
```

The generator may later choose any instrument.

---

# Composition Template

Every song eventually becomes

```
Composition Graph

+

Timeline

+

MusicDNA

+

Style
```

This representation is sufficient for learning.

---

# Learning Goal

The AI should eventually understand

```
This song builds tension.

↓

Then creates silence.

↓

Then returns the original idea.
```

instead of merely learning

```
Bass

Lead

Pad

Kick
```

---

# Future Composer

The Composer generates

Composition Graph

↓

Timeline

↓

Events

↓

Rendering

↓

Audio

Generation therefore begins with ideas rather than notes.

---

# Design Principles

Composition is deterministic.

Ideas are semantic.

Graphs are immutable.

Transitions are first-class objects.

Rendering is independent.

Composition never stores audio.

---

# Long-Term Goal

AI MusiMuse should eventually learn

how musical ideas evolve,

how they relate,

and how they create emotional movement.

Generated music should therefore resemble the author's compositional thinking,

not simply imitate existing recordings.