To date, all $name would be displayed as sharps Now, we correctly render flats, and use subscript notation for octaves.
149 lines
3.2 KiB
JavaScript
149 lines
3.2 KiB
JavaScript
// +--------+
|
|
// | COLORS |
|
|
// +--------+
|
|
// You can change the color of the fingering chart here.
|
|
// Colors can be hex codes ("#123456") or names ("green")
|
|
|
|
function getColor(note) {
|
|
const colorMap = {
|
|
C: "#ed1c24",
|
|
"C#": "#f37021",
|
|
D: "#f8931e",
|
|
"D#": "#ffc20e",
|
|
E: "#fff200",
|
|
F: "#bed630",
|
|
"F#": "#72bf44",
|
|
G: "#00a29d",
|
|
"G#": "#007dc5",
|
|
A: "#49479d",
|
|
"A#": "#8d5ca6",
|
|
B: "#c9277d",
|
|
}
|
|
return colorMap[note] || "gray"
|
|
}
|
|
|
|
//---------------------------------------------------------
|
|
// INSTRUMENTS
|
|
//---------------------------------------------------------
|
|
|
|
// Each woodwind has the form:
|
|
// {
|
|
// name:
|
|
// fingering:
|
|
// format:
|
|
// },
|
|
//
|
|
// NAME: can be anything descriptive.
|
|
//
|
|
// FINGERING:
|
|
// Each note that can be played, then its holes.
|
|
// Holes are listed starting from the mouthpiece.
|
|
// You can use these symbols to represent whether the holes are covered:
|
|
// 0 = ○
|
|
// o = ⦶
|
|
// 1 = ●
|
|
// | = ◐
|
|
// - = ◒
|
|
//
|
|
// FORMAT:
|
|
// Decide how the fingering will be displayed.
|
|
// "$note" will be replaced with the name of the note,
|
|
// "$1" "$2" etc. will be replaced by the hole symbols, with $1 being closest to the mouthpiece.
|
|
|
|
|
|
const woodwinds = [
|
|
{
|
|
name: "Soprano Recorder",
|
|
fingering: {
|
|
"C4": "11111111",
|
|
"C#4": "1111111|",
|
|
"D4": "11111110",
|
|
"D#4": "111111|o",
|
|
"E4": "111111oo",
|
|
"F4": "11110011",
|
|
"F#4": "1111011o",
|
|
"G4": "111100oo",
|
|
"G#4": "111011|o",
|
|
"A4": "111000oo",
|
|
"A#4": "110110oo",
|
|
"B4": "110000oo",
|
|
"C5": "101000oo",
|
|
"C#5": "011000oo",
|
|
"D5": "001000oo",
|
|
"D#5": "0011111o",
|
|
"E5": "-11111oo",
|
|
"F5": "-111101o",
|
|
"F#5": "-11101oo",
|
|
"G5": "-11100oo",
|
|
"G#5": "-11010oo",
|
|
"A5": "-11000oo",
|
|
"A#5": "-110011|",
|
|
"B5": "-11011oo",
|
|
"C6": "-10011oo",
|
|
"C#6": "-1011011",
|
|
"D6": "-1011011",
|
|
"D#6": "-011011o",
|
|
},
|
|
format:
|
|
`$note
|
|
|
|
$1
|
|
—
|
|
$2
|
|
$3
|
|
$4
|
|
—
|
|
$5
|
|
$6
|
|
$7
|
|
$8`
|
|
},
|
|
|
|
{
|
|
name: "Alto Recorder",
|
|
fingering: {
|
|
"F4": "11111111",
|
|
"F#4":"1111111|",
|
|
"G4": "11111110",
|
|
"G#4":"111111|o",
|
|
"A4": "111111oo",
|
|
"A#4":"11110011",
|
|
"B4": "1111011o",
|
|
"C5": "111100oo",
|
|
"C#5":"111011|o",
|
|
"D5": "111000oo",
|
|
"D#5":"110110oo",
|
|
"E5": "110000oo",
|
|
"F5": "101000oo",
|
|
"F#5":"011000oo",
|
|
"G5": "001000oo",
|
|
"G#5":"0011111o",
|
|
"A5": "-11111oo",
|
|
"A#5":"-111101o",
|
|
"B5": "-11101oo",
|
|
"C6": "-11100oo",
|
|
"C#6":"-11010oo",
|
|
"D6": "-11000oo",
|
|
"D#6":"-110011|",
|
|
"E6": "-11011oo",
|
|
"F6": "-10011oo",
|
|
"F#6": "-1011011",
|
|
"G6": "-1011011",
|
|
"G#6": "-011011o",
|
|
},
|
|
format:
|
|
`$note
|
|
|
|
$1
|
|
—
|
|
$2
|
|
$3
|
|
$4
|
|
—
|
|
$5
|
|
$6
|
|
$7
|
|
$8`
|
|
},
|
|
];
|