1import { mountInstrumentPage } from '../ui/instrumentPage';
2import { CONFIGS } from './configs';
4const mount = (id: string) => (root: HTMLElement) => mountInstrumentPage(root, CONFIGS[id]);
6export interface Instrument {
7 id: string;
8 name: string;
9 blurb: string;
10 mount?: (root: HTMLElement) => void; // absent = not built yet
11}
13export const INSTRUMENTS: Instrument[] = [
14 {
15 id: 'bead-string',
16 name: 'String of beads',
17 blurb: 'Point masses joined by pre-tensioned springs, moving in 3D. Pluck, strike or hammer it; clamp, slide or free the ends; pin beads.',
18 mount: mount('bead-string'),
19 },
20 {
21 id: 'bead-drum',
22 name: 'Bead drum',
23 blurb: 'A round drumhead: a tensioned hex net of beads in a clamped rim. Hit it with a felt mallet, strike, push or press it.',
24 mount: mount('bead-drum'),
25 },
26 {
27 id: 'bead-cymbal',
28 name: 'Cymbal',
29 blurb: 'A thin bronze plate on felts at its centre, flat or with bow and bell. Hit it with a stick or mallet, at any angle; listen through a microphone.',
30 mount: mount('bead-cymbal'),
31 },
32 { id: 'bead-bar', name: 'Bar', blurb: 'A stiff chain with bending springs, free ends: xylophone-like overtones.' },
33];