Skip to content

M10: spatial performance fields (pan/reverb/glide)#4

Merged
jamiesun merged 1 commit into
mainfrom
m10-spatial-performance-fields
Jul 18, 2026
Merged

M10: spatial performance fields (pan/reverb/glide)#4
jamiesun merged 1 commit into
mainfrom
m10-spatial-performance-fields

Conversation

@jamiesun

Copy link
Copy Markdown
Contributor

What

Implements the on-hold roadmap item spatial performance fields — the "near→far→wide→pull back" spatial narrative from real film-scoring work is now expressible in the DSL. Bumps version to 0.2.0.

Three optional per-track fields, all with strictly deterministic MIDI semantics:

Field Range Compiles to
pan 0.0..=1.0 CC10 at tick 0 (round(v*127))
reverb 0.0..=1.0 CC91 at tick 0
glide 0.0..=1.0, melody-only tail portamento via pitch bend, clamped ±2 semitones, PPQ/8 ramp grid

Design notes

  • Glide is computed after performance transforms (reads post-swing/humanize onsets); the ramp window is capped at the next onset so legato overlap glides into the new note; loop scenes glide the last note toward the first with the reset on the loop boundary — seam continuous by construction.
  • Pitch-bend events rank between note-offs and note-ons at the same tick, so bend-free scenes stay byte-identical (golden forest.mid untouched).
  • glide on a non-melody track and out-of-range values are validation errors with field paths.
  • Backends: FluidSynth/TiMidity honor all three; sfizz honors pitch bend (±200-cent default matches the clamp), CC10/91 only if the .sfz maps them — same graceful degradation as articulation.

Verification

  • 13 unit + 72 E2E tests green; fmt + clippy (-D warnings) clean.
  • 3 new E2E tests (acceptance-matrix rule 5): spatial_fields_emit_cc_and_pitch_bend_deterministically, spatial_build_keeps_loop_sample_exact, validate_rejects_bad_pan_and_glide_on_non_melody.
  • Real-render smoke test: pan: 0.1 → left/right RMS 2073/515 vs centered 1461/1512 without the fields.
  • Docs: roadmap M10 section + capability list + acceptance-matrix row; skill reference field table + backend note.

Per-track pan -> CC10, reverb -> CC91, and melody-only glide tail
portamento -> pitch bend (+/-2 semitones, PPQ/8 ramp grid), all
deterministic. Glide runs after performance transforms; loop scenes
glide last note toward the first with the reset on the loop boundary,
so the seam stays continuous. Scenes without the fields compile
byte-identically (golden SMF unchanged).

Bump version to 0.2.0.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jamiesun
jamiesun merged commit f6654d0 into main Jul 18, 2026
1 check passed
@jamiesun
jamiesun deleted the m10-spatial-performance-fields branch July 18, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant