diff --git a/static/piano/index.html b/static/piano/index.html
index 7c4603e..0918d16 100644
--- a/static/piano/index.html
+++ b/static/piano/index.html
@@ -31,7 +31,7 @@
);
}
- // arrange notes so that moving three keys sideways is exactly an octave. makes it easy to play octaves. everything else is wonky though...
+ // arrange notes "isomorphically". moving sideways is 5 semitones, moving diagonally upwards is 2 semitones.
function useEqualSteps() {
const rows = [
"1234567890-=",
@@ -42,7 +42,7 @@
tone = {};
rows.map((row, y) => {
row.split('').map((key, x) => {
- const semitone = x * 4 + y - 20;
+ const semitone = Math.floor(x * 5 + y * 2 - 28);
tone[key] = 440 * 2 ** (semitone / 12);
})
});