Skip to content

refactor(cli): split engine.ts into focused modules #151

@bwyard

Description

@bwyard

engine.ts is ~1100 lines covering: partToInstrumentDescriptor, instrument dispatchers (12+ types), seqExtras, and the full createScoreEngine closure. Hard to navigate and extend.

Proposed split:

  • `engine/descriptor.ts` — partToInstrumentDescriptor + normalizeNoteTransforms + normalizePatternTransforms
  • `engine/dispatchers.ts` — per-instrument audio graph builders (kick, snare, synth, bass303, etc.)
  • `engine/patch.ts` — PatchProps type + patch/update handlers
  • `engine/index.ts` — createScoreEngine, re-exports

No behavior changes. All existing imports stay the same (re-export from index).

Relates to t322 scaling audit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorCode refactoring — no behaviour change

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions