def trigger_action(self): if self.can_duplicate_loop: clip = self.song().view.detail_clip if clip != None: try: clip.duplicate_loop() self.show_notification( MessageBoxText.DUPLICATE_LOOP % dict(length=convert_length_to_bars_beats_sixteenths( clip.loop_end - clip.loop_start))) except RuntimeError: pass
def trigger_action(self): if self.can_duplicate_loop: clip = self.song().view.detail_clip if clip != None: try: clip.duplicate_loop() self.show_notification( MessageBoxText.DUPLICATE_LOOP % dict( length=convert_length_to_bars_beats_sixteenths( clip.loop_end - clip.loop_start))) except RuntimeError: pass
def _do_show_time_remaining(self): clip = self._selected_clip if clip != None and (clip.is_triggered or clip.is_playing): if clip.is_recording: label = 'Record Count:' length = (clip.playing_position - clip.loop_start) * clip.signature_denominator / clip.signature_numerator time = convert_length_to_bars_beats_sixteenths(length) else: label = 'Time Remaining:' length = clip.loop_end - clip.playing_position if clip.is_audio_clip and not clip.warping: time = convert_length_to_mins_secs(length) else: time = convert_beats_to_mins_secs(length, self.song().tempo) else: label = ' ' time = ' ' self._selection_display.set_display_string(label, 2) self._selection_display.set_display_string(time, 3)
def _do_show_time_remaining(self): clip = self._selected_clip if clip != None and (clip.is_triggered or clip.is_playing): if clip.is_recording: label = 'Record Count:' length = (clip.playing_position - clip.loop_start) * clip.signature_denominator / clip.signature_numerator time = convert_length_to_bars_beats_sixteenths(length) else: label = 'Time Remaining:' length = clip.loop_end - clip.playing_position if clip.is_audio_clip and not clip.warping: time = convert_length_to_mins_secs(length) else: time = convert_beats_to_mins_secs(length, self.song().tempo) else: label = ' ' time = ' ' self._selection_display.set_display_string(label, 2) self._selection_display.set_display_string(time, 3)