(self, value)
Sets passthrough value, closing all open notes if being disabled.
Sets passthrough value, closing all open notes if being disabled.
Sets passthrough value closing all open notes if being disabled .
def passthrough(self, value):
    """Sets passthrough value, closing all open notes if being disabled."""
    if self._passthrough == value:
      return
    # Close all open notes.
    while self._open_notes:
      self._outport.send(mido.Message('note_off', note=self._open_notes.pop()))
    self._passthrough = value
def passthrough ( self , value ) : if self . _passthrough == value : return # Close all open notes. while self . _open_notes : self . _outport . send ( mido . Message ( 'note_off' , note = self . _open_notes . pop ( ) ) ) self . _passthrough = value