/ simulated_instruments / recorder
Sign in
simulated_instruments / recorder
recorder / webapp / src / lib / instrument.ts
25 lines · 1.1 KBBlameHistoryRaw
1// The tone hole lattice and fingering chart, mirrored from
2// ../matlab/recorder_geometry.m for the 3D scene. Hole 0 is the thumb hole
3// (back of the instrument); 1..7 are the finger holes from the top down.
4// Positions are fractions of the bore length below the window.
6export const HOLE_FRAC = [0.3699, 0.4271, 0.464, 0.5292, 0.6204, 0.6519, 0.7424, 0.828];
7export const HOLE_RAD = [0.0027, 0.0032, 0.003, 0.0029, 0.0033, 0.0026, 0.0032, 0.0025];
9// 0 closed, 1 open, 0.5 pinched; rows are the fingering chart notes.
10export const FINGERINGS: number[][] = [
11 [0, 0, 0, 0, 0, 0, 0, 0], // C5
12 [0, 0, 0, 0, 0, 0, 0, 1], // D5
13 [0, 0, 0, 0, 0, 0, 1, 1], // E5
14 [0, 0, 0, 0, 0, 1, 0, 0], // F5 (fork)
15 [0, 0, 0, 0, 1, 1, 1, 1], // G5
16 [0, 0, 0, 1, 1, 1, 1, 1], // A5
17 [0, 0, 1, 1, 1, 1, 1, 1], // B5
18 [0, 1, 0, 1, 1, 1, 1, 1], // C6
19 [1, 0, 0, 1, 1, 1, 1, 1], // C#6
20 [1, 1, 0, 1, 1, 1, 1, 1], // D6
21 [0.5, 0, 0, 0, 0, 0, 1, 1], // E6
22 [0.5, 0, 0, 0, 0, 1, 0, 1], // F6
23 [0.5, 0, 0, 0, 1, 1, 1, 1], // G6
24 [0.5, 0, 0, 1, 1, 1, 1, 1], // A6
25];
↑↓ move↵openescclose