]> ruin.nu Git - moosique.git/blobdiff - MooKeyboard.java
font settings..
[moosique.git] / MooKeyboard.java
index 8b4389ddbda97bf47f4fbc7f768cae8b386cc30a..35b2496ff0fa707a8b74bb0bdee285ab7d041cf2 100644 (file)
@@ -2,7 +2,7 @@ import javax.sound.midi.*;
 import java.awt.event.*;
 
 /**
- * Functional representation of a MIDI note, which contains two MIDI events, note on and note off.
+ * A keyboard listener emulating a synthesizer.
  * 
  * @author  Einar Pehrson
  */
@@ -47,7 +47,7 @@ public class MooKeyboard extends KeyAdapter {
         * Sets the octave of the lower part of the keyboard (default = 4)
         * @param n     the octave to start at
         */
-       public void setOctave(int n) {
+       public static void setOctave(int n) {
                startNote = n * 12;
        }
 
@@ -59,7 +59,7 @@ public class MooKeyboard extends KeyAdapter {
         * z x c v b n m , .    => c d e f g a b c d
         */
        static {
-               keyToNote[90] = startNote;
+               keyToNote[KeyEvent.VK_Q] = startNote;
                keyToNote[83] = startNote + 1;
                keyToNote[88] = startNote + 2;
                keyToNote[68] = startNote + 3;
@@ -92,4 +92,4 @@ public class MooKeyboard extends KeyAdapter {
                keyToNote[48] = startNote + 27;
                keyToNote[80] = startNote + 28;
        }
-}
\ No newline at end of file
+}