split notes up into categories

This commit is contained in:
krippix 2023-06-05 17:47:46 +02:00 committed by Dennis
parent d7a54a7e8e
commit e690ef14c1

View file

@ -1,161 +1,169 @@
// access ex: noteMap.get("C0"); // access ex: noteMap.get("C0");
// Maps key names to key number // Maps key names to key number
{
let values = [ var nat_values = [
["A0" , 1], ["C/2" ,16],
["A#0", 2], ["D/2" ,18],
["Bb0", 2], ["E/2" ,20],
["B0" , 3], ["F/2" ,21],
["B#0", 4], ["G/2" ,23],
["Cb1", 3], ["A/2" ,25],
["C1" , 4], ["B/2" ,27],
["C#1", 5], ["C/3" ,28],
["Db1", 5], ["D/3" ,30],
["D1" , 6], ["E/3" ,32],
["D#1", 7], ["F/3" ,33],
["Eb1", 7], ["G/3" ,35],
["E1" , 8], ["A/3" ,37],
["E#1", 9], ["B/3" ,39],
["Fb1", 8], ["C/4" ,40],
["F1" , 9], ["D/4" ,42],
["F#1",10], ["E/4" ,44],
["Gb1",10], ["F/4" ,45],
["G1" ,11], ["G/4" ,47],
["G#1",12], ["A/4" ,49],
["Ab1",12], ["B/4" ,51],
["A1" ,13], ["C/5" ,52],
["A#1",14], ["D/5" ,54],
["Bb1",14], ["E/5" ,56],
["B1" ,15], ["F/5" ,57],
["B#1",16], ["G/5" ,59],
["Cb2",15], ["A/5" ,61],
["C2" ,16], ["B/5" ,63],
["C#2",17], ["C/6" ,64]
["Db2",17], ];
["D2" ,18], var nat_values_ex = [
["D#2",19], ["A/0" , 1],
["Eb2",19], ["B/0" , 3],
["E2" ,20], ["C/1" , 4],
["E#2",21], ["D/1" , 6],
["Fb2",20], ["E/1" , 8],
["F2" ,21], ["F/1" , 9],
["F#2",22], ["G/1" ,11],
["Gb2",22], ["A/1" ,13],
["G2" ,23], ["B/1" ,15],
["G#2",24], ["D/6" ,66],
["Ab2",24], ["E/6" ,68],
["A2" ,25], ["F/6" ,69],
["A#2",26], ["G/6" ,71],
["Bb2",26], ["A/6" ,73],
["B2" ,27], ["B/6" ,75],
["B#2",28], ["C/7" ,76],
["Cb3",27], ["D/7" ,78],
["C3" ,28], ["E/7" ,80],
["C#3",29], ["F/7" ,81],
["Db3",29], ["G/7" ,83],
["D3" ,30], ["A/7" ,85],
["D#3",31], ["B/7" ,87],
["Eb3",31], ["C/8", 88]
["E3" ,32], ];
["E#3",33], var shp_values = [
["Fb3",32], ["C#/2",17],
["F3" ,33], ["D#/2",19],
["F#3",34], ["E#/2",21],
["Gb3",34], ["F#/2",22],
["G3" ,35], ["G#/2",24],
["G#3",36], ["A#/2",26],
["Ab3",36], ["B#/2",28],
["A3" ,37], ["C#/3",29],
["A#3",38], ["D#/3",31],
["Bb3",38], ["E#/3",33],
["B3" ,39], ["F#/3",34],
["B#3",40], ["G#/3",36],
["Cb4",39], ["A#/3",38],
["C4" ,40], ["B#/3",40],
["C#4",41], ["C#/4",41],
["Db4",41], ["D#/4",43],
["D4" ,42], ["E#/4",45],
["D#4",43], ["F#/4",46],
["Eb4",43], ["G#/4",48],
["E4" ,44], ["A#/4",50],
["E#4",45], ["B#/4",52],
["Fb4",44], ["C#/5",53],
["F4" ,45], ["D#/5",55],
["F#4",46], ["E#/5",57],
["Gb4",46], ["F#/5",58],
["G4" ,47], ["G#/5",60],
["G#4",48], ["A#/5",62],
["Ab4",48], ["B#/5",64],
["A4" ,49], ["C#/6",65]
["A#4",50], ];
["Bb4",50], var shp_values_ex = [
["B4" ,51], ["A#/0", 2],
["B#4",52], ["B#/0", 4],
["Cb5",51], ["C#/1", 5],
["C5" ,52], ["D#/1", 7],
["C#5",53], ["E#/1", 9],
["Db5",53], ["F#/1",10],
["D5" ,54], ["G#/1",12],
["D#5",55], ["A#/1",14],
["Eb5",55], ["B#/1",16],
["E5" ,56], ["D#/6",67],
["E#5",57], ["E#/6",69],
["Fb5",56], ["F#/6",70],
["F5" ,57], ["G#/6",72],
["F#5",58], ["A#/6",74],
["Gb5",58], ["B#/6",76],
["G5" ,59], ["C#/7",77],
["G#5",60], ["D#/7",79],
["Ab5",60], ["E#/7",81],
["A5" ,61], ["F#/7",82],
["A#5",62], ["G#/7",84],
["Bb5",62], ["A#/7",86],
["B5" ,63], ["B#/7",88]
["B#5",64], ];
["Cb6",63], var flt_values = [
["C6" ,64], ["Cb/2",15],
["C#6",65], ["Db/2",17],
["Db6",65], ["Eb/2",19],
["D6" ,66], ["Fb/2",20],
["D#6",67], ["Gb/2",22],
["Eb6",67], ["Ab/2",24],
["E6" ,68], ["Bb/2",26],
["E#6",69], ["Cb/3",27],
["Fb6",68], ["Db/3",29],
["F6" ,69], ["Eb/3",31],
["F#6",70], ["Fb/3",32],
["Gb6",70], ["Gb/3",34],
["G6" ,71], ["Ab/3",36],
["G#6",72], ["Bb/3",38],
["Ab6",72], ["Cb/4",39],
["A6" ,73], ["Db/4",41],
["A#6",74], ["Eb/4",43],
["Bb6",74], ["Fb/4",44],
["B6" ,75], ["Gb/4",46],
["B#6",76], ["Ab/4",48],
["Cb7",75], ["Bb/4",50],
["C7" ,76], ["Cb/5",51],
["C#7",77], ["Db/5",53],
["Db7",77], ["Eb/5",55],
["D7" ,78], ["Fb/5",56],
["D#7",79], ["Gb/5",58],
["Eb7",79], ["Ab/5",60],
["E7" ,80], ["Bb/5",62],
["E#7",81], ["Cb/6",63]
["Fb7",80], ];
["F7" ,81], flt_values_ex = [
["F#7",82], ["Bb/0", 2],
["Gb7",82], ["Cb/1", 3],
["G7" ,83], ["Db/1", 5],
["G#7",84], ["Eb/1", 7],
["Ab7",84], ["Fb/1", 8],
["A7" ,85], ["Gb/1",10],
["A#7",86], ["Ab/1",12],
["Bb7",86], ["Bb/1",14],
["B7" ,87], ["Db/6",65],
["B#7",88], ["Eb/6",67],
["Cb8",87], ["Fb/6",68],
["C8", 88] ["Gb/6",70],
]; ["Ab/6",72],
var noteMap = new Map(values); ["Bb/6",74],
} ["Cb/7",75],
["Db/7",77],
["Eb/7",79],
["Fb/7",80],
["Gb/7",82],
["Ab/7",84],
["Bb/7",86],
["Cb/8",87]
]