From: Michael Andreen Date: Fri, 16 May 2003 12:02:01 +0000 (+0000) Subject: listener fixed X-Git-Url: https://ruin.nu/git/?p=moosique.git;a=commitdiff_plain;h=068401ca0cb0e4f38b1368b357ef7705ac4d21fd listener fixed --- diff --git a/MooKeyboard.java b/MooKeyboard.java index 11f45fc..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; } @@ -92,4 +94,4 @@ public class MooKeyboard extends KeyAdapter { keyToNote[48] = startNote + 27; keyToNote[80] = startNote + 28; } -} \ No newline at end of file +} diff --git a/MooTrackView.java b/MooTrackView.java index 854cfec..22c7ecc 100644 --- a/MooTrackView.java +++ b/MooTrackView.java @@ -151,6 +151,7 @@ public class MooTrackView extends JPanel { public void mouseEntered(MouseEvent e) { // Moosique.setActiveChannel(track.getChannel()); + grabFocus(); } } }