Summary
Several places in the GUI still reference the old pre-chain-API DSL style. These cause runtime errors and show incorrect usage to contributors.
Locations
File
Issue
packages/gui/src/renderer/components/shared/ReferencePanel.tsx:87
Track(Synth({ wave: 'sawtooth', pattern: [...], gain: 0.6 })) — old object-props API, no longer valid
packages/gui/src/renderer/components/LiveCode/index.tsx:492
Default snippet Synth('C3').attack(0.01).release(0.4) — wrong arg order ('C3' becomes wave type, not pitch)
packages/gui/src/renderer/components/LiveCode/index.tsx
The default song loaded on first launch / new file should be updated to use the correct chain API and serve as a working example contributors can copy
packages/gui/src/renderer/types/score-dsl.d.ts:92
Declares Synth(props?: { wave?, volume? }) — old signature, does not match current Synth(wave, pitch?)
What the correct chain API looks like
import { Song , Kick808 , Snare909 , Hihat808 , Bass303 } from '@score/dsl'
const kick = Kick808 ( 4 ) . volume ( 0.8 )
const snare = Snare909 ( 2 ) . volume ( 0.55 )
const hihat = Hihat808 ( 8 ) . volume ( 0.25 )
const bass = Bass303 ( 'A2' )
. cutoff ( 600 )
. resonance ( 0.4 )
. pattern ( [ 'A2' , 0 , 0 , 0 , 'D3' , 0 , 0 , 0 ] )
. volume ( 0.6 )
export default Song ( { bpm : 128 , tracks : [ kick , snare , hihat , bass ] } )
Notes
Synth signature is under design review — see design(@score/dsl): Synth signature — wave-first vs pitch-first, add .wave() chain method #125 . ReferencePanel and LiveCode default snippets for Synth should wait until that is resolved.
All other instruments (Bass303, Pad, SubSynth, FMSynth) are pitch-first. Synth is the outlier.
score-dsl.d.ts is a manually maintained ambient declaration for the Monaco editor. It must stay in sync with packages/dsl/src/melodic.ts and chain.ts.
The default song loaded on new file / first launch should be a clean, working chain API example that doubles as a contributor reference.
Acceptance criteria
Blocked by: #125 (Synth signature) for the Synth-specific snippets
Summary
Several places in the GUI still reference the old pre-chain-API DSL style. These cause runtime errors and show incorrect usage to contributors.
Locations
packages/gui/src/renderer/components/shared/ReferencePanel.tsx:87Track(Synth({ wave: 'sawtooth', pattern: [...], gain: 0.6 }))— old object-props API, no longer validpackages/gui/src/renderer/components/LiveCode/index.tsx:492Synth('C3').attack(0.01).release(0.4)— wrong arg order ('C3'becomes wave type, not pitch)packages/gui/src/renderer/components/LiveCode/index.tsxpackages/gui/src/renderer/types/score-dsl.d.ts:92Synth(props?: { wave?, volume? })— old signature, does not match currentSynth(wave, pitch?)What the correct chain API looks like
Notes
Synthsignature is under design review — see design(@score/dsl): Synth signature — wave-first vs pitch-first, add .wave() chain method #125. ReferencePanel and LiveCode default snippets forSynthshould wait until that is resolved.Bass303,Pad,SubSynth,FMSynth) are pitch-first.Synthis the outlier.score-dsl.d.tsis a manually maintained ambient declaration for the Monaco editor. It must stay in sync withpackages/dsl/src/melodic.tsandchain.ts.Acceptance criteria
ReferencePanel.tsxshows working chain API examples for all instrument typesLiveCode/index.tsxdefault snippets run without error when insertedscore-dsl.d.tsreflects the actualSynthsignature after design(@score/dsl): Synth signature — wave-first vs pitch-first, add .wave() chain method #125 landsTrack(Synth({ ... }))object-style references remain in the GUIBlocked by: #125 (Synth signature) for the Synth-specific snippets