Ejemplo n.º 1
0
    def __init__(self, num_tracks, num_scenes):
        assert (SessionComponent._session_highlighting_callback != None)
        assert isinstance(num_tracks, int)
        assert (num_tracks >= 0)
        assert isinstance(num_scenes, int)
        assert (num_scenes >= 0)
        CompoundComponent.__init__(self)
        self._track_offset = -1
        self._scene_offset = -1
        self._num_tracks = num_tracks
        self._bank_up_button = None
        self._bank_down_button = None
        self._bank_right_button = None
        self._bank_left_button = None
        self._stop_all_button = None
        self._next_scene_button = None
        self._prev_scene_button = None
        self._stop_track_clip_buttons = None
        self._offset_callback = None
        self._highlighting_callback = SessionComponent._session_highlighting_callback
        self._show_highlight = ((num_tracks > 0) and (num_scenes > 0))
        self._selected_scene = SceneComponent(self._num_tracks)
        self.on_selected_scene_changed()
        self.register_components(self._selected_scene)
        self._scenes = []
        for index in range(num_scenes):
            self._scenes.append(SceneComponent(self._num_tracks))
            self.register_components(self._scenes[index])

        self._mixer = None
        self.set_offsets(0, 0)
Ejemplo n.º 2
0
 def disconnect(self):
     CompoundComponent.disconnect(self)
     self._master_strip = None
     self._channel_strips = None
     self._offset_callback = None
     if (self._bank_up_button != None):
         self._bank_up_button.unregister_value_notification(
             self._bank_up_value)
         self._bank_up_button = None
     if (self._bank_down_button != None):
         self._bank_down_button.unregister_value_notification(
             self._bank_down_value)
         self._bank_down_button = None
     if (self._bank_right_button != None):
         self._bank_right_button.unregister_value_notification(
             self._bank_right_value)
         self._bank_right_button = None
     if (self._bank_left_button != None):
         self._bank_left_button.unregister_value_notification(
             self._bank_left_value)
         self._bank_left_button = None
     if (self._stop_all_button != None):
         self._stop_all_button.unregister_value_notification(
             self._stop_all_value)
         self._stop_all_button = None
     if (self._next_scene_button != None):
         self._next_scene_button.unregister_value_notification(
             self._next_scene_value)
         self._next_scene_button = None
     if (self._prev_scene_button != None):
         self._prev_scene_button.unregister_value_notification(
             self._prev_scene_value)
         self._prev_scene_button = None
     self._stop_track_clip_buttons = None
Ejemplo n.º 3
0
 def disconnect(self):
     CompoundComponent.disconnect(self)
     self._master_strip = None
     self._channel_strips = None
     self._offset_callback = None
     if (self._bank_up_button != None):
         self._bank_up_button.unregister_value_notification(self._bank_up_value)
         self._bank_up_button = None
     if (self._bank_down_button != None):
         self._bank_down_button.unregister_value_notification(self._bank_down_value)
         self._bank_down_button = None
     if (self._bank_right_button != None):
         self._bank_right_button.unregister_value_notification(self._bank_right_value)
         self._bank_right_button = None
     if (self._bank_left_button != None):
         self._bank_left_button.unregister_value_notification(self._bank_left_value)
         self._bank_left_button = None
     if (self._stop_all_button != None):
         self._stop_all_button.unregister_value_notification(self._stop_all_value)
         self._stop_all_button = None
     if (self._next_scene_button != None):
         self._next_scene_button.unregister_value_notification(self._next_scene_value)
         self._next_scene_button = None
     if (self._prev_scene_button != None):
         self._prev_scene_button.unregister_value_notification(self._prev_scene_value)
         self._prev_scene_button = None
     self._stop_track_clip_buttons = None
