Melodic contour — the shape of a tune.
One of 16 ternary MIDI agents in the Live Paradigm Fleet.
The Live Paradigm treats musical gestures as ternary operations. Where binary logic gives yes/no, ternary gives approve/reject/observe — a richer cognitive substrate that maps naturally to music theory, emotional tension, and conversational flow.
This agent implements ternary decomposition for melody.
Position in the fleet pipeline:
🎤 Voice → OpenSMILE (25 features) → Ghost Track (T-0..T-4 CR predictions)
→ tminus-dispatcher (cue scheduling) → Fleet Conductor (routing)
→ melody (port 2174)
| Method | Path | Description |
|---|---|---|
| GET | /health | Health check + agent identity |
| POST | /agent with {"type":"probe"} |
Liveness probe for fleet-conductor |
| POST | /agent | Process musical data, return ternary analysis |
| POST | / | Direct query with JSON body |
{
"status": "ok",
"agent": "fleet-midi-melody",
"port": 2174,
"ternary_vector": [0, 0, 0],
"ternary_invariant": 0,
"closed_gesture": false
}| Position | +1 | 0 | -1 |
|---|---|---|---|
| ternary[0] | ascending | repeating/static | descending |
A melody is a sequence of notes that the listener perceives as a single entity. Its contour — the direction of pitch movement — is the primary carrier of emotional meaning.
- Ascending (+1): Pitch rises. Hope, questions, building energy. Example: "Somewhere Over the Rainbow" opening.
- Repeating (0): Same pitch. Mantra, trance, emphasis. Example: "When the Saints Go Marching In" opening notes.
- Descending (-1): Pitch falls. Resolution, sighs, conclusion. Example: "Yesterday" opening by The Beatles.
- Conjunct (stepwise): Moves by small intervals (major/minor seconds). Smooth, singable.
- Disjunct (leaps): Moves by large intervals (thirds, fourths, fifths+). Dramatic, angular.
- Port: 2174
- Roles: note, velocity
- Conductor ID:
melody - Protocol: HTTP POST to
/2174/agentwith JSON body, 5s timeout - Conservation Law: Σ(Δ_midi) = 4 × Σ(ternary) — closed gestures return to start
Local development:
python3 engine.py --port 2174Or via the fleet start script:
./scripts/start-fleet-agents.shPart of the Live Paradigm Fleet — A ternary cognitive architecture for musical AI. GitHub: github.com/SuperInstance Fleet conductor: sailor-workspace