本文整理汇总了Python中SpecialSessionComponent.SpecialSessionComponent.set_track_banking_increment方法的典型用法代码示例。如果您正苦于以下问题:Python SpecialSessionComponent.set_track_banking_increment方法的具体用法?Python SpecialSessionComponent.set_track_banking_increment怎么用?Python SpecialSessionComponent.set_track_banking_increment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpecialSessionComponent.SpecialSessionComponent
的用法示例。
在下文中一共展示了SpecialSessionComponent.set_track_banking_increment方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Axiom_AIR_25_49_61
# 需要导入模块: from SpecialSessionComponent import SpecialSessionComponent [as 别名]
# 或者: from SpecialSessionComponent.SpecialSessionComponent import set_track_banking_increment [as 别名]
#.........这里部分代码省略.........
self._name_display_data_source = DisplayDataSource()
self._name_display.segment(0).set_data_source(self._name_display_data_source)
self._value_display = NumericalDisplayElement(3, 1)
self._value_display.name = 'Value_Display'
self._value_display.set_message_parts(SYSEX_START + (20, 48), (0, 247))
self._value_display.set_clear_all_message(CLEAR_VALUE)
self._value_display_data_source = DisplayDataSource()
self._value_display.segment(0).set_data_source(self._value_display_data_source)
self._bank_display = NumericalDisplayElement(3, 1)
self._bank_display.name = 'Bank_Display'
self._bank_display.set_message_parts(SYSEX_START + (19,), (0, 247))
self._bank_display.set_clear_all_message(CLEAR_BANK)
self._bank_display_data_source = DisplayDataSource()
self._bank_display.segment(0).set_data_source(self._bank_display_data_source)
self._pad_display = NumericalDisplayElement(2, 1)
self._pad_display.name = 'Pad_Display'
self._pad_display.set_message_parts(SYSEX_START + (18,), (0, 247))
self._pad_display.set_clear_all_message(CLEAR_PAD)
self._pad_display_data_source = DisplayDataSource()
self._pad_display.segment(0).set_data_source(self._pad_display_data_source)
def _setup_mixer(self):
self._mixer_for_encoders = SpecialMixerComponent(self._name_display, self._value_display, 8)
self._mixer_for_encoders.name = 'Mixer_for_encoders'
self._mixer_for_faders = SpecialMixerComponent(self._name_display, self._value_display, 8)
self._mixer_for_faders.name = 'Mixer_for_faders'
def _setup_session(self):
self._session = SpecialSessionComponent(0, 0)
self._session.name = 'Session_Control'
self._session.selected_scene().name = 'Selected_Scene'
self._session.set_mixer(self._mixer_for_encoders)
self._session.set_alt_mixer(self._mixer_for_faders)
self._session.set_track_banking_increment(8)
self._session.add_offset_listener(self._update_bank_value)
def _setup_transport(self):
self._transport = TransportComponent()
self._transport.name = 'Transport'
self._transport.set_stop_button(self._stop_button)
self._transport.set_play_button(self._play_button)
self._transport.set_record_button(self._rec_button)
transport_view_modes = TransportViewModeSelector(self._transport, self._session, self._ffwd_button, self._rwd_button, self._loop_button)
transport_view_modes.name = 'Transport_View_Modes'
def _setup_device(self):
self._device_for_encoders = BestBankDeviceComponent()
self._device_for_encoders.name = 'Device_Component_for_encoders'
self._device_for_faders = BestBankDeviceComponent()
self._device_for_faders.name = 'Device_Component_for_faders'
self.set_device_component(self._device_for_encoders)
self.set_alt_device_component(self._device_for_faders)
self._device_nav = DeviceNavComponent()
self._device_nav.name = 'Device_Nav_Component'
def _setup_modes(self):
self._fader_button_modes = FaderButtonModeSelector(self._mixer_for_faders, tuple(self._fader_buttons))
self._fader_button_modes.name = 'Fader_Button_Modes'
self._fader_button_modes.set_mode_toggle(self._fader_group_mode_button)
self._fader_modes = FaderModeSelector(self._mixer_for_faders, self._device_for_faders, tuple(self._faders), self._fader_button_modes, self._master_fader_button)
self._fader_modes.name = 'Fader_Modes'
self._fader_modes.set_mode_buttons((self._fader_group_mix_button, self._fader_group_fx_button))
self._encoder_modes = EncoderModeSelector(self._mixer_for_encoders, self._device_for_encoders, tuple(self._encoders))
self._encoder_modes.name = 'Encoder_Modes'
self._encoder_modes.set_mode_buttons((self._encoder_group_mix_button, self._encoder_group_fx_button))
main_modes = MainModeSelector(self._device_for_encoders, self._device_for_faders, self._session, self._mixer_for_faders, self._device_nav, self._up_button, self._down_button, self._left_button, self._right_button, self._select_button)
示例2: Launchkey
# 需要导入模块: from SpecialSessionComponent import SpecialSessionComponent [as 别名]
# 或者: from SpecialSessionComponent.SpecialSessionComponent import set_track_banking_increment [as 别名]
#.........这里部分代码省略.........
self._master_slider = None
self._current_midi_map = None
self._transport_view_modes = None
self._send_midi(LED_FLASHING_OFF)
self._send_midi(LIVE_MODE_OFF)
def build_midi_map(self, midi_map_handle):
self._current_midi_map = midi_map_handle
ControlSurface.build_midi_map(self, midi_map_handle)
def _setup_mixer(self):
self._next_nav_button = make_button(103, "Next_Track_Button")
self._prev_nav_button = make_button(102, "Prev_Track_Button")
mute_solo_flip_button = make_button(59, "Master_Button")
self._mixer = SpecialMixerComponent(8)
self._mixer.name = "Mixer"
self._mixer.set_select_buttons(self._next_nav_button, self._prev_nav_button)
self._mixer.selected_strip().name = "Selected_Channel_Strip"
self._mixer.master_strip().name = "Master_Channel_Strip"
self._mixer.master_strip().set_volume_control(self._master_slider)
self._sliders = []
self._strip_buttons = []
for index in range(8):
strip = self._mixer.channel_strip(index)
strip.name = "Channel_Strip_" + str(index)
strip.set_invert_mute_feedback(True)
self._sliders.append(make_slider(41 + index, "Volume_Control_%d" % index))
strip.set_volume_control(self._sliders[-1])
self._strip_buttons.append(make_button(51 + index, "Mute_Button_%d" % index))
self._mixer.set_strip_mute_solo_buttons(tuple(self._strip_buttons), mute_solo_flip_button)
def _setup_session(self):
scene_launch_button = make_configurable_button(104, "Scene_Launch_Button")
scene_stop_button = make_configurable_button(120, "Scene_Stop_Button")
self._session = SpecialSessionComponent(8, 0)
self._session.name = "Session_Control"
self._session.selected_scene().name = "Selected_Scene"
self._session.selected_scene().set_launch_button(scene_launch_button)
self._session.selected_scene().set_triggered_value(GREEN_BLINK)
self._session.set_stop_all_clips_button(scene_stop_button)
scene_stop_button.set_on_off_values(AMBER_FULL, LED_OFF)
self._session.set_mixer(self._mixer)
self._session.set_track_banking_increment(8)
self._session.set_stop_track_clip_value(GREEN_BLINK)
clip_launch_buttons = []
clip_stop_buttons = []
for index in range(8):
clip_launch_buttons.append(make_configurable_button(96 + index, "Clip_Launch_%d" % index))
clip_stop_buttons.append(make_configurable_button(112 + index, "Clip_Stop_%d" % index))
clip_slot = self._session.selected_scene().clip_slot(index)
clip_slot.set_triggered_to_play_value(GREEN_BLINK)
clip_slot.set_triggered_to_record_value(RED_BLINK)
clip_slot.set_stopped_value(AMBER_FULL)
clip_slot.set_started_value(GREEN_FULL)
clip_slot.set_recording_value(RED_FULL)
clip_slot.set_launch_button(clip_launch_buttons[-1])
clip_slot.name = "Selected_Clip_Slot_" + str(index)
self._session.set_stop_track_clip_buttons(tuple(clip_stop_buttons))
def _setup_transport(self):
rwd_button = make_button(112, "Rwd_Button")
ffwd_button = make_button(113, "FFwd_Button")
stop_button = make_button(114, "Stop_Button")
play_button = make_button(115, "Play_Button")
loop_button = make_button(116, "Loop_Button")
rec_button = make_button(117, "Record_Button")
transport = TransportComponent()
transport.name = "Transport"
transport.set_stop_button(stop_button)
transport.set_play_button(play_button)
transport.set_record_button(rec_button)
transport.set_loop_button(loop_button)
self._transport_view_modes = TransportViewModeSelector(transport, self._session, ffwd_button, rwd_button)
self._transport_view_modes.name = "Transport_View_Modes"
def _setup_device(self):
encoders = [make_encoder(21 + index, "Device_Control_%d" % index) for index in xrange(8)]
self._encoders = tuple(encoders)
device = DeviceComponent()
device.name = "Device_Component"
self.set_device_component(device)
device.set_parameter_controls(self._encoders)
def _dummy_listener(self, value):
pass
def _on_selected_track_changed(self):
ControlSurface._on_selected_track_changed(self)
self._update_mixer_offset()
def _update_mixer_offset(self):
all_tracks = self._session.tracks_to_use()
selected_track = self.song().view.selected_track
num_strips = self._session.width()
if selected_track in all_tracks:
track_index = list(all_tracks).index(selected_track)
new_offset = track_index - track_index % num_strips
self._session.set_offsets(new_offset, self._session.scene_offset())
示例3: __init__
# 需要导入模块: from SpecialSessionComponent import SpecialSessionComponent [as 别名]
# 或者: from SpecialSessionComponent.SpecialSessionComponent import set_track_banking_increment [as 别名]
def __init__(self, c_instance):
ControlSurface.__init__(self, c_instance)
with self.component_guard():
self._c_instance = c_instance
self._suggested_input_port = 'Arturia_MINILAB'
self._suggested_output_port = 'Arturia_MINILAB'
PAD_TRANSLATIONS = (
(0, 3, DRUMPAD_NOTES[0], GLOBAL_CHANNEL),
(1, 3, DRUMPAD_NOTES[1], GLOBAL_CHANNEL),
(2, 3, DRUMPAD_NOTES[2], GLOBAL_CHANNEL),
(3, 3, DRUMPAD_NOTES[3], GLOBAL_CHANNEL),
(0, 2, DRUMPAD_NOTES[4], GLOBAL_CHANNEL),
(1, 2, DRUMPAD_NOTES[5], GLOBAL_CHANNEL),
(2, 2, DRUMPAD_NOTES[6], GLOBAL_CHANNEL),
(3, 2, DRUMPAD_NOTES[7], GLOBAL_CHANNEL),
(0, 1, DRUMPAD_NOTES[8], GLOBAL_CHANNEL),
(1, 1, DRUMPAD_NOTES[9], GLOBAL_CHANNEL),
(2, 1, DRUMPAD_NOTES[10], GLOBAL_CHANNEL),
(3, 1, DRUMPAD_NOTES[11], GLOBAL_CHANNEL),
(0, 0, DRUMPAD_NOTES[12], GLOBAL_CHANNEL),
(1, 0, DRUMPAD_NOTES[13], GLOBAL_CHANNEL),
(2, 0, DRUMPAD_NOTES[14], GLOBAL_CHANNEL),
(3, 0, DRUMPAD_NOTES[15], GLOBAL_CHANNEL)
)
self.set_pad_translations(PAD_TRANSLATIONS)
midi_mapmode = Live.MidiMap.MapMode.absolute
if ENCODER_MODE == 1:
midi_mapmode = Live.MidiMap.MapMode.absolute_14_bit
elif ENCODER_MODE == 2:
midi_mapmode = Live.MidiMap.MapMode.relative_binary_offset
elif ENCODER_MODE == 3:
midi_mapmode = Live.MidiMap.MapMode.relative_signed_bit
elif ENCODER_MODE == 4:
midi_mapmode = Live.MidiMap.MapMode.relative_signed_bit2
elif ENCODER_MODE == 5:
midi_mapmode = Live.MidiMap.MapMode.relative_smooth_binary_offset
elif ENCODER_MODE == 6:
midi_mapmode = Live.MidiMap.MapMode.relative_smooth_signed_bit
elif ENCODER_MODE == 7:
midi_mapmode = Live.MidiMap.MapMode.relative_smooth_signed_bit2
elif ENCODER_MODE == 8:
midi_mapmode = Live.MidiMap.MapMode.relative_smooth_two_compliment
elif ENCODER_MODE == 9:
midi_mapmode = Live.MidiMap.MapMode.relative_two_compliment
transport_buttons = tuple([ make_button(TRANSPORTS[index]) for index in range(len(TRANSPORTS)) ])
pads = tuple([ make_button(PADS[index]) for index in range(len(PADS)) ])
encoders = tuple([ make_encoder(ENCODERS[index], midi_mapmode) for index in range(len(ENCODERS)) ])
shift_button = make_button(SHIFT)
self.suppress_session_highlight = True
session = SpecialSessionComponent(NUM_TRACKS, NUM_SCENES)
self.set_highlighting_session_component(session)
self.suppress_session_highlight = False
session.set_track_banking_increment(1)
mixer = SpecialMixerComponent(NUM_TRACKS)
session.set_mixer(mixer)
transport = TransportComponent()
transport_view_modes = TransportViewModeSelector(transport, session, transport_buttons)
self._device_selection_follows_track_selection = True
device = BestBankDeviceComponent()
self.set_device_component(device)
device_nav = DeviceNavComponent()
control_modes = ControlModeSelector(self, mixer, session, device, device_nav)
shift_modes = ShiftSelector(self, transport, mixer, session, device, device_nav,
encoders, pads, transport_buttons, transport_view_modes, control_modes)
shift_modes.set_mode_toggle(shift_button)
transport_shift_modes = TransportShiftSelector(self, transport, transport_buttons,
transport_view_modes, shift_modes, shift_button)
transport_shift_modes.set_mode_toggle(transport_buttons[0])
self.transport = transport
self.transport_view_modes = transport_view_modes
self.mixer = mixer
self.session = session
self.device = device
self.device_nav = device_nav
self.control_modes = control_modes
self.shift_modes = shift_modes
self.encoders = encoders