Ejemplo n.º 4
0
    def __init__(self, num_tracks, num_scenes):
        assert (SessionComponent._session_highlighting_callback != None)
        assert isinstance(num_tracks, int)
        assert (num_tracks >= 0)
        assert isinstance(num_scenes, int)
        assert (num_scenes >= 0)
        CompoundComponent.__init__(self)
        self._track_offset = -1
        self._scene_offset = -1
        self._num_tracks = num_tracks
        self._bank_up_button = None
        self._bank_down_button = None
        self._bank_right_button = None
        self._bank_left_button = None
        self._stop_all_button = None
        self._next_scene_button = None
        self._prev_scene_button = None
        self._stop_track_clip_buttons = None
        self._offset_callback = None
        self._highlighting_callback = SessionComponent._session_highlighting_callback
        self._show_highlight = ((num_tracks > 0) and (num_scenes > 0))
        self._selected_scene = SceneComponent(self._num_tracks)
        self.on_selected_scene_changed()
        self.register_components(self._selected_scene)
        self._scenes = []
        for index in range(num_scenes):
            self._scenes.append(SceneComponent(self._num_tracks))
            self.register_components(self._scenes[index])

        self._mixer = None
        self.set_offsets(0, 0)
Ejemplo n.º 5
0
 def disconnect(self):
     CompoundComponent.disconnect(self)
     if (self._bank_up_button != None):
         self._bank_up_button.unregister_value_notification(self._bank_up_value)
         self._bank_up_button = None
     if (self._bank_down_button != None):
         self._bank_down_button.unregister_value_notification(self._bank_down_value)
         self._bank_down_button = None
     if (self._next_track_button != None):
         self._next_track_button.unregister_value_notification(self._next_track_value)
         self._next_track_button = None
     if (self._prev_track_button != None):
         self._prev_track_button.unregister_value_notification(self._prev_track_value)
         self._prev_track_button = None
     if (self._prehear_volume_control != None):
         self._prehear_volume_control.release_parameter()
         self._prehear_volume_control = None
     if (self._crossfader_control != None):
         self._crossfader_control.release_parameter()
         self._crossfader_control = None
     self._master_strip = None
     self._selected_strip = None
     self._channel_strips = None
     self._track_eqs = None
     self._track_filters = None
Ejemplo n.º 6
0
 def disconnect(self):
     CompoundComponent.disconnect(self)
     if self._is_linked(): #added
         self._unlink() #added
     self._unregister_timer_callback(self._on_timer)
     self._master_strip = None
     self._channel_strips = None
     for index in range(len(self._tracks_and_listeners)):
         track = self._tracks_and_listeners[index][0]
         listener = self._tracks_and_listeners[index][1]
         if ((track != None) and (track in self.song().tracks) and track.fired_slot_index_has_listener(listener)):
             track.remove_fired_slot_index_listener(listener)
     self._tracks_and_listeners = None
     if (self._bank_up_button != None):
         self._bank_up_button.remove_value_listener(self._bank_up_value)
         self._bank_up_button = None
     if (self._bank_down_button != None):
         self._bank_down_button.remove_value_listener(self._bank_down_value)
         self._bank_down_button = None
     if (self._bank_right_button != None):
         self._bank_right_button.remove_value_listener(self._bank_right_value)
         self._bank_right_button = None
     if (self._bank_left_button != None):
         self._bank_left_button.remove_value_listener(self._bank_left_value)
         self._bank_left_button = None
     if (self._stop_all_button != None):
         self._stop_all_button.remove_value_listener(self._stop_all_value)
         self._stop_all_button = None
     if (self._next_scene_button != None):
         self._next_scene_button.remove_value_listener(self._next_scene_value)
         self._next_scene_button = None
     if (self._prev_scene_button != None):
         self._prev_scene_button.remove_value_listener(self._prev_scene_value)
         self._prev_scene_button = None
     self._stop_track_clip_buttons = None
