• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

MIDI Chord Helper機能追加版(GOは五度圏や碁盤の「ご」。別に移動式じゃありません)


Commit MetaInfo

Révision4fb0e1380c86357d4695c0e0749c3cb4bfad58e5 (tree)
l'heure2022-10-07 02:21:10
Auteurk-hatano <kent.ruffle.mgj626@gmai...>
Commiterk-hatano

Message de Log

ガイドを7とM7 6で分離、ハーモニックテーブルノートレイアウトを細かく

Change Summary

Modification

--- a/src/camidion/chordhelper/chordmatrix/ChordGuide.java
+++ b/src/camidion/chordhelper/chordmatrix/ChordGuide.java
@@ -15,7 +15,8 @@ import javax.swing.JPopupMenu;
1515 */
1616 public class ChordGuide extends JPanel {
1717 public static enum Guide {
18- GUIDE_76(76),
18+ GUIDE_7(7),
19+ GUIDE_6(6),
1920 GUIDE_5(5),
2021 GUIDE_9(9);
2122
@@ -73,11 +74,19 @@ public class ChordGuide extends JPanel {
7374
7475 }
7576
76- private ChordGuideLabel guide76, guide5, guide9;
77+ private ChordGuideLabel guide7, guide6, guide5, guide9;
7778
7879 public ChordGuide(ChordMatrix cm) {
7980 setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
80- add(guide76 = new ChordGuideLabel(" 6 7 M7 ", cm) {
81+ add(guide7 = new ChordGuideLabel(" 7 ", cm) {
82+ {
83+ setToolTipText("How to add 7th, major 7th, 6th");
84+ addMenu(new JMenuItem("7 = <RightClick>"));
85+ addMenu(new JMenuItem("M7(maj7) = [Shift] <RightClick>"));
86+ addMenu(new JMenuItem("6 = [Shift]"));
87+ }
88+ });
89+ add(guide6 = new ChordGuideLabel(" M7 6 ", cm) {
8190 {
8291 setToolTipText("How to add 7th, major 7th, 6th");
8392 addMenu(new JMenuItem("7 = <RightClick>"));
@@ -114,15 +123,19 @@ public class ChordGuide extends JPanel {
114123
115124 public void setDarkMode(boolean is_dark) {
116125 setBackground(is_dark ? Color.black : null);
117- guide76.setDarkMode(is_dark);
126+ guide7.setDarkMode(is_dark);
127+ guide6.setDarkMode(is_dark);
118128 guide5.setDarkMode(is_dark);
119129 guide9.setDarkMode(is_dark);
120130 }
121131
122132 public void changeActive(Guide which, boolean is_active) {
123133 switch (which) {
124- case GUIDE_76:
125- guide76.setActive(is_active);
134+ case GUIDE_7:
135+ guide7.setActive(is_active);
136+ break;
137+ case GUIDE_6:
138+ guide6.setActive(is_active);
126139 break;
127140 case GUIDE_5:
128141 guide5.setActive(is_active);
@@ -136,7 +149,8 @@ public class ChordGuide extends JPanel {
136149 }
137150
138151 public void deactivateAll() {
139- guide76.setActive(false);
152+ guide7.setActive(false);
153+ guide6.setActive(false);
140154 guide5.setActive(false);
141155 guide9.setActive(false);
142156 }
--- a/src/camidion/chordhelper/chordmatrix/ChordMatrix.java
+++ b/src/camidion/chordhelper/chordmatrix/ChordMatrix.java
@@ -807,7 +807,7 @@ public class ChordMatrix extends JPanel
807807 int keyCo5 = key.toCo5();
808808
809809 if (keyCode == KeyEvent.VK_SHIFT) {
810- chordGuide.changeActive(ChordGuide.Guide.GUIDE_76, true);
810+ chordGuide.changeActive(ChordGuide.Guide.GUIDE_6, true);
811811 return;
812812 }
813813 if (keyCode == KeyEvent.VK_ALT) {
@@ -917,7 +917,7 @@ public class ChordMatrix extends JPanel
917917 public void keyReleased(KeyEvent e) {
918918 int keyCode = e.getKeyCode();
919919 if (keyCode == KeyEvent.VK_SHIFT) {
920- chordGuide.changeActive(ChordGuide.Guide.GUIDE_76, false);
920+ chordGuide.changeActive(ChordGuide.Guide.GUIDE_6, false);
921921 return;
922922 }
923923 if (keyCode == KeyEvent.VK_ALT) {
--- a/src/camidion/chordhelper/pitchspace/CircularPitchSpace.java
+++ b/src/camidion/chordhelper/pitchspace/CircularPitchSpace.java
@@ -165,10 +165,10 @@ public class CircularPitchSpace extends JPanel {
165165 g.fillRect(0, 0, this.getWidth(), this.getHeight());
166166 }
167167
168- Color[] lineColors = { new Color(0x20, 0xD0, 0xD0),
169- new Color(0xD0, 0xD0, 0x00),
170- new Color(0xF0, 0x20, 0xF0),
171- new Color(0xC0, 0xC0, 0xC0)
168+ Color[] lineColors = { new Color(0x00, 0x00, 0xC0),
169+ new Color(0xC0, 0xC0, 0x00),
170+ new Color(0xC0, 0x00, 0x00),
171+ new Color(0x80, 0x80, 0x80)
172172 };
173173
174174 for (int i = 0; i < 12; i++) {
--- a/src/camidion/chordhelper/pitchspace/HarmonicTableLayout.java
+++ b/src/camidion/chordhelper/pitchspace/HarmonicTableLayout.java
@@ -13,7 +13,7 @@ import javax.swing.JComponent;
1313 import javax.swing.JPanel;
1414
1515 public class HarmonicTableLayout extends JPanel {
16- final int OVAL_WIDTH = 24;
16+ final int OVAL_WIDTH = 20;
1717
1818 private HarmonicTableLayoutComponent component;
1919 ArrayList<JComponent> views = new ArrayList<JComponent>();
@@ -83,8 +83,8 @@ public class HarmonicTableLayout extends JPanel {
8383
8484 int offset = 120;
8585
86- for (int iy = -2; iy < 12; iy++) {
87- for (int ix = -2; ix < 6; ix++) {
86+ for (int iy = -2; iy < 14; iy++) {
87+ for (int ix = -2; ix < 7; ix++) {
8888 if ((ix + iy) % 2 != 0) {
8989 continue;
9090 }
@@ -151,8 +151,8 @@ public class HarmonicTableLayout extends JPanel {
151151 new Color(0xFF, 0xFF, 0xA0)
152152 };
153153
154- for (int iy = -2; iy < 12; iy++) {
155- for (int ix = -2; ix < 6; ix++) {
154+ for (int iy = -2; iy < 14; iy++) {
155+ for (int ix = -2; ix < 7; ix++) {
156156 if ((ix + iy) % 2 != 0) {
157157 continue;
158158 }
@@ -232,8 +232,8 @@ public class HarmonicTableLayout extends JPanel {
232232 }
233233 }
234234
235- for (int iy = -2; iy < 12; iy++) {
236- for (int ix = -2; ix < 6; ix++) {
235+ for (int iy = -2; iy < 14; iy++) {
236+ for (int ix = -2; ix < 7; ix++) {
237237 if ((ix + iy) % 2 != 0) {
238238 continue;
239239 }
@@ -251,7 +251,7 @@ public class HarmonicTableLayout extends JPanel {
251251 g.setColor(Color.black);
252252 g.drawOval(x - OVAL_WIDTH / 2, y - OVAL_WIDTH / 2, OVAL_WIDTH, OVAL_WIDTH);
253253 g.setColor(Color.black);
254- g.drawString(ix <= 1 ? notesLabelsWithFlat[noteIndex] : notesLabelsWithSharp[noteIndex],
254+ g.drawString(ix <= 2 ? notesLabelsWithFlat[noteIndex] : notesLabelsWithSharp[noteIndex],
255255 x - 4, y + 6);
256256 } else {
257257 g.setColor(Color.black);
@@ -259,7 +259,7 @@ public class HarmonicTableLayout extends JPanel {
259259 g.setColor(Color.black);
260260 g.drawOval(x - OVAL_WIDTH / 2, y - OVAL_WIDTH / 2, OVAL_WIDTH, OVAL_WIDTH);
261261 g.setColor(Color.white);
262- g.drawString(ix <= 1 ? notesLabelsWithFlat[noteIndex] : notesLabelsWithSharp[noteIndex],
262+ g.drawString(ix <= 2 ? notesLabelsWithFlat[noteIndex] : notesLabelsWithSharp[noteIndex],
263263 x - 4, y + 6);
264264 }
265265 } else {
@@ -267,13 +267,13 @@ public class HarmonicTableLayout extends JPanel {
267267 g.setColor(new Color(214, 214, 214));
268268 g.fillOval(x - OVAL_WIDTH / 2, y - OVAL_WIDTH / 2, OVAL_WIDTH, OVAL_WIDTH);
269269 g.setColor(new Color(254, 254, 254));
270- g.drawString(ix <= 1 ? notesLabelsWithFlat[noteIndex] : notesLabelsWithSharp[noteIndex],
270+ g.drawString(ix <= 2 ? notesLabelsWithFlat[noteIndex] : notesLabelsWithSharp[noteIndex],
271271 x - 4, y + 6);
272272 } else {
273273 g.setColor(new Color(190, 190, 190));
274274 g.fillOval(x - OVAL_WIDTH / 2, y - OVAL_WIDTH / 2, OVAL_WIDTH, OVAL_WIDTH);
275275 g.setColor(new Color(230, 230, 230));
276- g.drawString(ix <= 1 ? notesLabelsWithFlat[noteIndex] : notesLabelsWithSharp[noteIndex],
276+ g.drawString(ix <= 2 ? notesLabelsWithFlat[noteIndex] : notesLabelsWithSharp[noteIndex],
277277 x - 4, y + 6);
278278 }
279279 }