Summary
setChordDisplay() and setChordPlayback() are defined in api.types.ts and stubbed in src/hooks/api/chords.ts, but currently return NOT_IMPLEMENTED. The corresponding getters (getChordDisplay(), getChordPlayback()) work correctly and return the config from props.
Current behavior
score.setChordDisplay({ notation: 'roman' });
// → { ok: false, code: 'NOT_IMPLEMENTED', message: '...' }
Expected behavior
setChordDisplay should update the chord display configuration (notation system, symbol style) and trigger a re-render. setChordPlayback should update playback settings (enabled, velocity).
Implementation notes
The config is currently passed as a React prop (config.chord?.display), so the setters need a state management path to update it. Options:
- Lift config into a
ConfigEngine (mirrors ScoreEngine/SelectionEngine pattern)
- Use a simpler
useState in useScoreAPI that merges with the prop-provided config
- Emit config change events and let the parent component handle it
Files involved
src/api.types.ts — Interface (already defined, marked @status stub)
src/hooks/api/chords.ts — Stub implementations (~lines 720-780)
src/hooks/api/useScoreAPI.ts — Where config state management would live
docs/COOKBOOK.md — Recipe references these methods (has NOTE about stub status)
docs/features/chord-symbols/SRS.md — §4.5 API specification
Summary
setChordDisplay()andsetChordPlayback()are defined inapi.types.tsand stubbed insrc/hooks/api/chords.ts, but currently returnNOT_IMPLEMENTED. The corresponding getters (getChordDisplay(),getChordPlayback()) work correctly and return the config from props.Current behavior
Expected behavior
setChordDisplayshould update the chord display configuration (notation system, symbol style) and trigger a re-render.setChordPlaybackshould update playback settings (enabled, velocity).Implementation notes
The config is currently passed as a React prop (
config.chord?.display), so the setters need a state management path to update it. Options:ConfigEngine(mirrors ScoreEngine/SelectionEngine pattern)useStateinuseScoreAPIthat merges with the prop-provided configFiles involved
src/api.types.ts— Interface (already defined, marked@status stub)src/hooks/api/chords.ts— Stub implementations (~lines 720-780)src/hooks/api/useScoreAPI.ts— Where config state management would livedocs/COOKBOOK.md— Recipe references these methods (has NOTE about stub status)docs/features/chord-symbols/SRS.md— §4.5 API specification