Пример #1
0
 def _setup_mixer_control(self):
     is_momentary = True
     self._num_tracks = (8)  #A mixer is one-dimensional;
     self._mixer = MixerComponent(
         8, 2, True, False
     )  #These values represent the (Number_of_tracks, Number_of_returns, EQ_component, Filter_component)
     self._mixer.name = 'Mixer'  #We name everything that we might want to access in m4l
     self._mixer.set_track_offset(
         0)  #Sets start point for mixer strip (offset from left)
     for index in range(8):
         #self._mixer.channel_strip(index).set_volume_control(self._fader[index])		#Since we gave our mixer 4 tracks above, we'll now assign our fader controls to it
         self._mixer.channel_strip(
             index
         ).name = 'Mixer_ChannelStrip_' + str(
             index
         )  #We also name the individual channel_strip so we can access it
         self._mixer.track_eq(index).name = 'Mixer_EQ_' + str(
             index
         )  #We also name the individual EQ_component so we can access it
         self._mixer.channel_strip(
             index
         )._invert_mute_feedback = True  #This makes it so that when a track is muted, the corresponding button is turned off
     self.song().view.selected_track = self._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
     self._send_reset = ResetSendsComponent(
         self
     )  #This creates a custom MonoComponent that allows us to reset all the sends on a track to zero with a single button
     self._send_reset.name = 'Sends_Reset'  #We name it so that we can access it from m4l
Пример #2
0
 def _setup_alt_send_reset(self):
     self._alt_send_reset = ResetSendsComponent(self)
     self._alt_send_reset.name = 'Alt_Reset_Sends'