Update circleOfFifths.js
This commit is contained in:
@@ -3,8 +3,8 @@ let outC1;
|
||||
let outC2;
|
||||
let outCH;
|
||||
let outCT;
|
||||
let outCSP; // 分隔
|
||||
let outText = ["沒有升降", "1 個 #", "2 個 #", "3 個 #", "4 個 #", "7 個 b / 5 個 #", "6 個 b / 6 個 #", "5 個 b / 7 個 #", "4 個 b", "3 個 b", "2 個 b", "1 個 b"]
|
||||
let outCSP; // 分隔
|
||||
let outText = ["沒有å‡é™", "1 個 #", "2 個 #", "3 個 #", "4 個 #", "7 個 b / 5 個 #", "6 個 b / 6 個 #", "5 個 b / 7 個 #", "4 個 b", "3 個 b", "2 個 b", "1 個 b"]
|
||||
let outTextSize = 15;
|
||||
|
||||
let majorRatio = 0.74;
|
||||
@@ -22,18 +22,18 @@ let minorText = ["Am", "Em", "Bm", "F#m", "C#m", "Abm/G#m", "Ebm/D#m", "Bbm/A#m"
|
||||
let minorTextSize = 17;
|
||||
|
||||
let detailText1 = [
|
||||
"C 大調 ─ A 小調",
|
||||
"G 大調 ─ E 小調",
|
||||
"D 大調 ─ B 小調",
|
||||
"A 大調 ─ F# 小調",
|
||||
"E 大調 ─ C# 小調",
|
||||
"Cb 大調 ─ Ab 小調 / B 大調 ─ G# 小調",
|
||||
"Gb 大調 ─ Eb 小調 / F# 大調 ─ D# 小調",
|
||||
"Db 大調 ─ Bb 小調 / C# 大調 ─ A# 小調",
|
||||
"Ab 大調 ─ F 小調",
|
||||
"Eb 大調 ─ C 小調",
|
||||
"Bb 大調 ─ G 小調",
|
||||
"F 大調 ─ D 小調"
|
||||
"C 大調 ─ A å°èª¿",
|
||||
"G 大調 ─ E å°èª¿",
|
||||
"D 大調 ─ B å°èª¿",
|
||||
"A 大調 ─ F# å°èª¿",
|
||||
"E 大調 ─ C# å°èª¿",
|
||||
"Cb 大調 ─ Ab å°èª¿ / B 大調 ─ G# å°èª¿",
|
||||
"Gb 大調 ─ Eb å°èª¿ / F# 大調 ─ D# å°èª¿",
|
||||
"Db 大調 ─ Bb å°èª¿ / C# 大調 ─ A# å°èª¿",
|
||||
"Ab 大調 ─ F å°èª¿",
|
||||
"Eb 大調 ─ C å°èª¿",
|
||||
"Bb 大調 ─ G å°èª¿",
|
||||
"F 大調 ─ D å°èª¿"
|
||||
]
|
||||
let detailTextSize = 22;
|
||||
|
||||
@@ -86,7 +86,7 @@ function setup() {
|
||||
minorTextSize = width * 0.02125;
|
||||
detailTextSize = width * 0.0275;
|
||||
|
||||
lockButton = createButton('[已鎖定]');
|
||||
lockButton = createButton('[已鎖定]');
|
||||
lockButton.position(19, 19);
|
||||
lockButton.mousePressed(toggleLocked);
|
||||
|
||||
@@ -95,10 +95,10 @@ function setup() {
|
||||
|
||||
function toggleLocked() {
|
||||
if (locked) {
|
||||
lockButton.html("鎖定");
|
||||
lockButton.html("鎖定");
|
||||
locked = false;
|
||||
} else {
|
||||
lockButton.html("[已鎖定]");
|
||||
lockButton.html("[已鎖定]");
|
||||
locked = true;
|
||||
}
|
||||
}
|
||||
@@ -118,10 +118,8 @@ function drawOuter(ang) {
|
||||
strokeWeight(width / 600);
|
||||
for (i = 0; i < 12; i++) {
|
||||
fill((i % 2 == 0) ? outC1 : outC2);
|
||||
|
||||
if (i == highlighted()) {
|
||||
fill(outCH);
|
||||
|
||||
}
|
||||
let j = i + ang;
|
||||
arc(0, 0, width * outRatio, height * outRatio, TAU * (j / 12), TAU * ((j + 1) / 12) - 0.000001, PIE);
|
||||
@@ -133,7 +131,7 @@ function drawOuter(ang) {
|
||||
|
||||
function drawOuterText(ang) {
|
||||
for (i = 0; i < 12; i++) {
|
||||
let j = i + ang + 3.5; // 把第一個字畫到右方
|
||||
let j = i + ang + 3.5; // 把第一個å—ç•«åˆ°å³æ–¹
|
||||
push();
|
||||
rotate(TAU * (j / 12));
|
||||
textAlign(CENTER);
|
||||
@@ -288,7 +286,7 @@ function drawSigNumber(s, f) {
|
||||
default:
|
||||
fill(80);
|
||||
textSize(width / 60);
|
||||
text("♮", 0, height * 0.14);
|
||||
text("â™®", 0, height * 0.14);
|
||||
fill(60);
|
||||
}
|
||||
rect((0 + sp * i) * width, height * 0.12, height * w, height * h);
|
||||
@@ -297,7 +295,7 @@ function drawSigNumber(s, f) {
|
||||
}
|
||||
textSize(width / 60);
|
||||
fill(90);
|
||||
text(`(${-f} 個降記號 / ${s} 個升記號)`, 0, height * 0.16);
|
||||
text(`(${-f} 個é™è¨˜è™Ÿ / ${s} 個å‡è¨˜è™Ÿï¼‰`, 0, height * 0.16);
|
||||
}
|
||||
|
||||
function drawKeySig(sig, x, y) {
|
||||
@@ -343,7 +341,6 @@ function mouseAngle(ang) {
|
||||
let h = v.heading(); // -PI ~ PI
|
||||
let i = map(h, -PI, PI, 6, 18);
|
||||
mouseDir = (i > 12) ? i - 12 : i;
|
||||
// dbText = `${(mouseX-width/2)/width}, ${(mouseY-height/2)/height}`;
|
||||
|
||||
}
|
||||
|
||||
@@ -368,7 +365,7 @@ function draw() {
|
||||
background(95);
|
||||
translate(width / 2, height / 2);
|
||||
mouseAngle(angle);
|
||||
rotateGlobal()
|
||||
rotateGlobal();
|
||||
highlighted();
|
||||
drawOuter(angle);
|
||||
drawOuterText(angle);
|
||||
|
Reference in New Issue
Block a user