Esempio n. 1
0
	def _setup_session_recording_component(self):
		self._clip_creator = ClipCreator()
		self._clip_creator.name = 'ClipCreator'
		self._recorder = FixedLengthSessionRecordingComponent(clip_creator = self._clip_creator, view_controller = ViewControlComponent(), name = 'SessionRecorder') # is_enabled = False)
		self._recorder.main_layer = AddLayerMode(self._recorder, Layer(priority = 4, record_button = self._button[29]))
		#self._recorder.shift_layer = AddLayerMode(self._recorder, Layer(priority = 4, automation_button = self._button[29]))
		self._recorder.set_enabled(False)
Esempio n. 2
0
	def __init__(self, parent, control_surface, skin, grid_resolution, parent_task_group, settings = DEFAULT_INSTRUMENT_SETTINGS, *a, **k):
		super(MonoDrumpadComponent, self).__init__(*a, **k)
		self._settings = settings
		self._parent = parent
		self._control_surface = control_surface
		self._skin = skin
		self._grid_resolution = grid_resolution

		self._drum_offset_component = self.register_component(self._offset_settings_component_class(attribute_tag = 'drum_offset', name = 'DrumPadOffset', parent_task_group = parent_task_group, value_dict = range(28), default_value_index = self._settings['DefaultDrumOffset'], default_channel = 0, bank_increment = 4, on_color = 'MonoInstrument.OffsetOnValue', off_color = 'MonoInstrument.OffsetOffValue'))
		self._drum_offset_value.subject = self._drum_offset_component
		self.set_offset_shift_toggle = self._drum_offset_component.shift_toggle.set_control_element

		self._drumgroup = MonoDrumGroupComponent(translation_channel = 3, set_pad_translations = self._control_surface.set_pad_translations, channel_list = self._settings['Channels'], settings = self._settings)
		self._drumpad_position_value.subject = self._drumgroup
		self.set_drumpad_matrix = self._drumgroup.set_matrix
		self.set_drumpad_select_matrix = self._drumgroup.set_select_matrix

		drum_clip_creator = ClipCreator()
		drum_note_editor = MonoNoteEditorComponent(clip_creator=drum_clip_creator, grid_resolution=grid_resolution)
		self._step_sequencer = MonoStepSeqComponent(clip_creator=drum_clip_creator, skin=skin, grid_resolution=grid_resolution, name='Drum_Sequencer', note_editor_component=drum_note_editor, instrument_component=self._drumgroup)
		self._step_sequencer._playhead_component._notes=tuple(chain(*starmap(range, ((64, 68), (56, 60), (48, 52), (40, 44)))))
		self._step_sequencer._playhead_component._triplet_notes=tuple(chain(*starmap(range, ((64, 67), (56, 59), (48, 51), (40, 43)))))
		self._step_sequencer._playhead_component._feedback_channels = [15]
		self._step_sequencer._note_editor._visible_steps_model = lambda indices: filter(lambda k: k % 4 != 3, indices)
		self.set_sequencer_matrix = self._step_sequencer.set_button_matrix
		self.set_playhead = self._step_sequencer.set_playhead
		self.set_loop_selector_matrix = self._step_sequencer.set_loop_selector_matrix 
		self.set_quantization_buttons = self._step_sequencer.set_quantization_buttons
		self.set_follow_button = self._step_sequencer.set_follow_button
		self.set_follow_button = self._step_sequencer.set_follow_button
		self.set_mute_button = self._step_sequencer.set_mute_button
		self.set_solo_button = self._step_sequencer.set_solo_button
		self.register_component(self._step_sequencer)

		self.set_split_matrix = self._parent._selected_session.set_clip_launch_buttons
Esempio n. 3
0
File: DS1.py Progetto: aumhaa/m4m8
 def _setup_session_recording_component(self):
     self._clip_creator = ClipCreator()
     self._clip_creator.name = 'ClipCreator'
     self._recorder = SessionRecordingComponent(ViewControlComponent())
     self._recorder.set_enabled(True)
     self._recorder.layer = Layer(
         priority=4,
         automation_button=self._grid[1][2],
         record_button=self._grid[2][1],
     )
