aboutsummaryrefslogtreecommitdiffstats
path: root/app/notes.js
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2021-12-20 15:22:57 +0000
committers-ol <s+removethis@s-ol.nu>2021-12-20 15:22:57 +0000
commit930c3a7c40e1b1e5fa834167d4fc79a067c322f4 (patch)
treef7e850b53c7690d521951ae4b2909f6f1ce52b7f /app/notes.js
parentadd blink function (diff)
downloadisomorphic-kb-explorer-930c3a7c40e1b1e5fa834167d4fc79a067c322f4.tar.gz
isomorphic-kb-explorer-930c3a7c40e1b1e5fa834167d4fc79a067c322f4.zip
add chord display
Diffstat (limited to 'app/notes.js')
-rw-r--r--app/notes.js54
1 files changed, 53 insertions, 1 deletions
diff --git a/app/notes.js b/app/notes.js
index 3d0e659..0e3e92d 100644
--- a/app/notes.js
+++ b/app/notes.js
@@ -1,4 +1,4 @@
-export default {
+export const music = {
11: 'B',
10: 'A#',
9: 'A',
@@ -12,3 +12,55 @@ export default {
1: 'C#',
0: 'C',
};
+
+export const key2midi = {
+ 'KeyZ': 49,
+ 'KeyX': 51,
+ 'KeyC': 53,
+ 'KeyV': 55,
+ 'KeyB': 57,
+ 'KeyN': 59,
+ 'KeyM': 61,
+ 'Comma': 63,
+ 'Period': 65,
+ 'Slash': 67,
+
+ 'KeyA': 54,
+ 'KeyS': 56,
+ 'KeyD': 58,
+ 'KeyF': 60,
+ 'KeyG': 62,
+ 'KeyH': 64,
+ 'KeyJ': 66,
+ 'KeyK': 68,
+ 'KeyL': 70,
+ 'Semicolon': 72,
+ 'Quote': 74,
+ 'Backslash': 76,
+
+ 'KeyQ': 61,
+ 'KeyW': 63,
+ 'KeyE': 65,
+ 'KeyR': 67,
+ 'KeyT': 69,
+ 'KeyY': 71,
+ 'KeyU': 73,
+ 'KeyI': 75,
+ 'KeyO': 77,
+ 'KeyP': 79,
+ 'BracketLeft': 81,
+ 'BracketRight': 83,
+
+ 'Digit1': 66,
+ 'Digit2': 68,
+ 'Digit3': 70,
+ 'Digit4': 72,
+ 'Digit5': 74,
+ 'Digit6': 76,
+ 'Digit7': 78,
+ 'Digit8': 80,
+ 'Digit9': 82,
+ 'Digit0': 84,
+ 'Minus': 86,
+ 'Equal': 88,
+};