Ejemplo n.º 7
0
 def disconnect(self):
     CompoundComponent.disconnect(self)
     if self._bank_up_button != None:
         self._bank_up_button.remove_value_listener(self._bank_up_value)
         self._bank_up_button = None
     if self._bank_down_button != None:
         self._bank_down_button.remove_value_listener(self._bank_down_value)
         self._bank_down_button = None
     if self._next_track_button != None:
         self._next_track_button.remove_value_listener(self._next_track_value)
         self._next_track_button = None
     if self._prev_track_button != None:
         self._prev_track_button.remove_value_listener(self._prev_track_value)
         self._prev_track_button = None
     if self._prehear_volume_control != None:
         self._prehear_volume_control.release_parameter()
         self._prehear_volume_control = None
     if self._crossfader_control != None:
         self._crossfader_control.release_parameter()
         self._crossfader_control = None
     self._master_strip = None
     self._selected_strip = None
     self._channel_strips = None
     self._track_eqs = None
     self._track_filters = None
     return None
Ejemplo n.º 8
0
 def __init__(self, num_tracks, num_returns=0, with_eqs=False, with_filters=False):
     assert num_tracks >= 0
     assert num_returns >= 0
     CompoundComponent.__init__(self)
     self._track_offset = -1
     self._bank_up_button = None
     self._bank_down_button = None
     self._next_track_button = None
     self._prev_track_button = None
     self._prehear_volume_control = None
     self._crossfader_control = None
     self._channel_strips = []
     self._return_strips = []
     self._track_eqs = []
     self._track_filters = []
     self._offset_can_start_after_tracks = False  # added
     for index in range(num_tracks):
         self._channel_strips.append(self._create_strip())
         self.register_components(self._channel_strips[index])
         if with_eqs:
             self._track_eqs.append(TrackEQComponent())
             self.register_components(self._track_eqs[index])
         if with_filters:
             self._track_filters.append(TrackFilterComponent())
             self.register_components(self._track_filters[index])
     for index in range(num_returns):
         self._return_strips.append(self._create_strip())
         self.register_components(self._return_strips[index])
     self._master_strip = self._create_strip()
     self.register_components(self._master_strip)
     self._master_strip.set_track(self.song().master_track)
     self._selected_strip = self._create_strip()
     self.register_components(self._selected_strip)
     self.on_selected_track_changed()
     self.set_track_offset(0)
Ejemplo n.º 9
0
 def disconnect(self):
     CompoundComponent.disconnect(self)
     if (self._bank_up_button != None):
         self._bank_up_button.unregister_value_notification(
             self._bank_up_value)
         self._bank_up_button = None
     if (self._bank_down_button != None):
         self._bank_down_button.unregister_value_notification(
             self._bank_down_value)
         self._bank_down_button = None
     if (self._next_track_button != None):
         self._next_track_button.unregister_value_notification(
             self._next_track_value)
         self._next_track_button = None
     if (self._prev_track_button != None):
         self._prev_track_button.unregister_value_notification(
             self._prev_track_value)
         self._prev_track_button = None
     if (self._prehear_volume_control != None):
         self._prehear_volume_control.release_parameter()
         self._prehear_volume_control = None
     if (self._crossfader_control != None):
         self._crossfader_control.release_parameter()
         self._crossfader_control = None
     self._master_strip = None
     self._selected_strip = None
     self._channel_strips = None
     self._track_eqs = None
     self._track_filters = None
Ejemplo n.º 10
0
 def disconnect(self):
     CompoundComponent.disconnect(self)
     self._scene = None
     self._clip_slots = None
     if (self._launch_button != None):
         self._launch_button.unregister_value_notification(self._launch_value)
         self._launch_button = None
Ejemplo n.º 11
0
 def disconnect(self):
     CompoundComponent.disconnect(self)
     self._scene = None
     self._clip_slots = None
     if (self._launch_button != None):
         self._launch_button.unregister_value_notification(
             self._launch_value)
         self._launch_button = None
 def disconnect(self):
     CompoundComponent.disconnect(self)
     self._session = None
     self._buttons = None
     self._zoom_button = None
     self._scene_bank_buttons = None
     self._nav_up_button = None
     self._nav_down_button = None
     self._nav_left_button = None
     self._nav_right_button = None
