def __init__(self): self._prev_track_button = None self._next_track_button = None self._prev_scene_button = None self._next_scene_button = None self._play_button = None self._stop_button = None self._overdub_button = None self._mute_button = None self._solo_button = None self._undo_button = None self._arm_button = None self._parent = None self._auto_arm = True MixerComponent.__init__(self,1) self._last_arm_button_press=int(round(time.time() * 1000)) self._last_overdub_button_press=int(round(time.time() * 1000)) self._last_undo_button_press=int(round(time.time() * 1000)) self._long_press = 500 self._selected_track = self.song().view.selected_track self._selected_scene = self.song().view.selected_scene
def __init__(self, sends = [], mutes = [], solos = [], arms = [], selects = [], master_select = None, crossfader = None, master = None, cue = None, faders = [], **kwargs): MixerComponent.__init__(self, len(faders)) Elementary.__init__(self, **kwargs) self.num_tracks = len(faders) self.name = "Mixer" self.set_track_offset(0) # One for each channel self.build_channel_strips(mutes, faders, sends, solos, arms, selects) # One-offs self.build_master(master, master_select) self.build_cue(cue) self.build_crossfader(crossfader)
def __init__(self, control_surface): self._control_surface = control_surface self._skin = self._control_surface._skin self._prev_track_button = None self._next_track_button = None self._prev_scene_button = None self._next_scene_button = None self._play_button = None self._stop_button = None self._session_record_button = None self._mute_button = None self._solo_button = None self._undo_button = None self._arm_button = None self._implicit_arm = True MixerComponent.__init__(self, 1) self.set_enabled(False) now = int(round(time.time() * 1000)) self._last_arm_button_press = now self._last_session_record_button_press = now self._last_undo_button_press = now self._last_solo_button_press = now self._last_stop_button_press = now self._long_press = 500
def disconnect(self): MixerComponent.disconnect(self) if self._mute_solo_flip_button != None: self._mute_solo_flip_button.remove_value_listener( self._mute_solo_flip_value) self._mute_solo_flip_button = None self._strip_mute_solo_buttons = None
def set_enabled(self, enabled): if self.is_enabled and not enabled: # disable implicit arm while leaving. if self._implicit_arm: if self.selected_track.can_be_armed: self.selected_track.implicit_arm = False MixerComponent.set_enabled(self, enabled)
def __init__(self,num_tracks,num_returns,parent): self._is_active = False MixerComponent.__init__(self,num_tracks,num_returns) self.parent = parent self.num_tracks = num_tracks self._sliders = [] self._sends = [] self._select_buttons = [] self._rotaries = [] self.VU_mode = 0 self.send_mode = 0 self.is_active = True #self.device = device self._master_fader = self.encoder(CHANNEL,MASTER_SLIDER) self._master_select = self.button(CHANNEL,MASTER_BUTTON) for track in range(num_tracks): self._sliders.append(self.encoder(CHANNEL,SLIDERS[track])) for index in range(4): self._rotaries.append(self.encoder(CHANNEL,ROTARIES[index])) for track in range(num_tracks): self._select_buttons.append(self.button(CHANNEL,SELECT_BUTTONS[track])) self._is_active = True
def __init__(self): self._prev_track_button = None self._next_track_button = None self._prev_scene_button = None self._next_scene_button = None self._play_button = None self._stop_button = None self._session_record_button = None self._mute_button = None self._solo_button = None self._undo_button = None self._arm_button = None self._parent = None self._auto_arm = True self._notify_parent = True MixerComponent.__init__(self,1) self.set_enabled(False) now = int(round(time.time() * 1000)) self._last_arm_button_press = now self._last_session_record_button_press = now self._last_undo_button_press = now self._last_solo_button_press = now self._last_stop_button_press = now self._long_press = 500 self._selected_track = self.song().view.selected_track self._selected_scene = self.song().view.selected_scene
def __init__(self, num_tracks): MixerComponent.__init__(self, num_tracks) self._selected_tracks = [] self._display = None self._mute_button = None self._solo_button = None self._register_timer_callback(self._on_timer)
def __init__(self, num_tracks): MixerComponent.__init__(self, num_tracks) self._strip_mute_solo_buttons = None self._mute_solo_flip_button = None self._mute_solo_is_flipped = False self._selected_tracks = [] self._register_timer_callback(self._on_timer)
def __init__(self, num_tracks, num_returns=0, device_select=None, device_encoders=None): self.devices = [] self.eqs = [] self.active_track = 0 self.device_select = device_select MixerComponent.__init__(self, num_tracks, num_returns) self.encoders = [DynamicEncoder(cc, None) for cc in device_encoders] for i in range(len(self._channel_strips)): dev = { "cb": None, "component": DeviceComponent(), "track": None, "params": [], "toggle": None, } self.devices.append(dev) self.register_components(dev["component"]) eq = { "component": DeviceComponent(), "cb": None, "track": None } self.eqs.append(eq) self.register_components(eq["component"]) self._reassign_tracks() if device_select: for i, b in enumerate(device_select): b.add_value_listener(partial(self.on_device_select_push, i))
def set_enabled(self, enabled): if self.is_enabled and not enabled: # disable implicit arm while leaving. if(self._parent != None and self._notify_parent): if (self._selected_track.can_be_armed): self._selected_track.implicit_arm = False MixerComponent.set_enabled(self, enabled)
def update(self): if self.is_enabled(): if self._clip_up_button != None: self._clip_up_button.set_on_off_values(GREEN_FULL,LED_OFF) if(True): self._clip_up_button.turn_off() else: self._clip_up_button.turn_on() if self._clip_down_button != None: self._clip_down_button.set_on_off_values(GREEN_FULL,LED_OFF) if(True): self._clip_down_button.turn_off() else: self._clip_down_button.turn_on() if self._overdub_button != None: self._overdub_button.set_on_off_values(RED_FULL,RED_THIRD) if(self.song().overdub): self._overdub_button.turn_off() else: self._overdub_button.turn_on() if self._play_button != None: self._play_button.set_on_off_values(RED_FULL,RED_THIRD) if(False): self._play_button.turn_off() else: self._play_button.turn_on() if self._stop_button != None: self._stop_button.set_on_off_values(RED_FULL,RED_THIRD) if(False): self._stop_button.turn_off() else: self._stop_button.turn_on() if self._mute_button != None: self._mute_button.set_on_off_values(AMBER_FULL,AMBER_THIRD) if(self._selected_track.arm): self._mute_button.turn_off() else: self._mute_button.turn_on() if self._solo_button != None: self._solo_button.set_on_off_values(RED_FULL,RED_THIRD) if(self._selected_track.solo): self._solo_button.turn_on() else: self._solo_button.turn_off() if self._arm_button != None: self._arm_button.set_on_off_values(RED_FULL,RED_THIRD) if(self._selected_track.mute): self._arm_button.turn_on() else: self._arm_button.turn_off() MixerComponent.update(self)
def __init__(self, parent, num_tracks): self._is_locked = False #added self._parent = parent #added MixerComponent.__init__(self, num_tracks) self._shift_button = None #added self._pedal = None self._shift_pressed = False #added self._pedal_pressed = False #added
def __init__(self, num_tracks, num_returns, EQ, Filter): MixerComponent.__init__(self, num_tracks, num_returns, EQ, Filter) # SENDS self.sends_index = 0 self.send_button_up = None self.send_button_down = None self.send_controls = [] self.send_reset = []
def __init__(self, num_tracks): self._tracks_to_use_callback = None self._serato_interface = None MixerComponent.__init__(self, num_tracks) for index in range(num_tracks): self._channel_strips[index].set_index(index) return
def disconnect(self): self._unregister_timer_callback(self._on_timer) self._selected_tracks = None MixerComponent.disconnect(self) if self._mute_solo_flip_button != None: self._mute_solo_flip_button.remove_value_listener(self._mute_solo_flip_value) self._mute_solo_flip_button = None self._strip_mute_solo_buttons = None
def disconnect(self): #added MixerComponent.disconnect(self) if (self._shift_button != None): self._shift_button.remove_value_listener(self._shift_value) self._shift_button = None if (self._pedal != None): self._pedal.remove_value_listener(self._pedal_value) self._pedal = None
def __init__(self, *a, **k): super(Alesis_VI, self).__init__(*a, **k) with self.component_guard(): midimap = MidiMap() transport = TransportComponent(name='Transport', is_enabled=False, layer=Layer(play_button=midimap['Play'], stop_button=midimap['Stop'], loop_button=midimap['Loop'], record_button=midimap['Record'], seek_forward_button=midimap['Forward'], seek_backward_button=midimap['Backward'])) mixer_size = len(midimap['Volume_Encoders']) mixer = MixerComponent(mixer_size, name='Mixer', is_enabled=False, layer=Layer(volume_controls=midimap['Volume_Encoders'])) transport.set_enabled(True) mixer.set_enabled(True)
def on_selected_track_changed(self): MixerComponent.on_selected_track_changed(self) selected_track = self.song().view.selected_track num_strips = len(self._channel_strips) track_index = selected_track in self._tracks_to_use() and list(self._tracks_to_use()).index(selected_track) new_offset = track_index - track_index % num_strips if not new_offset / num_strips == int(new_offset / num_strips): raise AssertionError self.set_track_offset(new_offset)
def __init__(self, num_tracks): self._shift_button = None self._selected_mute_solo_button = None self._strip_mute_solo_buttons = None self._mute_solo_flip_button = None MixerComponent.__init__(self, num_tracks) self._selected_tracks = [] self._register_timer_callback(self._on_timer) return
def update(self): if self.is_enabled(): self.update_track_buttons() self.update_scene_buttons() if self._session_record_button != None: if self._auto_arm: self._session_record_button.set_on_off_values(RED_FULL,RED_THIRD) else: self._session_record_button.set_on_off_values(AMBER_FULL,AMBER_THIRD) if(self.song().session_record): self._session_record_button.turn_on() else: self._session_record_button.turn_off() if self._play_button != None: self._play_button.set_on_off_values(RED_FULL,RED_THIRD) self._play_button.turn_off() if self._stop_button != None: self._stop_button.set_on_off_values(RED_FULL,RED_THIRD) self._stop_button.turn_off() if self._mute_button != None: self._mute_button.set_on_off_values(AMBER_FULL,AMBER_THIRD) if(self._selected_track.mute): self._mute_button.turn_off() else: self._mute_button.turn_on() if self._undo_button != None: self._undo_button.set_on_off_values(AMBER_FULL,AMBER_THIRD) if(self.song().can_undo): self._undo_button.turn_on() else: self._undo_button.turn_off() if self._solo_button != None: self._solo_button.set_on_off_values(AMBER_FULL,AMBER_THIRD) if(self._selected_track.solo): self._solo_button.turn_on() else: self._solo_button.turn_off() if self._arm_button != None: if self._auto_arm: self._arm_button.set_on_off_values(GREEN_FULL,GREEN_THIRD) else: self._arm_button.set_on_off_values(RED_FULL,RED_THIRD) if(self._selected_track.can_be_armed and self._selected_track.arm): self._arm_button.turn_on() else: self._arm_button.turn_off() MixerComponent.update(self)
def disconnect(self): self._unregister_timer_callback(self._on_timer) self._selected_tracks = None MixerComponent.disconnect(self) if self._mute_solo_flip_button != None: self._mute_solo_flip_button.remove_value_listener( self._mute_solo_flip_value) self._mute_solo_flip_button = None self._selected_mute_solo_button = None self._strip_mute_solo_buttons = None
def _bank_down_value(self, value): old_offset = int(self._track_offset) MixerComponent._bank_down_value(self, value) if self._bank_display != None: if value != 0 and old_offset != self._track_offset: min_track = self._track_offset + 1 max_track = min(len(self._tracks_to_use()), min_track + len(self._channel_strips)) self._bank_display.display_message('Tracks ' + str(min_track) + ' - ' + str(max_track)) else: self._bank_display.update()
def __init__(self, num_tracks, num_returns=0, with_eqs=False, with_filters=False): MixerComponent.__init__(self, num_tracks, num_returns, with_eqs, with_filters) self._unsolo_all_button = None self._unmute_all_button = None self._stop_all_button = None
def on_selected_track_changed(self): MixerComponent.on_selected_track_changed(self) selected_track = self.song().view.selected_track num_strips = len(self._channel_strips) track_index = selected_track in self._tracks_to_use() and list( self._tracks_to_use()).index(selected_track) new_offset = track_index - track_index % num_strips if not new_offset / num_strips == int(new_offset / num_strips): raise AssertionError self.set_track_offset(new_offset)
def on_selected_track_changed(self): MixerComponent.on_selected_track_changed(self) selected_track = self.song().view.selected_track num_strips = len(self._channel_strips) if selected_track in self._tracks_to_use(): track_index = list(self._tracks_to_use()).index(selected_track) new_offset = track_index - track_index % num_strips assert old_div(new_offset, num_strips) == int(old_div(new_offset, num_strips)) self.set_track_offset(new_offset)
def custom_offset_mixer(self): # skipped the subclass # for some reason this pattern will allow the offset and static volume control. # looking for explaination and insight on this...Bueller? self.mixer_custom = MixerComponent(self.box_width) # get a local mixer object ready self.mixer_custom.name = 'Mixer Custom' # name self.mixer_custom.set_track_offset(self.volume_offset) # the offset # compare width with track vol count to qualify -- put somewhere else for index in range(self.box_width): # @marwei must kill this style and count self.mixer_custom.channel_strip(index).set_volume_control(self.slider(midi_channel, self.track_volume_static[index]))
def __init__(self, num_tracks, c_instance): self.c_instance = c_instance self._selected_mute_solo_button = None self._strip_mute_solo_buttons = None self._mute_solo_flip_button = None MixerComponent.__init__(self, num_tracks) self._selected_tracks = [] self._register_timer_callback(self._on_timer) self._shift_pressed = False self._mute_solo_raw_value = 127
def _reassign_tracks(self): self.all_track_activators = False for track in self.track_activators: self.track_activators[track] = self.all_track_activators for strip in self._channel_strips: strip.sends_off() MixerComponentBase._reassign_tracks(self) self.update_sends()
def __init__(self, parent, num_tracks, c_instance): self.parent = parent self.c_instance = c_instance self.log("mixer.init") self._selected_mute_solo_button = None self._strip_mute_solo_buttons = None self._mute_solo_flip_button = None MixerComponent.__init__(self, num_tracks) self._selected_tracks = [] self._register_timer_callback(self._on_timer) self._mute_solo_raw_value = 127
def disconnect(self): if self._unarm_all_button != None: self._unarm_all_button.remove_value_listener(self._unarm_all_value) self._unarm_all_button = None if self._unsolo_all_button != None: self._unsolo_all_button.remove_value_listener(self._unsolo_all_value) self._unsolo_all_button = None if self._unmute_all_button != None: self._unmute_all_button.remove_value_listener(self._unmute_all_value) self._unmute_all_button = None MixerComponent.disconnect(self)
def _setup_mixer(self): self._mixer = MixerComponent(NUM_CHANNEL_STRIPS) self._mixer.name = 'Mixer' self._mixer.set_enabled(False) for index in xrange(NUM_CHANNEL_STRIPS): strip = self._mixer.channel_strip(index) strip.set_invert_mute_feedback(True) sends = ButtonMatrixElement(name='%d_Send_Controls' % (index + 1), rows=[ ( self._rotaries_a[index], self._rotaries_b[index])]) strip.layer = Layer(volume_control=self._faders[index], pan_control=self._encoders[index], send_controls=sends, mute_button=self._mute_buttons[index], solo_button=self._solo_buttons[index], arm_button=self._arm_buttons[index], select_button=self._encoder_pushes[index])
def __init__(self, num_tracks, num_returns=0): self._osd = None MixerComponent.__init__(self, num_tracks, num_returns) self._unarm_all_button = None self._unsolo_all_button = None self._unmute_all_button = None self.sendOffset = 0 self.sendOffsetPatternValue = 0 self.sendOffsetPattern = [2, 0, 2, 1, 2, 3, 2] self.sendOffsetBPattern = [3, 0, 3, 1, 3, 2, 3] self.sendOffsetCurrentPattern = []
def __init__(self, num_tracks, c_instance): self.c_instance = c_instance self._shift_button = None self._selected_mute_solo_button = None self._strip_mute_solo_buttons = None self._mute_solo_flip_button = None MixerComponent.__init__(self, num_tracks) self._selected_tracks = [] self._register_timer_callback(self._on_timer) self._shift_pressed = False self._mute_solo_raw_value = 127
def __init__(self, *a, **k): super(MPK249, self).__init__(*a, **k) with self.component_guard(): midimap = MidiMap() drum_rack = DrumRackComponent(name='Drum_Rack', is_enabled=False, layer=Layer(pads=midimap['Drum_Pads'])) drum_rack.set_enabled(True) transport = TransportComponent(name='Transport', is_enabled=False, layer=Layer(play_button=midimap['Play'], record_button=midimap['Record'], stop_button=midimap['Stop'], seek_forward_button=midimap['Forward'], seek_backward_button=midimap['Backward'], loop_button=midimap['Loop'])) transport.set_enabled(True) mixer_size = len(midimap['Sliders']) mixer = MixerComponent(mixer_size, name='Mixer', is_enabled=False, layer=Layer(volume_controls=midimap['Sliders'], pan_controls=midimap['Encoders'], arm_buttons=midimap['Arm_Buttons'])) mixer.set_enabled(True)
def _setup_mixer_control(self): #A mixer is one-dimensional; here we define the width in tracks num_tracks = 1 #set up the mixer self.mixer = MixerComponent( num_tracks, 2, with_eqs=True, with_filters=True ) #(num_tracks, num_returns, with_eqs, with_filters) self.mixer.set_track_offset( 0) #sets start point for mixer strip (offset from left) #set the selected strip to the first track, so that we don't, for example, try to assign a button to arm the master track, which would cause an assertion error self.song().view.selected_track = self.mixer.channel_strip(0)._track
def update(self): if self.is_enabled(): self.update_track_buttons() self.update_scene_buttons() if self._session_record_button != None: if self._implicit_arm: self._session_record_button.set_on_off_values("TrackController.ImplicitRecording") else: self._session_record_button.set_on_off_values("TrackController.Recording") if(self.song().session_record): self._session_record_button.turn_on() else: self._session_record_button.turn_off() if self._play_button != None: self._play_button.set_light("TrackController.Play.Off") if self._stop_button != None: self._stop_button.set_light("TrackController.Stop.Off") if self._mute_button != None: self._mute_button.set_on_off_values("TrackController.Mute") if(self.selected_track.mute): self._mute_button.turn_off() else: self._mute_button.turn_on() if self._undo_button != None: self._undo_button.set_on_off_values("TrackController.Undo") if self.song().can_undo: self._undo_button.turn_on() else: self._undo_button.turn_off() if self._solo_button != None: self._solo_button.set_on_off_values("TrackController.Solo") if self.selected_track.solo: self._solo_button.turn_on() else: self._solo_button.turn_off() if self._arm_button != None: if self._implicit_arm: self._arm_button.set_on_off_values("TrackController.ImplicitRecording") else: self._arm_button.set_on_off_values("TrackController.Recording") if(self.selected_track.can_be_armed and self.selected_track.arm): self._arm_button.turn_on() else: self._arm_button.turn_off() MixerComponent.update(self)
def __init__(self, control_surface, num_tracks, num_returns, EQ, Filter): self._tracks_to_use_callback = None MixerComponent.__init__(self, num_tracks, num_returns, EQ, Filter) # SENDS self._sends_index = 0 self._control_surface = control_surface self._button_up = None self._button_down = None self._send_controls = [] self._send_reset = [] self._knobs = []
def __init__(self, num_tracks, parent): MixerComponent.__init__(self, num_tracks) self._parent = parent self._volume_encoder_control = None self._vu_meters = [] for index in self.song().visible_tracks: if index.has_midi_output != True: self._vu_meters.append(self._create_vu_meter()) else: None self.on_selected_track_changed()
def _setup_mixer_control(self): #A mixer is one-dimensional; here we define the width in tracks num_tracks = 1 #set up the mixer self.mixer = MixerComponent(num_tracks, 2) #(num_tracks, num_returns) self.mixer.set_track_offset( 0) #sets start point for mixer strip (offset from left) #set the selected strip to the first track, so that we don't assign a button to arm the master track, which would cause an assertion error self.song().view.selected_track = self.mixer.channel_strip(0)._track channelstrip = self.mixer.channel_strip(0) channelstrip.set_arm_button( ConfigurableButtonElement(is_momentary, MIDI_CC_TYPE, CHANNEL, 21))
def __init__(self,top_buttons,side_buttons,parent): self._clip_up_button = None self._clip_down_button = None self._overdub_button = None self._play_button = None self._stop_button = None self._mute_button = None self._solo_button = None self._arm_button = None self._selected_track = self.song().view.selected_track self._parent=parent MixerComponent.__init__(self,8) self._set_buttons(side_buttons[0],side_buttons[1],side_buttons[2],side_buttons[3],side_buttons[4],side_buttons[5],side_buttons[6],side_buttons[7])
def disconnect(self): self.set_prev_scene_button(None) self.set_next_scene_button(None) self.set_prev_track_button(None) self.set_next_track_button(None) self.set_mute_button(None) self.set_play_button(None) self.set_stop_button(None) self.set_session_record_button(None) self.set_solo_button(None) self.set_arm_button(None) MixerComponent.disconnect(self)
def __init__(self, *a, **k): super(MPK261Custom, self).__init__(*a, **k) with self.component_guard(): midimap = MidiMap() drum_rack = DrumRackComponent(name=u'Drum_Rack', is_enabled=False, layer=Layer(pads=midimap[u'Drum_Pads'])) drum_rack.set_enabled(True) transport = TransportComponent(name=u'Transport', is_enabled=False, layer=Layer( play_button=midimap[u'Play'], record_button=midimap[u'Record'], stop_button=midimap[u'Stop'], seek_forward_button=midimap[u'Forward'], seek_backward_button=midimap[u'Backward'], loop_button=midimap[u'Loop'], metronome_button=midimap[u'Metronome'], tap_tempo_button=midimap[u'TapTempoButton'], quant_toggle_button=midimap[u'RecQuantButton'], overdub_button=midimap[u'OverdubButton'] )) transport.set_enabled(True) mixer_size = len(midimap[u'Sliders']) # Custom changes: Adds the "mute" buttons. By default, mute = turns light on. # invert_mute_feedback flips it around so muting = turns light off. mixer = MixerComponent(mixer_size, name=u'Mixer', is_enabled=False, invert_mute_feedback=True, layer=Layer( volume_controls=midimap[u'Sliders'], pan_controls=midimap[u'Encoders'], arm_buttons=midimap[u'Arm_Buttons'], mute_buttons=midimap[u'Mute_Buttons'], )) mixer.set_enabled(True) # Adds the blue hand controls. device = DeviceComponent( name=u'Device', is_enabled=False, layer=Layer(parameter_controls=midimap[u'EncodersB1']), device_selection_follows_track_selection=True) device.set_enabled(True) self.set_device_component(device) session = SessionComponent( SESSION_WIDTH, SESSION_HEIGHT, auto_name=True, enable_skinning=True, is_enabled=False, layer=Layer( clip_launch_buttons=midimap[u'Drum_Pads_BankB'], stop_track_clip_buttons=midimap[u'Drum_Pads_BankC_BottomRow'], scene_launch_buttons=midimap[u'Drum_Pads_BankD_RightColumn'])) session.set_enabled(True) self.log_message(u' ***** MPK261 Custom script loaded ****')
def __init__(self): MixerComponent.__init__(self, NUM_TRACKS) self._strips = [AbletonChannelStrip(i) for i in range(NUM_TRACKS)] self._sliders = [ SliderElement(CC_TYPE, MIDI_CHANNEL, (FADER_START + i)) for i in range(NUM_TRACKS) ] self._buttons = [ toggle_cc_button(BUTTON_START + i) for i in range(NUM_TRACKS * 2) ] self._strip_offset = 0 self._assigned_tracks = [] self.song().add_tracks_listener(self.__on_tracks_added_or_deleted) self._reassign_strips()
def __init__(self, c_instance): super(matmacx16v1, self).__init__(c_instance) with self.component_guard(): global _map_modes _map_modes = Live.MidiMap.MapMode # mixer global mixer num_tracks = 128 num_returns = 24 self.mixer = MixerComponent(num_tracks, num_returns) global active_mode active_mode = "_mode1" self._set_active_mode() self.show_message("Powered by mtmc")
def __init__(self, name_display, value_display, num_tracks, num_returns=0): MixerComponent.__init__(self, num_tracks, num_returns=0) self._name_display = name_display self._value_display = value_display for index in range(num_tracks): self._channel_strips[index].set_name_display(self._name_display) self._channel_strips[index].set_value_display(self._value_display) for index in range(num_returns): self._return_strips[index].set_name_display(self._name_display) self._return_strips[index].set_value_display(self._value_display) self._selected_strip.set_name_display(self._name_display) self._selected_strip.set_value_display(self._value_display)
def __init__(self, top_buttons, side_buttons, parent): self._clip_up_button = None self._clip_down_button = None self._overdub_button = None self._play_button = None self._stop_button = None self._mute_button = None self._solo_button = None self._arm_button = None self._selected_track = self.song().view.selected_track self._parent = parent MixerComponent.__init__(self, 8) self._set_buttons(side_buttons[0], side_buttons[1], side_buttons[2], side_buttons[3], side_buttons[4], side_buttons[5], side_buttons[6], side_buttons[7])
def __init__(self, c_instance): ControlSurface.__init__(self, c_instance) with self.component_guard(): self._suggested_input_port = 'FDRbox' self._suggested_output_port = 'FDRbox' # ButtonElement( is_momentary, msg_type, channel, identifier ) faders = [ ButtonElement(False, MIDI_CC_TYPE, MIDI_CHANNEL, i) for i in range(8) ] self._mixer = MixerComponent(8) for i in range(8): self._mixer.channel_strip(i).set_volume_control(faders[i])
def tracks_to_use(self): tracks = tuple() if self._tracks_to_use_callback != None: tracks = self._tracks_to_use_callback() else: tracks = MixerComponent.tracks_to_use(self) return tracks
def setup_mixer(self): global mixer mixer = MixerComponent(2, 2) mixer.set_track_offset(0) self.song().view.selected_track = mixer.channel_strip( 0 )._track # set the selected strip to the first track, so that we don't, for example, try to assign a button to arm the master track, which would cause an assertion error send_a = EncoderElement(MIDI_CC_TYPE, CHANNEL, SEND_A, mode_absolute) send_b = EncoderElement(MIDI_CC_TYPE, CHANNEL, SEND_B, mode_absolute) send_c = EncoderElement(MIDI_CC_TYPE, CHANNEL, SEND_C, mode_absolute) send_d = EncoderElement(MIDI_CC_TYPE, CHANNEL, SEND_D, mode_absolute) pan = EncoderElement(MIDI_CC_TYPE, CHANNEL, PAN, mode_absolute) mixer.selected_strip().set_send_controls( [send_a, send_b, send_c, send_d]) mixer.selected_strip().set_pan_control(pan)
def __init__(self, c_instance): ControlSurface.__init__(self, c_instance) with self.component_guard(): global mixer global transport track_count = 256 # Allegedly unlimited in Live Suite... return_count = 24 # Maximum of 12 Sends and 12 Returns mixer = MixerComponent(track_count, return_count) transport = TransportComponent() self._mainCtrl()
def __init__(self, num_tracks, num_returns=3, with_eqs=False, with_filters=False): MixerComponent.__init__(self, num_tracks, num_returns, with_eqs, with_filters) self._master_stopall_button = None self._master_stopall_pressed = None self._master_mute_button = None self._master_mute_pressed = None self._master_solo_button = None self._master_solo_pressed = None self._master_arm_button = None self._master_arm_pressed = None
def setup_mixer(self): # elements self.mute_button = ButtonElement(True, MIDI_NOTE_TYPE, 0, 92) # tracks, return_tracks self.solo_button = ButtonElement(True, MIDI_NOTE_TYPE, 0, 84) # tracks, return_tracks self.arm_button = ButtonElement(True, MIDI_NOTE_TYPE, 0, 85) # tracks self.senda_up_button = ButtonElement(True, MIDI_NOTE_TYPE, 0, 96) # tracks, return_tracks self.senda_down_button = ButtonElement(True, MIDI_NOTE_TYPE, 0, 88) # tracks, return_tracks self.sendb_up_button = ButtonElement(True, MIDI_NOTE_TYPE, 0, 97) # tracks, return_tracks self.sendb_down_button = ButtonElement(True, MIDI_NOTE_TYPE, 0, 89) # tracks, return_tracks self.pan_up_button = ButtonElement( True, MIDI_NOTE_TYPE, 0, 98) # tracks, return_tracks, master_track self.pan_down_button = ButtonElement( True, MIDI_NOTE_TYPE, 0, 90) # tracks, return_tracks, master_track self.volume_up_button = ButtonElement( True, MIDI_NOTE_TYPE, 0, 99) # tracks, return_tracks, master_track self.volume_down_button = ButtonElement( True, MIDI_NOTE_TYPE, 0, 91) # tracks, return_tracks, master_track self.track_nav_encoder = EncoderElement( MIDI_CC_TYPE, 0, 14, Live.MidiMap.MapMode.relative_binary_offset) # mixer self.mixer = MixerComponent(7, 2) self.mixer.selected_strip().set_mute_button(self.mute_button) self.mixer.selected_strip().set_solo_button(self.solo_button) self.mixer.selected_strip().set_arm_button(self.arm_button) # send A/B, pan, volume self.senda_up_button.add_value_listener(self.on_senda_up_changed) self.senda_down_button.add_value_listener(self.on_senda_down_changed) self.sendb_up_button.add_value_listener(self.on_sendb_up_changed) self.sendb_down_button.add_value_listener(self.on_sendb_down_changed) self.pan_up_button.add_value_listener(self.on_pan_up_changed) self.pan_down_button.add_value_listener(self.on_pan_down_changed) self.volume_up_button.add_value_listener(self.on_volume_up_changed) self.volume_down_button.add_value_listener(self.on_volume_down_changed) # nav self.track_nav_encoder.add_value_listener(self.on_mixer_track_nav)