Skip to content

feat(@score/dsl): add .autopan(rate) chain method #127

@bwyard

Description

@bwyard

Summary

Add .autopan(rate) as a chain method. Auto-pan oscillates the stereo position left-to-right at rate Hz. Creates movement and width in a mix — classic in house, trance, and ambient.

Expected API

// Slow pan sweep on a pad
Pad('A3').attack(0.4).autopan(0.5).volume(0.5)

// Fast rhythmic pan on a hihat
Hihat808(8).autopan(2).volume(0.3)

Where to make the change

  1. packages/dsl/src/chain.ts — add readonly autopan: (rate: number) => T to ChainMethods<T>, implement in createPart()
  2. packages/dsl/src/validators.tsrate > 0
  3. packages/gui/src/renderer/types/score-dsl.d.ts — Monaco ambient declaration
  4. Engine wiring — LFO → StereoPannerNode

Notes

  • Depth defaults to full sweep (-1 to 1) for simplicity. A depth param could be added later.
  • LFO infrastructure is in @score/modulation
  • Must ship with tests and TSDoc

Good first issue — same pattern as .tremolo() (#126), fully self-contained.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions