Toggle Flat Note Names

This commit is contained in:
Wiwi Kuan 2023-03-30 19:21:44 +08:00 committed by GitHub
parent 3a35d1cb56
commit 76723fd701
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View file

@ -23,6 +23,8 @@ let cc67now = 0;
let sessionStartTime = new Date(); let sessionStartTime = new Date();
let sessionTotalSeconds = 0; let sessionTotalSeconds = 0;
let flatNames = false;
// note counter // note counter
let notesThisFrame = 0; let notesThisFrame = 0;
let totalNotesPlayed = 0; let totalNotesPlayed = 0;

View file

@ -33,7 +33,7 @@
</div> </div>
<span style="font-size: 11px;"> <span style="font-size: 11px;">
TIME使用時間 | NOTE COUNT總彈奏音符數 | NPS最近一秒鐘彈奏音符數括號為歷史最大值 | LEGATO圓滑指數最近一秒鐘平均來說有幾個鍵被同時按住 <br /> TIME使用時間 | NOTE COUNT總彈奏音符數 | NPS最近一秒鐘彈奏音符數括號為歷史最大值 | LEGATO圓滑指數最近一秒鐘平均來說有幾個鍵被同時按住 <br />
CALORIES消耗熱量估計值好玩就好| KEYS現在正在被按住或被踏板留住的音 | PEDALS左右踏板深度顯示 <br /> CALORIES消耗熱量估計值好玩就好| PEDALS左右踏板深度顯示 <br />
(密技:點鍵盤最左上角的角落,可以儲存截圖) <br /><br /> (密技:點鍵盤最左上角的角落,可以儲存截圖) <br /><br />
</span> </span>

View file

@ -188,9 +188,9 @@ function getPressedKeys(returnString = true) {
} }
let noteNames = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B']; // default if sharp let noteNames = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B']; // default if sharp
if ([0, 1, 3, 5, 8, 10].includes(pressedOrPedaled.indexOf(1) % 12)) { if (flatNames) {
// flat // flat
// noteNames = ['C', 'Db', 'D', 'Eb', 'E', 'F', 'Gb', 'G', 'Ab', 'A', 'Bb', 'B']; noteNames = ['C', 'Db', 'D', 'Eb', 'E', 'F', 'Gb', 'G', 'Ab', 'A', 'Bb', 'B'];
} }
const pressedKeys = []; const pressedKeys = [];
@ -239,6 +239,10 @@ function mouseClicked() {
if (mouseX > 347 && mouseX < 420) { if (mouseX > 347 && mouseX < 420) {
totalIntensityScore = 0; // RESET CALORIES totalIntensityScore = 0; // RESET CALORIES
} }
if (mouseX > 441 && mouseX < 841) {
flatNames = !flatNames; // toggle flat
}
} }
console.log(mouseX, mouseY); console.log(mouseX, mouseY);
} }