(self,
             qpm,
             start_time,
             stop_time=None,
             program=_DEFAULT_METRONOME_PROGRAM,
             signals=None,
             duration=_DEFAULT_METRONOME_TICK_DURATION,
             channel=None)
Updates Metronome options.
Updates Metronome options.
Updates Metronome options .
def update(self,
             qpm,
             start_time,
             stop_time=None,
             program=_DEFAULT_METRONOME_PROGRAM,
             signals=None,
             duration=_DEFAULT_METRONOME_TICK_DURATION,
             channel=None):
    """Updates Metronome options."""
    # Locking is not required since variables are independent and assignment is
    # atomic.
    self._channel = _DEFAULT_METRONOME_CHANNEL if channel is None else channel

    # Set the program number for the channels.
    self._outport.send(
        mido.Message(
            type='program_change', program=program, channel=self._channel))
    self._period = 60. / qpm
    self._start_time = start_time
    self._stop_time = stop_time
    if signals is None:
      self._messages = _DEFAULT_METRONOME_MESSAGES
    else:
      self._messages = [s.to_message() if s else None for s in signals]
    self._duration = duration
def update ( self , qpm , start_time , stop_time = None , program = _DEFAULT_METRONOME_PROGRAM , signals = None , duration = _DEFAULT_METRONOME_TICK_DURATION , channel = None ) : # Locking is not required since variables are independent and assignment is # atomic. self . _channel = _DEFAULT_METRONOME_CHANNEL if channel is None else channel # Set the program number for the channels. self . _outport . send ( mido . Message ( type = 'program_change' , program = program , channel = self . _channel ) ) self . _period = 60. / qpm self . _start_time = start_time self . _stop_time = stop_time if signals is None : self . _messages = _DEFAULT_METRONOME_MESSAGES else : self . _messages = [ s . to_message ( ) if s else None for s in signals ] self . _duration = duration