def remove_event(self, step, index):
     if index >= len(self.keymap):
         return
     note = self.keymap[index]['note']
     libseq.removeNote(step, note)
     libseq.playNote(note, 0, self.channel)  # Silence note if sounding
     self.draw_row(index)
     self.select_cell(step, index)
 def on_pianoroll_press(self, event):
     if self.parent.lst_menu.winfo_viewable():
         self.parent.hide_menu()
         return
     self.piano_roll_drag_start = event
     index = self.keymap_offset + self.zoom - int(
         event.y / self.row_height) - 1
     if index >= len(self.keymap):
         return
     note = self.keymap[index]['note']
     libseq.playNote(note, 100, self.channel, 200)
 def play_note(self, note):
     if libseq.getPlayState(
             self.bank,
             self.sequence) == zynthian_gui_stepsequencer.SEQ_STOPPED:
         libseq.playNote(note, 100, self.channel, 200)