X-Git-Url: https://ruin.nu/git/?p=moosique.git;a=blobdiff_plain;f=MooKeyboard.java;h=2a2bd9ead52f0797785de9e127154f2d6a965a11;hp=90ed18fd4acf3d582b7569f08f16c23b25fc4ebc;hb=c3a31c2aa833e2197f0929655c69a2090e8bbecc;hpb=e49990e17bff158ad638a16ba4aa616673b94627 diff --git a/MooKeyboard.java b/MooKeyboard.java index 90ed18f..2a2bd9e 100644 --- a/MooKeyboard.java +++ b/MooKeyboard.java @@ -23,6 +23,7 @@ public class MooKeyboard extends KeyAdapter { // If note is not already on and the key is mapped to a note, sends the NoteOn event. if (!isOn[noteNumber] && noteNumber > 0) Moosique.getActiveChannel().noteOn(noteNumber, 127); isOn[noteNumber] = true; + System.out.println("NoteON"); } catch (ArrayIndexOutOfBoundsException x) { return; } @@ -38,6 +39,7 @@ public class MooKeyboard extends KeyAdapter { // Sends the NoteOff event. Moosique.getActiveChannel().noteOff(noteNumber); isOn[noteNumber] = false; + System.out.println("NoteOFF"); } catch (ArrayIndexOutOfBoundsException x) { return; } @@ -47,7 +49,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; } @@ -92,4 +94,4 @@ public class MooKeyboard extends KeyAdapter { keyToNote[48] = startNote + 27; keyToNote[80] = startNote + 28; } -} \ No newline at end of file +}