def __init__(self, parent, buttons): ControlSurfaceComponent.__init__(self) self.set_enabled(False) self._parent = parent self._clip = None self._notes = None self._playhead = None self._loop_end = 0 self._loop_start = 0 self._blocksize = 8 # number of note per block self._block = 0 # current block # used for loop selection self._last_button = -1 self._last_button_time = time.time() self._loop_point1 = -1 self._loop_point2 = -1 self._cache = [-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1] self._buttons = buttons for button in self._buttons : assert isinstance(button, ButtonElement) button.remove_value_listener(self._loop_button_value) button.add_value_listener(self._loop_button_value, identify_sender=True)
def __init__(self, parent, offset_buttons): ControlSurfaceComponent.__init__(self) self.set_enabled(False) self._parent = parent self._clip = None self._notes = None self._playhead = None self._root_note = 36 self._offset = 0 self._key = 0 self._scale = [0,2,4,5,7,9,11,12] self._up_button = None self._down_button = None self._offset_buttons=offset_buttons self._enable_offset_button = True #cache to optimise display for offset buttons minimizing midi traffic self._cache = [-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1] self._was_velocity_shifted = False for button in self._offset_buttons : assert isinstance(button, ButtonElement) button.remove_value_listener(self.note_offset_button_value) button.add_value_listener(self.note_offset_button_value, identify_sender=True)
def __init__(self, parent, rack, name, track): ControlSurfaceComponent.__init__(self) self._parent = parent self._on_off_param = [] self._devices_to_operate_on = [] self._track = track self.setup_device(rack, name)
def __init__(self): ControlSurfaceComponent.__init__(self) self._name = 'OSD' self._update_listener = None self._updateML_listener = None self.mode = ' ' self.clear()
def __init__(self): ControlSurfaceComponent.__init__(self) self._stop_button = None self._play_button = None self._ffwd_button = None self._rwd_button = None self._loop_button = None self._punch_in_button = None self._punch_out_button = None self._record_button = None self._tap_tempo_button = None self._nudge_up_button = None self._nudge_down_button = None self._metronome_button = None self._overdub_button = None self._tempo_control = None self._tempo_fine_control = None self._song_position_control = None self._rwd_button_pressed = False self._ffwd_button_pressed = False self._fine_tempo_needs_pickup = True self._prior_fine_tempo_value = -1 self.song().add_loop_listener(self._on_loop_status_changed) self.song().add_punch_in_listener(self._on_punch_in_status_changed) self.song().add_punch_out_listener(self._on_punch_out_status_changed) self.song().add_record_mode_listener(self._on_record_status_changed) self.song().add_is_playing_listener(self._on_playing_status_changed) self.song().add_nudge_down_listener(self._on_nudge_down_changed) self.song().add_nudge_up_listener(self._on_nudge_up_changed) self.song().add_metronome_listener(self._on_metronome_changed) self.song().add_overdub_listener(self._on_overdub_changed)
def __init__(self, script): ControlSurfaceComponent.__init__(self) self._sub_components = [] self._script = script self._host_name = 'AumPad' self._dial_matrix = None self._grid = None self._keys = None self._menu = None self._active_client = None self._shift_button = None self._shift_pressed = 0 self._alt_button = None self._alt_pressed = 0 self._locked = 0 self._x = 0 self._y = 0 self._client_buttons = [] self._channel_buttons = [] self._color_maps = [range(128) for index in range(16)] self._colors = self._color_maps[0] self._offsets = [[0, 0] for index in range(16)] self._is_enabled = False self._is_connected = False self._key_buttons = None self._bank_buttons = None return None
def __init__(self): ControlSurfaceComponent.__init__(self) self._register_timer_callback(self._on_timer) self._refresh = 0 self._clip = None self._note_cache = [] self._last_note = 36 self._last_pos = 0 self._quantisation = 0.25 self._default_length = 1 self._default_velocity = 100 self._time_offset = 0 self._note_offset = 36 self._num_steps = 16 self._height = 16 self._root = 0 self._scale = 0 self._scales = [[], [0, 2, 4, 5, 7, 9, 11], [0, 2, 3, 5, 7, 8, 10], [0, 2, 3, 5, 7, 8, 11], [0, 2, 4, 7, 9]] self._mutes = [0 for i in range(127)] self._fader_type = 0 self._fold_notes = 0 self._save_note = 0 self._ltime = "" self._chord_intervals = [[0, 4, 7], [0, 3, 7], [0, 4, 8], [0, 4, 6], [0, 3, 6], [0, 5, 7]] self._quick_chord = 127 self._durations = [0.125, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 2, 4] self._selection = [0, 0, 0, 0] self._last_details = [-1, -1, -1, -1, -1] if LC2Sysex.l9(): self._clisten = ("loop_start", "loop_end", "start_marker", "end_marker") else: self._clisten = ("loop_start", "loop_end")
def __init__(self): ControlSurfaceComponent.__init__(self) self._track = None self._device = None self._gain_controls = None self._cut_buttons = None return
def __init__(self): ControlSurfaceComponent.__init__(self) self._track = None self._device = None self._freq_control = None self._reso_control = None return
def __init__(self, parent): # Boilerplate ControlSurfaceComponent.__init__(self) self._parent = parent # Default the L/R/Master levels to 0 self._meter_level = 0 self._left_level = 0 self._right_level = 0 # We don't start clipping self._clipping = False # The tracks we'll be pulling L and R RMS from self._left_track = self.song().tracks[LEFT_SOURCE] self._right_track = self.song().tracks[RIGHT_SOURCE] #setup classes self.left_meter = VUMeter(self, self._left_track, CHANNEL_SCALE_MAX, CHANNEL_SCALE_MIN, CHANNEL_SCALE_INCREMENTS, LEFT_COLUMN_VUS) self.right_meter = VUMeter(self, self._right_track, CHANNEL_SCALE_MAX, CHANNEL_SCALE_MIN, CHANNEL_SCALE_INCREMENTS, RIGHT_COLUMN_VUS) self.master_meter = VUMeter(self, self.song().master_track, MASTER_SCALE_MAX, MASTER_SCALE_MIN, MASTER_SCALE_INCREMENTS, None, True) # Listeners! self._left_track.add_output_meter_left_listener(self.left_meter.observe) self._right_track.add_output_meter_left_listener(self.right_meter.observe) self.song().master_track.add_output_meter_left_listener(self.master_meter.observe)
def __init__(self, control_surface = None, step_sequencer = None, matrix = None, side_buttons = None): ControlSurfaceComponent.__init__(self) self._control_surface = control_surface self._step_sequencer = step_sequencer self._clip = None self._playhead = None # clip self._clip = None self._note_cache = [] self._force_update = True self._init_data() self._velocity_map = [0, 30, 60, 80, 100, 115, 127] self._length_map = [1, 2, 3, 4, 8, 16, 32] # time self._playhead = 0 self._page = 0 # notes self._key_indexes = [36, 37, 38, 39, 40, 41, 42, 43] self._key_index_is_in_scale = [True, False, True, True, False, True, False, True] self._key_index_is_root_note = [True, False, False, False, False, False, False, False] self._is_monophonic = False # quantization self._quantization = 16 # MODE self._mode = STEPSEQ_MODE_NOTES # buttons self._random_button = None self._mode_notes_lengths_button = None self._mode_notes_octaves_button = None self._mode_notes_velocities_button = None self._mode_notes_pitches_button = None self._matrix = None self._is_notes_pitches_shifted = False self._last_notes_pitches_button_press = time.time() self._last_notes_velocity_button_press = time.time() self._last_notes_pitches_button_press = time.time() self._is_octave_shifted = False self._last_notes_octaves_button_press = time.time() self._is_notes_velocity_shifted = False self._is_notes_lengths_shifted = False self._last_notes_lengths_button_press = time.time() if side_buttons != None: self.set_random_button(side_buttons[3]) self.set_mode_notes_lengths_button(side_buttons[4]) self.set_mode_notes_octaves_button(buttons[5]) self.set_mode_notes_velocities_button(self._side_buttons[6]) self.set_mode_notes_pitches_button(self._side_buttons[7]) self._is_velocity_shifted = False self._is_mute_shifted = False
def __init__(self, target, led_range = [0.52, 0.90], track = "master", **kwargs): ControlSurfaceComponent.__init__(self) Elementary.__init__(self, **kwargs) self.bottom = led_range[0] self.top = led_range[1] self.multiplier = (127 / (self.top - self.bottom)) if target: self.setup_vu(target)
def __init__(self, parent, controls, override): ControlSurfaceComponent.__init__(self) self._parent = parent self._controls = controls self._override = override self._last_beat = -1 self.song().add_current_song_time_listener(self.on_time_changed) self.song().add_is_playing_listener(self.on_time_changed)
def __init__(self, parent): ControlSurfaceComponent.__init__(self) self.parent = parent self.last_beat = None self.led_pad = [] self.led_metro_buttons() self.last_time = None self.count = -1
def __init__(self, device_component, script): ControlSurfaceComponent.__init__(self) self._prev_button = None self._next_button = None self._device = device_component self._script = script #self._script.log_message('Navigator init') return None
def __init__(self, stepsequencer = None, matrix = None, control_surface = None): ControlSurfaceComponent.__init__(self) self.set_enabled(False) self._stepsequencer = stepsequencer self._control_surface = control_surface self._clip = None self._note_cache = None self._playhead = None # metronome self.display_metronome = True self.metronome_color = "StepSequencer.NoteEditor.Metronome" # Velocity colour map. this must remain of length 3. self.velocity_map = [70, 90, 110] self.velocity_color_map = ["StepSequencer.NoteEditor.Velocity0", "StepSequencer.NoteEditor.Velocity1", "StepSequencer.NoteEditor.Velocity2"] # other colors self.muted_note_color = "StepSequencer.NoteEditor.Muted" self.playing_note_color = "StepSequencer.NoteEditor.Playing" self.long_button_press = 0.500 # buttons self._matrix = None self._mute_shift_button = None self._velocity_button = None self._velocity_shift_button = None # time self._page = 0 self._display_page = False self._display_page_time = time.time() # notes self._key_indexes = [36, 37, 38, 39, 40, 41, 42, 43] self._key_index_is_in_scale = [True, False, True, True, False, True, False, True] self._key_index_is_root_note = [True, False, False, False, False, False, False, False] self._number_of_lines_per_note = 1 # clip self._force_update = True # quantization self._quantization = 16 # velocity self._velocity_index = 2 self._velocity = self.velocity_map[self._velocity_index] self._is_velocity_shifted = False self._velocity_notes_pressed = 0 self._velocity_last_press = time.time() # modes self._is_mute_shifted = False self._is_mutlinote = False if matrix != None: self.set_matrix(matrix)
def __init__(self, track, parent): ControlSurfaceComponent.__init__(self) self._parent = parent self._track = track self._track.add_devices_listener(self.setup_devices) self._current_devices = [] self._update_in_progress = False self._has_learn_rack = False self.setup_devices()
def __init__(self, parent, rack, name): ControlSurfaceComponent.__init__(self) self._parent = parent self._macro_to_cc = [] self._macro_to_pc = [] self._macro_to_sysex = [] self._sysex_list = [] self.build_sysex_list() self.setup_device(rack, name)
def __init__(self, num_tracks): raise num_tracks > 0 or AssertionError ControlSurfaceComponent.__init__(self) self._num_tracks = num_tracks self._chain_buttons = None self._clip_buttons = None self._ignore_track_selection = False self.application().view.add_is_view_visible_listener('Detail', self._on_detail_view_changed) self.application().view.add_is_view_visible_listener('Detail/Clip', self._on_views_changed)
def __init__(self, parent, rack, track): ControlSurfaceComponent.__init__(self) self._parent = parent self._last_meter_left_val = -1 self._last_meter_right_val = -1 self._last_midi_meter_val = -1 self._track = track self._rack = rack self.setup_device()
def __init__(self): ControlSurfaceComponent.__init__(self) self._device_clip_toggle_button = None self._detail_toggle_button = None self._left_button = None self._right_button = None self._show_playing_clip_ticks_delay = -1 self.application().view.add_is_view_visible_listener('Detail', self._detail_view_visibility_changed) self._register_timer_callback(self._on_timer) return None
def __init__(self, target, led_range = [0.52, 0.92], track = "master", parent = None, **kwargs): ControlSurfaceComponent.__init__(self) Elementary.__init__(self, **kwargs) self.parent = parent self.bottom = led_range[0] self.top = led_range[1] self.calculate_multiplier(target) if target: self.setup_vu(target)
def __init__(self, parent, track): ControlSurfaceComponent.__init__(self) self._parent = parent self._track = track self._clip = None self._last_playing_pos = -1 self._loop_count = 0 self._track.add_playing_slot_index_listener(self.play_slot_index_changed) self._register_timer_callback(self.on_timer) self._do_action_list = False
def __init__(self, parent): ControlSurfaceComponent.__init__(self) self._parent = parent self.song().add_current_song_time_listener(self.arrange_time_changed) self.song().add_is_playing_listener(self.arrange_time_changed) self.song().add_cue_points_listener(self.cue_points_changed) self._x_points = {} self._x_point_time_to_watch_for = -1 self._last_arrange_position = -1 self.cue_points_changed()
def __init__(self, parent): ControlSurfaceComponent.__init__(self) self._parent = parent self._push_actions = None if IS_LIVE_9: self._push_actions = ClyphXPushActions(parent) self._pxt_actions = ClyphXPXTActions(parent) self._mxt_actions = ClyphXMXTActions(parent) if IS_LIVE_9_5: self._arsenal_actions = ClyphXArsenalActions(parent) self._scripts = {}
def __init__(self, parent): ControlSurfaceComponent.__init__(self) self._parent = parent self.song().add_current_song_time_listener(self.arrange_time_changed) self.song().add_is_playing_listener(self.arrange_time_changed) self.song().add_cue_points_listener(self.cue_points_changed) self._x_points = {} self._x_point_time_to_watch_for = -1 self._last_arrange_position = -1 self._sorted_times = [] self.cue_points_changed()
def __init__(self, parent, track): ControlSurfaceComponent.__init__(self) self._parent = parent self._track = track self._clip = None self._loop_count = 0 self._track.add_playing_slot_index_listener(self.play_slot_index_changed) self._register_timer_callback(self.on_timer) self._last_slot_index = -1 self._triggered_clips = [] self._triggered_lseq_clip = None
def __init__(self, parent): ControlSurfaceComponent.__init__(self) self._parent = parent self._show_highlight = False self._exclusive_arm = False self._exclusive_fold = False self._clip_record = False self._clip_record_slot = None self._midi_clip_length = False self._midi_clip_length_slot = None self._last_track = self.song().view.selected_track
def __init__(self): ControlSurfaceComponent.__init__(self) self._device_clip_toggle_button = None self._detail_toggle_button = None self._left_button = None self._right_button = None self._show_playing_clip_ticks_delay = -1 self.application().view.add_is_view_visible_listener( 'Detail', self._detail_view_visibility_changed) self._register_timer_callback(self._on_timer) return None
def __init__(self, num_tracks): raise num_tracks > 0 or AssertionError ControlSurfaceComponent.__init__(self) self._num_tracks = num_tracks self._chain_buttons = None self._clip_buttons = None self._ignore_track_selection = False self.application().view.add_is_view_visible_listener( 'Detail', self._on_detail_view_changed) self.application().view.add_is_view_visible_listener( 'Detail/Clip', self._on_views_changed)
def __init__(self, num_tracks, parent): assert (num_tracks > 0) or AssertionError ControlSurfaceComponent.__init__(self) self.__main_script__ = parent self._num_tracks = num_tracks self._toggle_buttons = [] self._device_left_button = None self._device_right_button = None self._ignore_track_selection = False self.application().view.add_is_view_visible_listener('Detail', self._on_detail_view_changed) self.application().view.add_is_view_visible_listener('Detail/Clip', self._on_views_changed)
def __init__(self, cs, mixer): ControlSurfaceComponent.__init__(self) self._cs = cs self._mixer = mixer self._clip_focus = None self._matrix = None self._track = self.song().view.selected_track self._change = time.time() self.song().add_tempo_listener(self._on_tempo_change) self._tempo = self._cs.song().tempo self._on_tempo_change()
def __init__(self, script): self._script = script ControlSurfaceComponent.__init__(self) self._clip_slot = None self._launch_button = None self._triggered_to_play_value = 126 self._triggered_to_record_value = 121 self._started_value = 127 self._recording_value = 120 self._stopped_value = 0 self._has_fired_slot = False return None
def __init__(self, parent): ControlSurfaceComponent.__init__(self) VUMeter._active_instances.append(self) self.slider = None self._parent = parent self._vu_meter = None self.frames = [0.0] * RMS_FRAMES self.increments = CHANNEL_SCALE_INCREMENTS self.top = CHANNEL_SCALE_MAX self.bottom = CHANNEL_SCALE_MIN self.multiplier = self.calculate_multiplier(self.top, self.bottom, self.increments) self.current_level = 0
def __init__(self, parent): ControlSurfaceComponent.__init__(self) self._parent = parent self._last_gqntz = 4 self._last_rqntz = 5 if self.song().clip_trigger_quantization != 0: self._last_gqntz = int(self.song().clip_trigger_quantization) if self.song().midi_recording_quantization != 0: self._last_rqntz = int(self.song().midi_recording_quantization) self._last_scene_index = list(self.song().scenes).index(self.song().view.selected_scene)#---new addition self._scenes_to_monitor = [] self.setup_scene_listeners()
def __init__(self, device, display): ControlSurfaceComponent.__init__(self) self._display = display self._main_device = device self._extra_device = None self._main_device._update_callback = self.update self._prev_device_button = None self._next_device_button = None self._update_timer_count = 0 self._register_timer_callback(self._on_custom_timer)
def __init__(self, cs, mixer): ControlSurfaceComponent.__init__(self) self._cs = cs self._mixer = mixer self._clip_focus = None self._matrix = None self._track = self.song().view.selected_track #self._change = time.time() self._change = time.clock() self.song().add_tempo_listener(self._on_tempo_change) self._tempo = self._cs.song().tempo self._on_tempo_change() self.on_selected_track_changed()
def __init__(self, parent): ControlSurfaceComponent.__init__(self) self._parent = parent self._last_gqntz = 4 self._last_rqntz = 5 if self.song().clip_trigger_quantization != 0: self._last_gqntz = int(self.song().clip_trigger_quantization) if self.song().midi_recording_quantization != 0: self._last_rqntz = int(self.song().midi_recording_quantization) self._last_scene_index = list(self.song().scenes).index( self.song().view.selected_scene) #---new addition self._scenes_to_monitor = [] self.setup_scene_listeners()
def __init__(self, num_tracks, parent): assert (num_tracks > 0) or AssertionError ControlSurfaceComponent.__init__(self) self.__main_script__ = parent self._num_tracks = num_tracks self._toggle_buttons = [] self._device_left_button = None self._device_right_button = None self._ignore_track_selection = False self.application().view.add_is_view_visible_listener( 'Detail', self._on_detail_view_changed) self.application().view.add_is_view_visible_listener( 'Detail/Clip', self._on_views_changed)
def __init__(self, script, num): ControlSurfaceComponent.__init__(self) self._script = script self._num = num self._button = None self._clear_button = None self._undo_button = None self._stop_button = None self._looper = None self._last_looper = None self._state = 0 self._undo = 0 self._button_values = [0, 5, 6, 2, 3] self.find_looper()
def __init__(self, parent): ControlSurfaceComponent.__init__(self) self._parent = parent self._current_tracks = {} self._parameters_to_smooth = {} self._rack_parameters_to_smooth = {} self._smoothing_active = False self._rack_smoothing_active = False self._smoothing_speed = 7 self._control_rack = None self._snap_id = None self._is_control_track = False self._include_nested_devices = False self._parameter_limit = 500 self._parent._register_timer_callback(self.on_timer) self._has_timer = True
def __init__(self, parent): # Boilerplate ControlSurfaceComponent.__init__(self) self._parent = parent # Default the L/R/Master levels to 0 self._meter_level = 0 # self._a_level = 0 self._tracks = [None]*NUM_METERS self._meters = [None]*NUM_METERS # We don't start clipping self._clipping = False self._connected = False self._session_offset = 0 self._enabled = True
def __init__(self): ControlSurfaceComponent.__init__(self) self._device_clip_toggle_button = None self._detail_toggle_button = None """ WAC addition....................................""" self._browser_toggle_button = None self._arrange_toggle_button = None """------------------------------------------------""" self._left_button = None self._right_button = None self._shift_button = None self._shift_pressed = False self._show_playing_clip_ticks_delay = -1 self.application().view.add_is_view_visible_listener( 'Detail', self._detail_view_visibility_changed) self._register_timer_callback(self._on_timer)
def __init__(self, parent, rack, track): self._parent = parent ControlSurfaceComponent.__init__(self) self._register_timer_callback(self.on_timer) self._has_timer = True self._on_off_param = [] self._param_macros = {} self._update_macro = 0 self._update_param = 0 self._param_update_in_progress = True self._macro_update_in_progress = True self._parent.schedule_message(8, self.allow_macro_updates) self._parent.schedule_message(8, self.allow_param_updates) self._get_initial_value = False self._track = track self.setup_device(rack)
def __init__( self, external_mapping=None, parent=None): #external mapping is an object used for pad mapping SLMenuWithActions.__init__(self, parent=parent) ControlSurfaceComponent.__init__(self) self.parent = parent self.external_mapping = external_mapping self._active_learning_pad = None self.action = {} self._create_global_browser() self._create_tempo_action() self._create_quantize_action() self._create_record_quantize_action() self.create_shortcuts() self._rebuild_menu()
def __init__(self, mixer, parent): ControlSurfaceComponent.__init__(self) assert isinstance(mixer, MixerComponent) self._param_controls = None self._mixer = mixer self._buttons = [] self._param_controls = None self._lock_button = None self._last_mode = 0 self._is_locked = False self._ignore_buttons = False self._track = None self._strip = None self._parent = parent self._track_eq = SpecialTrackEQComponent(parent) self._track_filter = SpecialTrackFilterComponent(parent)
def __init__(self, mixer, device, parent): ControlSurfaceComponent.__init__(self) assert isinstance(mixer, MixerComponent) self._param_controls = None self._mixer = mixer self._buttons = [] self._lock_button = None self._last_mode = 0 self._is_locked = False self._ignore_buttons = False self._track = None self._strip = None self._parent = parent self._device = device self._alt_device = DeviceComponent() self._alt_device.name = 'Alt_Device_Component' self.song().add_appointed_device_listener(self._on_device_changed)
def __init__(self, parent): ControlSurfaceComponent.__init__(self) """ Below is the dictionary of actions that this script provides. For each entry: - The key = the one-word (not case-sensitive) name of the action. This is the name that is used when accessing the action from an X-Trigger. - The value = the name of the function in this script to call to perform the action. Except for the last entry, every entry should be followed by a comma. You can remove the 2 example entries from the dictionary if you wish. """ self._action_dict = { #<--DO NOTE REMOVE THIS 'EX_ACTION_1': 'example_action_one', 'EX_ACTION_2': 'example_action_two' } #<--DO NOTE REMOVE THIS """ The parent ClyphX script. Through this you can access things such as the log_message function (writes to Live's Log.txt file), which you'll likely use quite a bit. The Troubleshooting section of the ClyphX manual covers how to access Log.txt. """ self._parent = parent
def __init__(self, parent): # Boilerplate ControlSurfaceComponent.__init__(self) self._parent = parent # Default the L/R/Master levels to 0 self._meter_level = 0 self._a_level = 0 self._b_level = 0 self._c_level = 0 self._d_level = 0 # We don't start clipping self._clipping = False # The tracks we'll be pulling L and R RMS from self._a_track = self.song().tracks[A_SOURCE] self._b_track = self.song().tracks[B_SOURCE] self._c_track = self.song().tracks[C_SOURCE] self._d_track = self.song().tracks[D_SOURCE] #setup classes self.a_meter = VUMeter(self, self._a_track, CHANNEL_SCALE_MAX, CHANNEL_SCALE_MIN, CHANNEL_SCALE_INCREMENTS, A_COL) self.b_meter = VUMeter(self, self._b_track, CHANNEL_SCALE_MAX, CHANNEL_SCALE_MIN, CHANNEL_SCALE_INCREMENTS, B_COL) self.c_meter = VUMeter(self, self._c_track, CHANNEL_SCALE_MAX, CHANNEL_SCALE_MIN, CHANNEL_SCALE_INCREMENTS, C_COL) self.d_meter = VUMeter(self, self._d_track, CHANNEL_SCALE_MAX, CHANNEL_SCALE_MIN, CHANNEL_SCALE_INCREMENTS, D_COL) self.master_meter = VUMeter(self, self.song().master_track, MASTER_SCALE_MAX, MASTER_SCALE_MIN, MASTER_SCALE_INCREMENTS, None, True) # Listeners! self._a_track.add_output_meter_left_listener(self.a_meter.observe) self._b_track.add_output_meter_left_listener(self.b_meter.observe) self._c_track.add_output_meter_left_listener(self.c_meter.observe) self._d_track.add_output_meter_left_listener(self.d_meter.observe) self.song().master_track.add_output_meter_left_listener( self.master_meter.observe)
def __init__(self, script): ControlSurfaceComponent.__init__(self) self._sub_components = [] self.set_allow_update(False) ###added self._script = script self._host_name = 'Mono' self._dial_matrix = None self._grid = None self._keys = [] self._knobs = [] self._parameter_controls = [] self._alt_button = None self._shift_button = None self._lock_button = None self._nav_buttons = None self._menu = None self._client = None ###added self._active_client = None self._shift_pressed = 0 self._alt_pressed = 0 self._bank_add = 0 self._chan_add = 0 self._locked = 0 self._x = 0 self._y = 0 self._client_buttons = [] self._channel_buttons = [] self._color_maps = [range(128) for index in range(17)] self._colors = self._color_maps[0] self._offsets = [[0, 0] for index in range(17)] 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._is_enabled = False self._is_connected = False self._autoselect = True """MonoLink specific variables""" self._port_entry = [[], []] """CNTRLR specific variables""" self._bank_buttons = [] self.set_allow_update(True) self._register_timer_callback(self._on_timer) return None
def __init__(self, script): ControlSurfaceComponent.__init__(self) self._sub_components = [] self.set_allow_update(False) ###added self._script = script self._host_name = 'Cntrlr' self._dial_matrix = None self._dial_button_matrix = None self._grid = None self._keys = [] self._knobs = [] self._parameter_controls = [] self._alt_button = None self._shift_button = None self._lock_button = None self._nav_buttons = None self._menu = None self._client = None ###added self._active_client = None self._shift_pressed = 0 self._alt_pressed = 0 self._bank_add = 0 self._chan_add = 0 self._locked = 0 self._c_absolute_mode = 1 self._c_local_ring_control = 1 self._x = 0 self._y = 0 self._client_buttons = [] self._channel_buttons = [] self._color_maps = [range(128) for index in range(16)] self._colors = self._color_maps[0] self._offsets = [[0, 0] for index in range(16)] 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._is_enabled = False self._is_connected = False self.set_allow_update(True) self._register_timer_callback(self._on_timer) self._alt_device_banks = ALT_DEVICE_BANKS return None
def __init__(self, parent): ControlSurfaceComponent.__init__(self) self._parent = parent self._last_gqntz = 4 self._last_rqntz = 5 self._repeat_enabled = False self._tempo_ramp_active = False self._tempo_ramp_settings = [] self._last_beat = -1 self.song().add_current_song_time_listener(self.on_time_changed) self.song().add_is_playing_listener(self.on_time_changed) if self.song().clip_trigger_quantization != 0: self._last_gqntz = int(self.song().clip_trigger_quantization) if self.song().midi_recording_quantization != 0: self._last_rqntz = int(self.song().midi_recording_quantization) self._last_scene_index = list(self.song().scenes).index(self.song().view.selected_scene) self._scenes_to_monitor = [] self.setup_scene_listeners()
def __init__(self): ControlSurfaceComponent.__init__(self) self._device_banks = DEVICE_DICT self._device_best_banks = DEVICE_BOB_DICT self._device_bank_names = BANK_NAME_DICT self._device = None self._parameter_controls = None self._bank_up_button = None self._bank_down_button = None self._bank_buttons = None self._on_off_button = None self._lock_button = None self._lock_callback = None self._device_name_data_source = None self._device_bank_registry = {} self._bank_index = 0 self._bank_name = '<No Bank>' self._locked_to_device = False return None
def __init__(self, parent, session, matrix, playing_position_buttons): ControlSurfaceComponent.__init__(self) self._parent = parent self._session = session self._matrix = matrix self._playing_position_buttons = playing_position_buttons self._bank_buttons = None self._buttons = None self._follow_button = None self._shift_button = None self._shift_pressed = False self._velocity_buttons = None self._velocity_index = 5 #velocity index max range matches session width (0 to 7) self._velocity = 95 #range 0 to 127 self._quantization = 0.25 #1/16th note in 4/4 time self._quantization_index = 2 self._lane_mute_buttons = None self._loop_start_buttons = None self._loop_length_buttons = None self._loop_start_index = 0 self._loop_end_index = 7 self._loop_index_length = 0 self._loop_length = None self._loop_start = None self._loop_end = None self._width = self._session.width() self._height = self._session.height() self._bank_index = 0 #bank index; range matches session width self._key_index = 36 #C1 Note self._is_following = False self._sequencer_clip = None self._clip_notes = [] self._muted_lanes = [] self._nav_up_button = None self._nav_down_button = None self._nav_left_button = None self._nav_right_button = 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._is_active = False self._register_timer_callback(self._on_timer)
def __init__(self, is_momentary, type, cc_values, hsv_channels, control_channel, fullColor, track): #@ReservedAssignment log(True, __name__) # basic init ControlSurfaceComponent.__init__(self) self.buttons = [] self.track = track self.cc_values = cc_values # button init for buttonIndex in range(4): f1Button = F1ColorButtonElement( is_momentary, type, self.cc_values[buttonIndex], hsv_channels, control_channel, fullColor, "CC-" + str(self.cc_values[buttonIndex])) self.buttons.append(f1Button) # listener self.remove_listener() self.add_listener() log(False, __name__)
def __init__(self, parent): ControlSurfaceComponent.__init__(self) self._parent = parent self._current_tracks = {} self._parameters_to_smooth = {} self._rack_parameters_to_smooth = {} self._smoothing_active = False self._synced_smoothing_active = False self._rack_smoothing_active = False self._smoothing_speed = 7 self._smoothing_count = 0 self._last_beat = -1 self._control_rack = None self._snap_id = None self._is_control_track = False self._include_nested_devices = False self._parameter_limit = 500 self._register_timer_callback(self._on_timer) self._has_timer = True self.song().add_current_song_time_listener(self._on_time_changed) self.song().add_is_playing_listener(self._on_time_changed)
def __init__(self): ControlSurfaceComponent.__init__(self) self._register_timer_callback(self._on_timer) self._refresh = 0 self._clip = None self._note_cache = [] self._last_note = 36 self._last_pos = 0 self._quantisation = 0.25 self._default_length = 1 self._default_velocity = 100 self._time_offset = 0 self._note_offset = 36 self._num_steps = 16 self._height = 16 self._root = 0 self._scale = 0 self._scales = [[], [0, 2, 4, 5, 7, 9, 11], [0, 2, 3, 5, 7, 8, 10], [0, 2, 3, 5, 7, 8, 11], [0, 2, 4, 7, 9]] self._mutes = [0 for i in range(127)] self._fader_type = 0 self._fold_notes = 0 self._save_note = 0 self._ltime = '' self._chord_intervals = [[0, 4, 7], [0, 3, 7], [0, 4, 8], [0, 4, 6], [0, 3, 6], [0, 5, 7]] self._quick_chord = 127 self._durations = [0.125, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 2, 4] self._selection = [0, 0, 0, 0] self._last_details = [-1, -1, -1, -1, -1] if LC2Sysex.l9(): self._clisten = ('loop_start', 'loop_end', 'start_marker', 'end_marker') else: self._clisten = ('loop_start', 'loop_end') return