def __init__(self,
              scroll_button_color='DefaultButton.On',
              handle_modifier_leds=True,
              target_clip_comp=None,
              quantize_comp=None,
              octave_size=12,
              *a,
              **k):
     super(AbstractInstrumentComponent, self).__init__(
         handle_modifier_leds=handle_modifier_leds,
         press_callback=self._set_enabled_state_of_used_pads,
         *a,
         **k)
     self._on_target_clip_changed.subject = target_clip_comp
     self._quantize_component = quantize_comp
     self._octave_size = octave_size
     self._octave_offset = 0
     self._clip = None
     self._erase_start_time = None
     self._used_pads = []
     self._unused_pads = []
     self._unused_pad_listener = self.register_slot_manager(
         CallableSubjectSlotGroup(event='value', listener=nop,
                                  function=nop))
     self._scroller = self.register_component(
         ResettableScrollComponent(self))
     skin_scroll_component(self._scroller, color=scroll_button_color)
     return
 def __init__(self, name='Standard_Navigation_Control', **k):
     super(StandardNavComponent, self).__init__(name=name)
     self._horizontal_nav = self.register_component(ScrollComponent(scrollable=HorizontalNav(self.application()), **k))
     self._vertical_nav = self.register_component(ScrollComponent(scrollable=VerticalNav(self.application()), **k))
     self.application().view.add_is_view_visible_listener('Session', self._on_main_view_changed)
     skin_scroll_component(self._horizontal_nav, color='Navigation.StandardEnabled')
     skin_scroll_component(self._vertical_nav, color='Navigation.StandardEnabled')
示例#3
0
 def __init__(self,
              led_value,
              prop_name,
              v_min,
              v_max,
              default_value,
              factor=0.01):
     prop = ResettableObjectPropertyScrollable(prop_name,
                                               v_min,
                                               v_max,
                                               default_value,
                                               factor=factor)
     super(ScrolledProperty, self).__init__(prop)
     skin_scroll_component(self, color=led_value)
示例#4
0
 def __init__(self,
              num_tracks,
              num_scenes,
              handle_modifier_leds=True,
              *a,
              **k):
     super(SpecialSessionComponent,
           self).__init__(num_tracks,
                          num_scenes,
                          auto_name=True,
                          enable_skinning=True,
                          handle_modifier_leds=handle_modifier_leds,
                          *a,
                          **k)
     self._num_scenes = num_scenes
     self._original_num_scenes = num_scenes
     self._original_num_tracks = num_tracks
     skin_scroll_component(self._vertical_banking,
                           color='Navigation.SessionEnabled')
     skin_scroll_component(self._horizontal_banking,
                           color='Navigation.SessionEnabled')
     skin_scroll_component(self._vertical_paginator,
                           color='Navigation.SessionEnabled')
     skin_scroll_component(self._horizontal_paginator,
                           color='Navigation.SessionEnabled')
 def __init__(self, scale_settings_component, *a, **k):
     if not isinstance(scale_settings_component, ScaleSettingsComponent):
         raise AssertionError
         name = k.pop('name', 'Scale_Sequence_Control')
         k['name'] = name
         self._static_offset = k.pop('static_offset', 60)
         self._use_tonic_colors = k.pop('use_tonic_colors', True)
         super(ScaleSeqComponent, self).__init__(*a, **k)
         self._fold_button = None
         self._current_notes = []
         self._folded_notes = []
         self._highest_note = 0
         self._semi_offset = 0
         self._folded_offset = 0
         self._is_folded = False
         self._settings = scale_settings_component
         self._on_scale_settings_changed.subject = self._settings
         prefer_playing = k.get('prefer_playing_clip', False)
         self.on_target_clip_changed.subject = prefer_playing or k.get(
             'targets_comp', None)
     self._scroller = self.register_component(
         ResettableScrollComponent(self))
     skin_scroll_component(self._scroller, color='Navigation.OctaveEnabled')
     return
示例#6
0
 def __init__(self):
     self._simpler = None
     self._selected_slice = None
     super(SimplerNudgeComponent, self).__init__(scrollable=self)
     skin_scroll_component(self, color='Simpler.NudgeEnabled')
     return
示例#7
0
 def __init__(self, *a, **k):
     super(SpecialSessionZoomingComponent, self).__init__(enable_skinning=True, *a, **k)
     self.is_private = True
     skin_scroll_component(self._vertical_scroll, color='Navigation.SessionEnabled')
     skin_scroll_component(self._horizontal_scroll, color='Navigation.SessionEnabled')