Esempio n. 4
0
    def _setup_session_recording_component(self):
        self._clip_creator = ClipCreator()
        self._clip_creator.name = 'ClipCreator'
        self._recorder = FixedLengthSessionRecordingComponent(
            length_values=LENGTH_VALUES,
            clip_creator=self._clip_creator,
            view_controller=self._viewcontrol)

        #self._recorder = FixedLengthSessionRecordingComponent(view_controller = self._viewcontrol)
        self._recorder.layer = Layer(priority=4,
                                     new_button=self._pedal[8],
                                     record_button=self._pedal[9])
        self._recorder.set_enabled(False)
Esempio n. 5
0
	def __init__(self, parent, control_surface, skin, grid_resolution, parent_task_group, settings = DEFAULT_INSTRUMENT_SETTINGS, *a, **k):
		super(MonoScaleComponent, self).__init__(*a, **k)
		debug('grid resolution is:', grid_resolution)
		self._settings = settings
		self._parent = parent
		self._control_surface = control_surface
		self._skin = skin
		self._grid_resolution = grid_resolution

		self._vertical_offset_component = self.register_component(self._offset_settings_component_class(name = 'VerticalOffset', attribute_tag = 'vert_offset', parent_task_group = parent_task_group, value_dict = range(24), default_value_index = self._settings['DefaultVertOffset'], default_channel = 0, on_color = 'MonoInstrument.VerticalOffsetOnValue', off_color = 'MonoInstrument.VerticalOffsetOffValue'))
		self._vertical_offset_value.subject = self._vertical_offset_component

		self._offset_component = self.register_component(self._offset_settings_component_class(name = 'NoteOffset', attribute_tag = 'drum_offset', parent_task_group = parent_task_group, value_dict = range(112), default_value_index = self._settings['DefaultOffset'], default_channel = 0, bank_increment = 12, on_color = 'MonoInstrument.OffsetOnValue', off_color = 'MonoInstrument.OffsetOffValue'))
		self._offset_value.subject = self._offset_component
		self.set_offset_shift_toggle = self._offset_component.shift_toggle.set_control_element

		self._keygroup = MonoKeyGroupComponent(settings = self._settings, channel_list = self._settings['Channels'])
		self.set_keypad_matrix = self._keygroup.set_matrix
		self.set_keypad_select_matrix = self._keygroup.set_select_matrix

		scale_clip_creator = ClipCreator()
		scale_note_editor = MonoNoteEditorComponent(clip_creator=scale_clip_creator, grid_resolution=grid_resolution)
		self._note_sequencer = MonoStepSeqComponent(clip_creator=scale_clip_creator, skin=skin, grid_resolution=self._grid_resolution, name='Note_Sequencer', note_editor_component=scale_note_editor, instrument_component=self._keygroup )
		#self._note_sequencer._playhead_component._follower = self._note_sequencer._loop_selector  ##########pull this if everything works, it was a test
		self._note_sequencer._playhead_component._notes=tuple(chain(*starmap(range, ((60, 68), (52, 60)))))
		self._note_sequencer._playhead_component._triplet_notes=tuple(chain(*starmap(range, ((60, 66), (52, 58)))))
		self._note_sequencer._playhead_component._feedback_channels = [15]
		self._note_sequencer._note_editor._visible_steps_model = lambda indices: filter(lambda k: k % 8 not in (6, 7), indices)
		self.set_playhead = self._note_sequencer.set_playhead
		self.set_loop_selector_matrix = self._note_sequencer.set_loop_selector_matrix 
		self.set_quantization_buttons = self._note_sequencer.set_quantization_buttons
		self.set_follow_button = self._note_sequencer.set_follow_button
		self.set_sequencer_matrix = self._note_sequencer.set_button_matrix
		self.register_component(self._note_sequencer)

		self.set_split_matrix = self._parent._selected_session.set_clip_launch_buttons