bugfixes, better MusicXML support and 1.1.0
This commit is contained in:
@@ -61,6 +61,7 @@ The `.githooks/pre-commit` hook calls `--check`. Skips silently when `~/.claude/
|
||||
- TemporalStream / language-side value generation → `Sources/Lyrebird/Lyrebird.docc/TemporalDemand.md`
|
||||
- Polyphonic voice pool / step sequencer → `docs/tooling/routine-task.md`
|
||||
- Score / ScorePlayer / SMF / MusicXML → `Sources/Lyrebird/Lyrebird.docc/ScoreSystem.md`
|
||||
- Pitch / scale theory toolkit (spelling-aware `Interval` / `Scale` / `PitchCollection` / 12-tone rows, diatonic-vs-chromatic transposition, scale mapping; → notation + Hz/seconds for synthesis) → `docs/stdlib/theory.md` (types under `Sources/Lyrebird/Score/Theory/`)
|
||||
- Performance event sequencing / `LyrebirdProcess` / `LyrebirdEventList` → `Sources/Lyrebird/Lyrebird.docc/ProcessSystem.md`
|
||||
- NRT / offline render → `docs/tooling/nrt-guide.md`
|
||||
|
||||
@@ -138,7 +139,7 @@ One-liners. Detail and rationale lives in linked docs.
|
||||
|
||||
**Never drop new files at `Sources/Lyrebird/` root.** Every new `.swift` file goes into a subfolder grouped by function. Existing top-level subfolders (alphabetical):
|
||||
|
||||
`AUv3/` `AudioDrivers/` `Buffers/` `Buses/` `Capture/` `Diagnostics/` `Distributions/` `Engine/` `Envelopes/` `External/` `GeneratorCore/` `Generators/` `Kinds/` `MIDI/` `Math/` `NodeTree/` `OSC/` `Oversampling/` `Parameters/` `Patterns/` `Process/` `Scheduling/` `Score/` `Spectral/` `Synthesizer/` `TemporalStream/` `Trigger/` `ValueCompute/` `Voices/`
|
||||
`AUv3/` `AudioDrivers/` `Buffers/` `Buses/` `Capture/` `Diagnostics/` `Distributions/` `Engine/` `Envelopes/` `External/` `GeneratorCore/` `Generators/` `Kinds/` `MIDI/` `Math/` `NodeTree/` `OSC/` `Oversampling/` `Parameters/` `Patterns/` `Process/` `Scheduling/` `Score/` `Spectral/` `Synthesizer/` `TemporalStream/` `Trigger/` `Utilities/` `ValueCompute/` `Voices/`
|
||||
|
||||
Rule:
|
||||
|
||||
@@ -178,6 +179,23 @@ Call-site pattern: every `engine.add` invocation needs `try`. In non-throwing co
|
||||
|
||||
Hard rules. Review agents flag violations.
|
||||
|
||||
### No phase numbers in code or docs
|
||||
Never write phase numbers (`Phase 228`, `Phase 228c`, `phase-224`, `pre-Phase-209c`, `// Phase 216:`, `(Phase 201)`, `— Phase 214`) in source comments, doc-comments (`///`), `.docc` markdown, `@Suite`/`@Test` display strings, or test function / type / file names. Phase numbers are meaningless to external readers — they belong **only** in planning docs (`docs/00-working-order.md`, `docs/01-completed-working-order.md`), commit messages, and `MEMORY.md`/phase history. Describe the **behavior or reason** instead:
|
||||
```swift
|
||||
// WRONG
|
||||
// Phase 216: emit a tempo direction for this measure when a TempoChange targets it.
|
||||
let cap = ... // Phase 228c
|
||||
/// > Note: Phase 224 wires this as model state.
|
||||
@Suite("EngineHost (Phase 197)")
|
||||
|
||||
// RIGHT
|
||||
// Emit a tempo direction for this measure when a TempoChange targets it.
|
||||
let cap = ...
|
||||
/// > Note: this is model state.
|
||||
@Suite("EngineHost")
|
||||
```
|
||||
Exception: the DSP term **"phase"** that is NOT a planning reference — oscillator `phase`, `phase accumulator`, `phase offset`, `_phase`, `initPhase`, `phase modulation`, "Phase 0.25 in an 8-sample table" — is a real audio term, never touch it. The rule targets `Phase <number>` planning tags only.
|
||||
|
||||
### No force unwraps
|
||||
Never `!` on optionals or `try!`. Hotspots: `UnsafeBufferPointer.baseAddress` in Accelerate calls, `Array.first!`/`last!` on output channels, `try!` in test helpers, `dict[key]!`.
|
||||
```swift
|
||||
|
||||
Reference in New Issue
Block a user