Decision 01 / Architecture
Converge every source on a symbolic score
PDFs and images pass through Audiveris optical music recognition; audio passes through Basic Pitch to produce MIDI. Both branches become MusicXML before the rest of the product analyzes or presents them.
Why it matters: analysis, notation, playback, and downloads share one downstream contract instead of duplicating logic for every input type.
Decision 02 / Responsiveness
Model long-running work as an observable job
Uploads dispatch a Celery task through Redis. The worker publishes named stages and progress percentages, while React Query polls the score endpoint and stops only at a terminal state.
Why it matters: expensive recognition never holds an HTTP request open, and a failed validation, transcription, cleanup, or analysis stage remains visible to the user.
Decision 03 / Data quality
Preserve recognized notation and make repairs explicit
Audio transcription passes through timing and density cleanup before becoming a score draft. Visual recognition preserves the recognized notation, with verified reconciliation for supported split-part cases. Instrument label recovery is recorded separately from the canonical score.
Tradeoff: audio cleanup can simplify nuance, and optical recognition remains unverified. Keeping transformations and uncertainty explicit prevents a playable result from being mistaken for a faithful transcription.
Decision 04 / AI boundary
Derive musical facts before generating an explanation
Music21 detects key, meter, tempo, parts, instrumentation, chords, measures, dynamics, accidentals, and articulations. Gemini receives those results afterward to create a concise, beginner-focused explanation.
Why it matters: generative text explains an inspectable analysis payload; it is not asked to infer the score directly from an opaque upload.
Decision 05 / Playback consistency
Build sound and score following from the same verified notation
The backend prepares selected voices on a shared timeline, including supported ties, note timing, tempo changes, repeats, and first/second endings. Plans carry a notation revision, note references, and visual frames. The frontend checks the contract before scheduling audio and highlighting the score, with bounded scheduling for longer selections.
Why it matters: listening and visual following share one musical clock. Unsupported repeat structures fall back to written order with a notice; uncertain timing or pitch produces diagnostics rather than guessed playback.
Decision 06 / Reuse and lifecycle
Prepare library scores once, then isolate each exploration
The library supports search, category and difficulty filters. The backend reuses a prepared source bundle and materializes separate exploration artifacts, with idempotent opening requests, explicit retries, and generation-bound progress. Each analysis session has its own expiry; polling neither starts processing nor extends retention.
Why it matters: reopening a library score can reuse expensive recognition work while keeping instrument choices, failures, and temporary artifacts scoped to each exploration.