Ejemplo n.º 13
0
 def disconnect(self):
     CompoundComponent.disconnect(self)
     self._session = None
     self._buttons = None
     self._zoom_button = None
     self._scene_bank_buttons = None
     self._nav_up_button = None
     self._nav_down_button = None
     self._nav_left_button = None
     self._nav_right_button = None
Ejemplo n.º 14
0
 def disconnect(self):
     CompoundComponent.disconnect(self)
     if self._scene != None:
         self._scene.remove_is_triggered_listener(self._on_is_triggered_changed)
     if self._launch_button != None:
         self._launch_button.remove_value_listener(self._launch_value)
         self._launch_button = None
     self._scene = None
     self._clip_slots = None
     self._tracks_to_use_callback = None
     return None
 def disconnect(self):
     self._session.remove_offset_listener(self._on_session_offset_changes)
     CompoundComponent.disconnect(self)
     self._session = None
     self._buttons = None
     self._zoom_button = None
     self._scene_bank_buttons = None
     self._nav_up_button = None
     self._nav_down_button = None
     self._nav_left_button = None
     self._nav_right_button = None
     return None
Ejemplo n.º 16
0
    def __init__(self, num_slots):
        assert (num_slots != None)
        assert isinstance(num_slots, int)
        assert (num_slots >= 0)
        CompoundComponent.__init__(self)
        self._scene = None
        self._clip_slots = []
        for index in range(num_slots):
            new_slot = ClipSlotComponent()
            self._clip_slots.append(new_slot)
            self.register_components(new_slot)

        self._launch_button = None
        self._track_offset = 0
Ejemplo n.º 17
0
    def __init__(self, num_slots):
        assert (num_slots != None)
        assert isinstance(num_slots, int)
        assert (num_slots >= 0)
        CompoundComponent.__init__(self)
        self._scene = None
        self._clip_slots = []
        for index in range(num_slots):
            new_slot = ClipSlotComponent()
            self._clip_slots.append(new_slot)
            self.register_components(new_slot)

        self._launch_button = None
        self._track_offset = 0
Ejemplo n.º 18
0
 def __init__(self, num_slots, tracks_to_use_callback):
     assert (num_slots != None)
     assert isinstance(num_slots, int)
     assert (num_slots >= 0)
     assert tracks_to_use_callback != None
     assert dir(tracks_to_use_callback).count('im_func') is 1
     CompoundComponent.__init__(self)
     self._scene = None
     self._clip_slots = []
     self._tracks_to_use_callback = tracks_to_use_callback
     for index in range(num_slots):
         new_slot = self._create_clip_slot()
         self._clip_slots.append(new_slot)
         self.register_components(new_slot)
     self._launch_button = None
     self._triggered_value = 127
     self._track_offset = 0
     return None
Ejemplo n.º 19
0
    def __init__(self,
                 num_tracks,
                 num_returns=0,
                 with_eqs=False,
                 with_filters=False):
        assert (num_tracks >= 0)
        assert (num_returns >= 0)
        CompoundComponent.__init__(self)
        self._track_offset = -1
        self._bank_up_button = None
        self._bank_down_button = None
        self._next_track_button = None
        self._prev_track_button = None
        self._prehear_volume_control = None
        self._crossfader_control = None
        self._channel_strips = []
        self._return_strips = []
        self._track_eqs = []
        self._track_filters = []
        for index in range(num_tracks):
            self._channel_strips.append(ChannelStripComponent())
            self.register_components(self._channel_strips[index])
            self._channel_strips[index].set_mixer_callbacks(
                self._num_solos_pressed, self._num_arms_pressed)
            if with_eqs:
                self._track_eqs.append(TrackEQComponent())
                self.register_components(self._track_eqs[index])
            if with_filters:
                self._track_filters.append(TrackFilterComponent())
                self.register_components(self._track_filters[index])

        for index in range(num_returns):
            self._return_strips.append(ChannelStripComponent())
            self.register_components(self._return_strips[index])

        self._master_strip = ChannelStripComponent()
        self.register_components(self._master_strip)
        self._master_strip.set_track(self.song().master_track)
        self._selected_strip = ChannelStripComponent()
        self.register_components(self._selected_strip)
        self.on_selected_track_changed()
        self._selected_strip.set_mixer_callbacks(self._num_solos_pressed,
                                                 self._num_arms_pressed)
        self.set_track_offset(0)
 def __init__(self, session):
     assert isinstance(session, SessionComponent)
     CompoundComponent.__init__(self)
     self._session = session
     self._buttons = None
     self._zoom_button = None
     self._scene_bank_buttons = None
     self._nav_up_button = None
     self._nav_down_button = None
     self._nav_left_button = None
     self._nav_right_button = None
     self._scene_bank_index = 0
     self._is_zoomed_out = False
     self._empty_value = 0
     self._stopped_value = 100
     self._playing_value = 127
     self._selected_value = 64
     self.register_components(self._session)
     self._session.set_offset_callback(self._on_session_offset_changes)
