Example #1
0
    def __init__(self, c_instance):
        ControlSurface.__init__(self, c_instance)
        AbletonPlus.__init__(self, options)

        self._main_encoders = []
        self._main_buttons = []
        self._effects_encoders = []
        self._extra_buttons = []
        self._mixer = None

        for index in range(0, 24):
            encoder = EncoderElement(MIDI_CC_TYPE, 0, 81 + index,
                                     Live.MidiMap.MapMode.absolute)
            self._main_encoders.append(encoder)
        for index in range(0, 16):
            button = ButtonElement(False, MIDI_CC_TYPE, 0, 76 + index)
            self._main_buttons.append(button)

        self._mixer = MixerComponent(8)

        self._remap_track_mixer_controls()

        self._enable_abletonplus()

        return None
Example #2
0
 def __init__(self, *a, **k):
     (super(MPK261, 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):
        is_momentary = True
        num_tracks = 8
        num_returns = 7
        mixer = MixerComponent(num_tracks, num_returns)
        for track in range(num_tracks):
            strip = mixer.channel_strip(track)
            strip.set_volume_control(
                SliderElement(MIDI_CC_TYPE, 15, 54 - track))
            strip.set_pan_control(SliderElement(MIDI_CC_TYPE, 15, 80 - track))
            strip.set_mute_button(
                ButtonElement(is_momentary, MIDI_CC_TYPE, 15, 117 - track))
            strip.set_invert_mute_feedback(True)

        for track in range(num_returns):
            strip = mixer.return_strip(track)
            strip.set_volume_control(
                SliderElement(MIDI_CC_TYPE, 15, 10 + track))

        mixer.set_bank_buttons(
            ButtonElement(is_momentary, MIDI_CC_TYPE, 15, 108),
            ButtonElement(is_momentary, MIDI_CC_TYPE, 15, 109))
        mixer.set_crossfader_control(SliderElement(MIDI_CC_TYPE, 15, 9))
        mixer.master_strip().set_volume_control(
            SliderElement(MIDI_CC_TYPE, 15, 46))
        session = SessionComponent(0, 0)
        session.set_select_buttons(
            ButtonElement(is_momentary, MIDI_CC_TYPE, 15, 95),
            ButtonElement(is_momentary, MIDI_CC_TYPE, 15, 92))
        session.selected_scene().set_launch_button(
            ButtonElement(is_momentary, MIDI_CC_TYPE, 15, 91))
Example #4
0
    def __init__(self, c_instance):
        """Initalization function for the BCFR2000 object"""
        ControlSurface.__init__(self, c_instance)

        self._bcf = BCF2000()
        self._bcr = BCR2000()
        self._master_coords = (0, 0)

        self._ap = AbletonPlus(self, options['abletonplus'])
        self._setup_ap_options()

        #initalize the live objects needed
        self._mixer = MixerComponent(8, 3)
        self._fx_strip = None  #placeholder for the efx stuff
        self._enable_abletonplus()
        self._remap_track_mixer_controls()
Example #5
0
 def _setup_mixer(self):
     self._mixer = MixerComponent(NUM_CHANNEL_STRIPS)
     self._mixer.name = 'Mixer'
     self._mixer.set_enabled(False)
     for index in range(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, *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 _create_mixer(self):
     self._mixer = MixerComponent(is_enabled=True,
       num_tracks=(len(self._sliders)),
       invert_mute_feedback=True,
       name='Mixer')
     self._mixer.layer = Layer(volume_controls=(self._sliders))