Skip to content

feat(@score/dsl): add HiHat .open() DSL method (t297) #128

@bwyard

Description

@bwyard

Summary

Add .open() as a chain method on HiHat, Hihat808, and Hihat909. An open hi-hat has a longer decay/release than a closed one — the cymbal rings instead of being choked. This is fundamental to every electronic genre (the open/closed hihat alternation is the backbone of house and techno grooves).

Expected API

// Closed hihat (default) — tight, choked
const hh = Hihat808(8).volume(0.3)

// Open hihat — rings out, longer decay
const hhOpen = Hihat808().open().hits(2, 10).volume(0.25)

// Or toggle per-step (advanced — planning required separately)

Where to make the change

  1. packages/dsl/src/percussion.ts — add .open() method to hihat factories. Sets props.open = true in the descriptor.
  2. packages/dsl/src/chain.ts — OR add as a percussion-specific extension (like makeSubSynth pattern)
  3. packages/dsl/src/validators.ts — no numeric validation needed, boolean flag
  4. Engine wiring — in packages/components/src/ — when props.open === true, use a longer envelope decay on the hihat

Notes

  • The simplest implementation: open() sets a longer _adsr.release on the hihat descriptor — no new engine node needed
  • Could also expose .decay(n) as a more general solution, but .open() is the musical name that feels right in a song file
  • Must ship with tests

Good first issue — small scope, clear musical intent, no planning required.

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