Ejemplo n.º 21
0
 def __init__(self, session):
     assert isinstance(session, SessionComponent)
     CompoundComponent.__init__(self)
     self._session = session
     self._buttons = None
     self._zoom_button = None
     self._scene_bank_buttons = None
     self._nav_up_button = None
     self._nav_down_button = None
     self._nav_left_button = None
     self._nav_right_button = None
     self._scene_bank_index = 0
     self._is_zoomed_out = False
     self._empty_value = 0
     self._stopped_value = 100
     self._playing_value = 127
     self._selected_value = 64
     self.register_components(self._session)
     self._session.set_offset_callback(self._on_session_offset_changes)
 def disconnect(self):
     CompoundComponent.disconnect(self)
     if self._bank_up_button != None:
         self._bank_up_button.remove_value_listener(self._bank_up_value)
         self._bank_up_button = None
     if self._bank_down_button != None:
         self._bank_down_button.remove_value_listener(self._bank_down_value)
         self._bank_down_button = None
     if self._next_track_button != None:
         self._next_track_button.remove_value_listener(self._next_track_value)
         self._next_track_button = None
     if self._prev_track_button != None:
         self._prev_track_button.remove_value_listener(self._prev_track_value)
         self._prev_track_button = None
     if self._prehear_volume_control != None:
         self._prehear_volume_control.release_parameter()
         self._prehear_volume_control = None
     if self._crossfader_control != None:
         self._crossfader_control.release_parameter()
         self._crossfader_control = None
    def __init__(self,
                 num_tracks,
                 num_returns=0,
                 with_eqs=False,
                 with_filters=False):
        raise num_tracks >= 0 or AssertionError
        raise num_returns >= 0 or AssertionError
        CompoundComponent.__init__(self)
        self._track_offset = -1
        self._bank_up_button = None
        self._bank_down_button = None
        self._next_track_button = None
        self._prev_track_button = None
        self._prehear_volume_control = None
        self._crossfader_control = None
        self._channel_strips = []
        self._return_strips = []
        self._track_eqs = []
        self._track_filters = []
        self._offset_can_start_after_tracks = False
        for index in range(num_tracks):
            self._channel_strips.append(self._create_strip())
            self.register_components(self._channel_strips[index])
            if with_eqs:
                self._track_eqs.append(TrackEQComponent())
                self.register_components(self._track_eqs[index])
            if with_filters:
                self._track_filters.append(TrackFilterComponent())
                self.register_components(self._track_filters[index])

        for index in range(num_returns):
            self._return_strips.append(self._create_strip())
            self.register_components(self._return_strips[index])

        self._master_strip = self._create_strip()
        self.register_components(self._master_strip)
        self._master_strip.set_track(self.song().master_track)
        self._selected_strip = self._create_strip()
        self.register_components(self._selected_strip)
        self.on_selected_track_changed()
        self.set_track_offset(0)
 def disconnect(self):
     CompoundComponent.disconnect(self)
     if self._bank_up_button != None:
         self._bank_up_button.remove_value_listener(self._bank_up_value)
         self._bank_up_button = None
     if self._bank_down_button != None:
         self._bank_down_button.remove_value_listener(self._bank_down_value)
         self._bank_down_button = None
     if self._next_track_button != None:
         self._next_track_button.remove_value_listener(
             self._next_track_value)
         self._next_track_button = None
     if self._prev_track_button != None:
         self._prev_track_button.remove_value_listener(
             self._prev_track_value)
         self._prev_track_button = None
     if self._prehear_volume_control != None:
         self._prehear_volume_control.release_parameter()
         self._prehear_volume_control = None
     if self._crossfader_control != None:
         self._crossfader_control.release_parameter()
         self._crossfader_control = None
