Refactor MIDI stuff so deck focusing is listenable and controllable
[SugarCubes.git] / MarkSlee.pde
index 7738419a68880123887e8b12336853ba005baa43..3a9b530cc4d44ddef86afe6c4e9b6c311a1fe232 100644 (file)
@@ -421,13 +421,15 @@ public class PianoKeyPattern extends SCPattern {
     return base[index % base.length];
   }
     
-  public void noteOnReceived(Note note) {
+  public boolean noteOnReceived(Note note) {
     LinearEnvelope env = getEnvelope(note.getPitch());
     env.setEndVal(min(1, env.getValuef() + (note.getVelocity() / 127.)), getAttackTime()).start();
+    return true;
   }
   
-  public void noteOffReceived(Note note) {
+  public boolean noteOffReceived(Note note) {
     getEnvelope(note.getPitch()).setEndVal(0, getReleaseTime()).start();
+    return true;
   }
   
   public void run(double deltaMs) {