+ def handleNormalColumnOver(self, event) :
+ col = event.column
+ if col.state and \
+ any(event.mouseEvent.buttons) and \
+ not self.currentNotePlayed :
+ self.playnote(col, event.pos)
+ self.currentNotePlayed = True
+
+ def handleColumnDown(self, event) :
+ col = event.column
+ if col.state:
+ self.playnote(col, event.pos)
+ self.currentNotePlayed = True
+
+ def handleExpertColumnDown(self, event) :
+ col = event.column
+ if col.state :
+ self.playnote(col, event.pos)
+ self.currentNotePlayed = True
+ else :
+ vel = self.getVelocity(event.pos) * MIDI_VELOCITY_WRONG_NOTE_ATTN
+ vel = int(vel)
+ self.playnote(col, event.pos, vel=vel)
+ self.alternateColumn = col
+ self.currentNotePlayed = False
+
+ def handleColumnUp(self, event) :
+ if self.currentNotePlayed :
+ self.synth.noteoff(0, self.currentColumn.tone.midi)
+ self.displayNext()
+
+ def handleExpertColumnUp(self, event) :
+ if self.currentNotePlayed :
+ self.synth.noteoff(0, self.currentColumn.tone.midi)
+ self.displayNext()
+ else :
+ self.synth.noteoff(0, self.alternateColumn.tone.midi)
+
+ # --- End HID listeners ---
+
+