Ejemplo n.º 25
0
    def __init__(self, num_tracks, num_returns = 0, with_eqs = False, with_filters = False):
        assert (num_tracks >= 0)
        assert (num_returns >= 0)
        CompoundComponent.__init__(self)
        self._track_offset = -1
        self._bank_up_button = None
        self._bank_down_button = None
        self._next_track_button = None
        self._prev_track_button = None
        self._prehear_volume_control = None
        self._crossfader_control = None
        self._channel_strips = []
        self._return_strips = []
        self._track_eqs = []
        self._track_filters = []
        for index in range(num_tracks):
            self._channel_strips.append(ChannelStripComponent())
            self.register_components(self._channel_strips[index])
            self._channel_strips[index].set_mixer_callbacks(self._num_solos_pressed, self._num_arms_pressed)
            if with_eqs:
                self._track_eqs.append(TrackEQComponent())
                self.register_components(self._track_eqs[index])
            if with_filters:
                self._track_filters.append(TrackFilterComponent())
                self.register_components(self._track_filters[index])

        for index in range(num_returns):
            self._return_strips.append(ChannelStripComponent())
            self.register_components(self._return_strips[index])

        self._master_strip = ChannelStripComponent()
        self.register_components(self._master_strip)
        self._master_strip.set_track(self.song().master_track)
        self._selected_strip = ChannelStripComponent()
        self.register_components(self._selected_strip)
        self.on_selected_track_changed()
        self._selected_strip.set_mixer_callbacks(self._num_solos_pressed, self._num_arms_pressed)
        self.set_track_offset(0)
Ejemplo n.º 26
0
 def __init__(self, num_tracks, num_scenes):
     assert (SessionComponent._session_highlighting_callback != None)
     assert isinstance(num_tracks, int)
     assert (num_tracks >= 0)
     assert isinstance(num_scenes, int)
     assert (num_scenes >= 0)
     CompoundComponent.__init__(self)
     self._track_offset = -1
     self._scene_offset = -1
     self._num_tracks = num_tracks
     self._bank_up_button = None
     self._bank_down_button = None
     self._bank_right_button = None
     self._bank_left_button = None
     self._stop_all_button = None
     self._next_scene_button = None
     self._prev_scene_button = None
     self._stop_track_clip_buttons = None
     self._scroll_up_ticks_delay = -1
     self._scroll_down_ticks_delay = -1
     self._scroll_right_ticks_delay = -1
     self._scroll_left_ticks_delay = -1
     self._stop_track_clip_value = 127
     self._offset_callbacks = []
     self._highlighting_callback = SessionComponent._session_highlighting_callback
     self._show_highlight = ((num_tracks > 0) and (num_scenes > 0))
     self._mixer = None
     self._selected_scene = SceneComponent(self._num_tracks, self.tracks_to_use)
     self.on_selected_scene_changed()
     self.register_components(self._selected_scene)
     self._scenes = []
     self._tracks_and_listeners = []
     for index in range(num_scenes):
         self._scenes.append(self._create_scene(self._num_tracks))
         self.register_components(self._scenes[index])
     self.set_offsets(0, 0)
     self._register_timer_callback(self._on_timer)
     return None