cgcardona / muse public
feat main #64 / 100

feat: god-tier MIDI dimension expansion + full supercharge architecture

Expands the music plugin from 4 internal merge buckets to 21 fully independent MIDI dimensions, adds stable entity identity with MutateOp tracking, agent provenance with HMAC signing, an append-only op log, voice-aware Music RGA CRDT, music query DSL, invariants engine, and hierarchical bar-chunk manifests.

MIDI dimension expansion (midi_merge.py, plugin.py): - From 4 buckets (notes/harmonic/dynamic/structural) to 21 internal dims - pitch_bend, channel_pressure, poly_pressure now independent dimensions - CC split by controller: cc_modulation, cc_volume, cc_pan, cc_expression, cc_sustain, cc_portamento, cc_sostenuto, cc_soft_pedal, cc_reverb, cc_chorus, cc_other — all independently mergeable - tempo_map, time_signatures, track_structure remain non-independent - Backward-compatible user-facing aliases (melodic/rhythmic/harmonic/ dynamic/structural still work)

New core modules: - muse/core/provenance.py: AgentIdentity, HMAC-SHA256 signing, key I/O - muse/core/op_log.py: OpEntry, Lamport timestamps, append-only log, checkpointing, replay, to_structured_delta

New music plugin modules: - muse/plugins/music/entity.py: NoteEntity, EntityIndex, entity ID assignment, entity-aware diff with MutateOp - muse/plugins/music/_music_query.py: tokenizer, recursive descent parser, evaluator, run_query over commit history - muse/plugins/music/_invariants.py: InvariantRule/Report/Violation, 4 built-in checks (max_polyphony, pitch_range, key_consistency, no_parallel_fifths) - muse/plugins/music/manifest.py: BarChunk, TrackManifest, MusicManifest, hierarchical per-bar manifests, partial diff by bar hash - muse/plugins/music/_crdt_notes.py: NotePosition, RGANoteEntry, MusicRGA with voice-aware position ordering (bass→soprano)

Domain types (domain.py): FieldMutation, MutateOp, EntityProvenance Store types (core/store.py): 6 agent provenance fields on CommitRecord CLI: muse music-query, muse music-check registered in app.py Benchmark: tools/benchmark.py harness for parse/diff/merge/query/RGA Tests: 215 passing across 7 new test suites Docs: 5 architecture documents in docs/

G Gabriel Cardona <gabriel@tellurstori.com> · 1d ago Mar 18, 2026 · 6d8ca4ac · parent d855b718
oldest
newest 37%

Comments

0

No comments yet. Be the first to start the discussion.