- public void mouseClicked(MouseEvent e) {
- if (pitchRect.contains(e.getPoint())) {
- if (SwingUtilities.isRightMouseButton(e)) {
- note.setPitch(note.getPitch() + 1);
- } else if (SwingUtilities.isLeftMouseButton(e)) {
- note.setPitch(note.getPitch() - 1);
+ public void mousePressed(MouseEvent e) {
+ if (e.isControlDown()) {
+ if (pitchRect.contains(e.getPoint())) {
+ if (SwingUtilities.isRightMouseButton(e)) {
+ note.setPitch(note.getPitch() + 1);
+ } else if (SwingUtilities.isLeftMouseButton(e)) {
+ note.setPitch(note.getPitch() - 1);
+ }
+ calculateString();
+ } else if (veloRect.contains(e.getPoint())) {
+ if (SwingUtilities.isRightMouseButton(e)) {
+ note.setVelocity(note.getVelocity() + 1);
+ } else if (SwingUtilities.isLeftMouseButton(e)) {
+ note.setVelocity(note.getVelocity() - 1);
+ }
+ calculateString();