'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):

    self._channel = (_DEFAULT_METRONOME_CHANNEL if (channel is None) else channel)
    self._outport.send(mido.Message(type='program_change', program=program, channel=self._channel))
    self._period = (60.0 / qpm)
    self._start_time = start_time
    self._stop_time = stop_time
    self._messages = (_DEFAULT_METRONOME_MESSAGES if (signals is None) else [(s.to_message() if s else None) for s in signals])
    self._duration = duration
