MIDI_practice/html/assets/scripts/map.js

169 lines
2.7 KiB
JavaScript
Raw Normal View History

2023-06-05 00:36:25 +00:00
// access ex: noteMap.get("C0");
// Maps key names to key number
2023-06-05 15:47:46 +00:00
var nat_values = [
["C/2" ,16],
["D/2" ,18],
["E/2" ,20],
["F/2" ,21],
["G/2" ,23],
["A/2" ,25],
["B/2" ,27],
["C/3" ,28],
["D/3" ,30],
["E/3" ,32],
["F/3" ,33],
["G/3" ,35],
["A/3" ,37],
["B/3" ,39],
["C/4" ,40],
["D/4" ,42],
["E/4" ,44],
["F/4" ,45],
["G/4" ,47],
["A/4" ,49],
["B/4" ,51],
["C/5" ,52],
["D/5" ,54],
["E/5" ,56],
["F/5" ,57],
["G/5" ,59],
["A/5" ,61],
["B/5" ,63],
["C/6" ,64]
];
var nat_values_ex = [
["A/0" , 1],
["B/0" , 3],
["C/1" , 4],
["D/1" , 6],
["E/1" , 8],
["F/1" , 9],
["G/1" ,11],
["A/1" ,13],
["B/1" ,15],
["D/6" ,66],
["E/6" ,68],
["F/6" ,69],
["G/6" ,71],
["A/6" ,73],
["B/6" ,75],
["C/7" ,76],
["D/7" ,78],
["E/7" ,80],
["F/7" ,81],
["G/7" ,83],
["A/7" ,85],
["B/7" ,87],
["C/8", 88]
];
var shp_values = [
["C#/2",17],
["D#/2",19],
["E#/2",21],
["F#/2",22],
["G#/2",24],
["A#/2",26],
["B#/2",28],
["C#/3",29],
["D#/3",31],
["E#/3",33],
["F#/3",34],
["G#/3",36],
["A#/3",38],
["B#/3",40],
["C#/4",41],
["D#/4",43],
["E#/4",45],
["F#/4",46],
["G#/4",48],
["A#/4",50],
["B#/4",52],
["C#/5",53],
["D#/5",55],
["E#/5",57],
["F#/5",58],
["G#/5",60],
["A#/5",62],
["B#/5",64],
["C#/6",65]
];
var shp_values_ex = [
["A#/0", 2],
["B#/0", 4],
["C#/1", 5],
["D#/1", 7],
["E#/1", 9],
["F#/1",10],
["G#/1",12],
["A#/1",14],
["B#/1",16],
["D#/6",67],
["E#/6",69],
["F#/6",70],
["G#/6",72],
["A#/6",74],
["B#/6",76],
["C#/7",77],
["D#/7",79],
["E#/7",81],
["F#/7",82],
["G#/7",84],
["A#/7",86],
["B#/7",88]
];
var flt_values = [
["Cb/2",15],
["Db/2",17],
["Eb/2",19],
["Fb/2",20],
["Gb/2",22],
["Ab/2",24],
["Bb/2",26],
["Cb/3",27],
["Db/3",29],
["Eb/3",31],
["Fb/3",32],
["Gb/3",34],
["Ab/3",36],
["Bb/3",38],
["Cb/4",39],
["Db/4",41],
["Eb/4",43],
["Fb/4",44],
["Gb/4",46],
["Ab/4",48],
["Bb/4",50],
["Cb/5",51],
["Db/5",53],
["Eb/5",55],
["Fb/5",56],
["Gb/5",58],
["Ab/5",60],
["Bb/5",62],
["Cb/6",63]
];
flt_values_ex = [
["Bb/0", 2],
["Cb/1", 3],
["Db/1", 5],
["Eb/1", 7],
["Fb/1", 8],
["Gb/1",10],
["Ab/1",12],
["Bb/1",14],
["Db/6",65],
["Eb/6",67],
["Fb/6",68],
["Gb/6",70],
["Ab/6",72],
["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]
]