Selector/Selector.Web/scripts/Helper.ts

31 lines
393 B
TypeScript
Raw Normal View History

2021-11-11 19:54:28 +00:00
const keyStrings: string[] = [
"C",
"C#",
"D",
"D#",
"E",
"F",
"F#",
"G",
"G#",
"A",
"A#",
"B",
];
export function KeyString(keyCode: number): string
{
return keyStrings[keyCode];
}
export function ModeString(modeCode: number): string
{
if(modeCode === 1)
{
return "Major";
}
else {
return "Minor";
}
}