Ejemplo n.º 1
0
 def __init__(self, *a, **k):
     super(OperatorDeviceDecorator, self).__init__(*a, **k)
     self._osc_types_provider = NotifyingList(available_values=[u'A',
      u'B',
      u'C',
      u'D'], default_value=OscillatorType.a)
     self._env_feature_provider = NotifyingList(available_values=[u'Time', u'Level'], default_value=EnvelopeFeature.time)
     self._sloped_env_feature_provider = NotifyingList(available_values=[u'Time', u'Slope', u'Level'], default_value=SlopedEnvelopeFeature.time)
     self.__on_parameters_changed.subject = self._live_object
     self.oscillator = EnumWrappingParameter(name=u'Oscillator', parent=self, values_host=self._osc_types_provider, index_property_host=self._osc_types_provider, values_property=u'available_values', index_property=u'index', value_type=OscillatorType)
     self.env_feature = EnumWrappingParameter(name=u'Envelope Feature Time/Level', parent=self, values_host=self._env_feature_provider, index_property_host=self._env_feature_provider, values_property=u'available_values', index_property=u'index', value_type=EnvelopeFeature)
     self.sloped_env_feature = EnumWrappingParameter(name=u'Envelope Feature Time/Slope/Level', parent=self, values_host=self._sloped_env_feature_provider, index_property_host=self._sloped_env_feature_provider, values_property=u'available_values', index_property=u'index', value_type=SlopedEnvelopeFeature)
     self.__on_oscillator_switch_value_changed.subject = self.oscillator
     self.filter_slope_option = DeviceSwitchOption(name=u'Filter Slope', parameter=get_parameter_by_name(self, u'Filter Slope'))
     self.register_disconnectables(self.options)
Ejemplo n.º 2
0
 def __init__(self, *a, **k):
     super(DelayDeviceDecorator, self).__init__(*a, **k)
     self._channel_type_provider = NotifyingList(
         available_values=['L+R', 'Left', 'Right'],
         default_value=ChannelType.left_right)
     self._additional_parameters = self._create_parameters()
     self.register_disconnectables(self._additional_parameters)
Ejemplo n.º 3
0
 def __init__(self, *a, **k):
     super(EchoDeviceDecorator, self).__init__(*a, **k)
     self._channel_names_provider = NotifyingList(available_values=[
      'Left', 'Right'], default_value=EchoDeviceDecorator.EchoChannelName.left)
     self.channel_switch_parameter = EnumWrappingParameter(name='Channel Toggle', parent=self, values_host=self._channel_names_provider, index_property_host=self._channel_names_provider, values_property='available_values', index_property='index', value_type=EchoDeviceDecorator.EchoChannelName)
     self._additional_parameters = (
      self.channel_switch_parameter,)
     self.link_option = DeviceOnOffOption(name='Link', property_host=get_parameter_by_name(self, 'Link'))
     self.sync_l_option = DeviceOnOffOption(name='L Sync', property_host=get_parameter_by_name(self, 'L Sync'))
     self.sync_r_option = DeviceOnOffOption(name='R Sync', property_host=get_parameter_by_name(self, 'R Sync'))
     self.sync_m_option = DeviceOnOffOption(name='M Sync', property_host=get_parameter_by_name(self, 'L Sync'))
     self.sync_s_option = DeviceOnOffOption(name='S Sync', property_host=get_parameter_by_name(self, 'R Sync'))
     self.clip_dry_option = DeviceOnOffOption(name='Clip Dry', property_host=get_parameter_by_name(self, 'Clip Dry'))
     self.filter_on_option = DeviceOnOffOption(name='Filter', property_host=get_parameter_by_name(self, 'Filter On'))
     self.feedback_inv_option = DeviceOnOffOption(name='Invert', property_host=get_parameter_by_name(self, 'Feedback Inv'))
     self.modulation_times_four_option = DeviceOnOffOption(name='Mod 4x', property_host=get_parameter_by_name(self, 'Mod 4x'))
     self.reverb_loc_option = DeviceSwitchOption(name='Reverb Loc', parameter=get_parameter_by_name(self, 'Reverb Loc'))
     self.duck_option = DeviceOnOffOption(name='Duck', property_host=get_parameter_by_name(self, 'Duck On'))
     self.gate_option = DeviceOnOffOption(name='Gate', property_host=get_parameter_by_name(self, 'Gate On'))
     self.wobble_option = DeviceOnOffOption(name='Wobble', property_host=get_parameter_by_name(self, 'Wobble On'))
     self.noise_option = DeviceOnOffOption(name='Noise', property_host=get_parameter_by_name(self, 'Noise On'))
     self.channel_switch_lr_option = DeviceSwitchOption(name='L/R Switch', parameter=self.channel_switch_parameter, labels=[
      'Left', 'Right'])
     self.channel_switch_ms_option = DeviceSwitchOption(name='M/S Switch', parameter=self.channel_switch_parameter, labels=[
      'Mid', 'Side'])
     self.register_disconnectables(self._additional_parameters)
     self.register_disconnectables(self.options)
Ejemplo n.º 4
0
 def __init__(self, song=None, *a, **k):
     self._song = song
     self._envelope_types_provider = NotifyingList(available_values=[
      'Volume', 'Filter', 'Pitch'], default_value=EnvelopeType.volume_env)
     super(SimplerDeviceDecorator, self).__init__(*a, **k)
     self.setup_options()
     self.register_disconnectables(self.options)
     self.__on_parameters_changed.subject = self._live_object
     self.__on_signature_numerator_changed.subject = song
     self.__on_can_warp_as_changed.subject = self._live_object
     self.__on_can_warp_half_changed.subject = self._live_object
     self.__on_can_warp_double_changed.subject = self._live_object
     self.__on_start_marker_changed.subject = self._live_object.sample
     self.__on_end_marker_changed.subject = self._live_object.sample
     self.__on_selected_slice_changed.subject = self._live_object.view
     self.__on_envelope_type_changed.subject = self.envelope
 def __init__(self, *a, **k):
     super(HybridReverbDeviceDecorator, self).__init__(*a, **k)
     self.main_section_labels = [u'Convolution',
      u'Algo',
      u'Mix',
      u'EQ']
     self.routing_full_labels = [u'Serial',
      u'Parallel',
      u'Algorithm',
      u'Convolution']
     self.routing_option_labels = [u'Ser.',
      u'Par.',
      u'Alg.',
      u'Cv.']
     self.vintage_labels = [u'Off',
      u'Subtle',
      u'Old',
      u'Older',
      u'Extreme']
     self.band_names_labels = [u'1&4', u'2&3']
     self.pre_delay_sync_labels = [u'Ms', u'Sync']
     self.filter_types_labels = [u'Cut', u'Shelf']
     self.routing_live_parameter = get_parameter_by_name(self, u'Routing')
     self.vintage_live_parameter = get_parameter_by_name(self, u'Vintage')
     self.pre_delay_sync_live_parameter = get_parameter_by_name(self, u'P.Dly Sync')
     self.eq_low_type_live_parameter = get_parameter_by_name(self, u'EQ Low Type')
     self.eq_high_type_live_parameter = get_parameter_by_name(self, u'EQ High Type')
     self.eq_on_live_parameter = get_parameter_by_name(self, u'EQ On')
     self.freeze_live_parameter = get_parameter_by_name(self, u'Freeze')
     self.freeze_in_live_parameter = get_parameter_by_name(self, u'Freeze In')
     self.eq_prealgo_live_parameter = get_parameter_by_name(self, u'EQ Pre Algo')
     self.bass_mono_live_parameter = get_parameter_by_name(self, u'Bass Mono')
     self._band_names_provider = NotifyingList(available_values=self.band_names_labels, default_value=0)
     self.band = EnumWrappingParameter(name=u'Band', parent=self, values_host=self._band_names_provider, index_property_host=self._band_names_provider, values_property=u'available_values', index_property=u'index')
     self._main_section_provider = NotifyingList(available_values=self.main_section_labels, default_value=0)
     self.main_section = EnumWrappingParameter(name=u'Section', parent=self, values_host=self._main_section_provider, index_property_host=self._main_section_provider, values_property=u'available_values', index_property=u'index')
     self.routing_switch = DeviceSwitchOption(name=u'Routing Switch', parameter=self.routing_live_parameter, labels=self.routing_option_labels)
     self.feedback_ms_sync_switch = DeviceSwitchOption(name=u'Ms Sync Switch', parameter=self.pre_delay_sync_live_parameter, labels=self.pre_delay_sync_labels)
     self.eq_low_type_switch = DeviceSwitchOption(name=u'Low Type Switch', parameter=self.eq_low_type_live_parameter, labels=self.filter_types_labels)
     self.eq_high_type_switch = DeviceSwitchOption(name=u'High Type Switch', parameter=self.eq_high_type_live_parameter, labels=self.filter_types_labels)
     self.ir_post_processing_bool = BoolWrappingParameter(name=u'Ir Post Processing Bool', parent=self, property_host=self, source_property=u'ir_time_shaping_on')
     self.ir_post_processing_option = DeviceOnOffOption(name=u'Shape', property_host=self.ir_post_processing_bool)
     self.eq_on_option = DeviceOnOffOption(name=u'EQ', property_host=self.eq_on_live_parameter)
     self.freeze_option = DeviceOnOffOption(name=u'Freeze', property_host=self.freeze_live_parameter)
     self.freeze_in_option = DeviceOnOffOption(name=u'Freeze In', property_host=self.freeze_in_live_parameter)
     self.prealgo_option = DeviceOnOffOption(name=u'Pre Algo', property_host=self.eq_prealgo_live_parameter)
     self.bass_mono_option = DeviceOnOffOption(name=u'Bass Mono', property_host=self.bass_mono_live_parameter)
     self.ir_attack_time_parameter = WrappingParameter(name=u'Ir Attack Time', parent=self, property_host=self, source_property=u'ir_attack_time', display_value_conversion=to_ms_display, from_property_value=user_to_linear_exp(0.0, 3.0, 3.33), to_property_value=linear_to_user_exp(0.0, 3.0, 3.33))
     self.ir_decay_time_parameter = WrappingParameter(name=u'Ir Decay Time', parent=self, property_host=self, source_property=u'ir_decay_time', display_value_conversion=to_ms_display, from_property_value=user_to_linear_exp(0.02, 20.0, 3.33), to_property_value=linear_to_user_exp(0.02, 20.0, 3.33))
     self.ir_size_factor_parameter = WrappingParameter(name=u'Ir Size Factor', parent=self, property_host=self, source_property=u'ir_size_factor', display_value_conversion=to_percentage_display, from_property_value=user_to_linear_log(0.2, 5.0), to_property_value=linear_to_user_log(0.2, 5.0))
     self.ir_category_list_parameter = EnumWrappingParameter(name=u'IR Category', parent=self, values_host=self._live_object, index_property_host=self, values_property=u'ir_category_list', index_property=u'ir_category_index')
     self.ir_file_list_parameter = EnumWrappingParameter(name=u'IR', parent=self, values_host=self._live_object, index_property_host=self, values_property=u'ir_file_list', index_property=u'ir_file_index')
     self.vintage_enum_copy = NotifyingList(available_values=self.vintage_labels, default_value=0)
     self.vintage_parameter_copy = EnumWrappingParameter(name=u'Vintage Copy', parent=self, values_host=self.vintage_enum_copy, index_property_host=self.vintage_enum_copy, values_property=u'available_values', index_property=u'index')
     self.routing_parameter_enum = NotifyingList(available_values=self.routing_full_labels, default_value=0)
     self.routing_parameter_eq_off = EnumWrappingParameter(name=u'Routing Eq Off', parent=self, values_host=self.routing_parameter_enum, index_property_host=self.routing_parameter_enum, values_property=u'available_values', index_property=u'index')
     self.routing_parameter_eq_on_prealgo_off = EnumWrappingParameter(name=u'Routing Eq On PreAlgo Off', parent=self, values_host=self.routing_parameter_enum, index_property_host=self.routing_parameter_enum, values_property=u'available_values', index_property=u'index')
     self.routing_parameter_eq_on_prealgo_on = EnumWrappingParameter(name=u'Routing Eq On PreAlgo On', parent=self, values_host=self.routing_parameter_enum, index_property_host=self.routing_parameter_enum, values_property=u'available_values', index_property=u'index')
     self.on_routing_parameter_change.subject = self.routing_live_parameter
     self.on_routing_parameter_change()
     self.on_routing_parameter_eq_off_change.subject = self.routing_parameter_eq_off
     self.on_routing_parameter_eq_off_change()
     self.on_routing_parameter_eq_on_prealgo_on_change.subject = self.routing_parameter_eq_on_prealgo_on
     self.on_routing_parameter_eq_on_prealgo_on_change()
     self.on_routing_parameter_eq_on_prealgo_off_change.subject = self.routing_parameter_eq_on_prealgo_off
     self.on_routing_parameter_eq_on_prealgo_off_change()
     self.on_vintage_parameter_change.subject = self.vintage_live_parameter
     self.on_vintage_parameter_change()
     self.on_vintage_copy_parameter_change.subject = self.vintage_parameter_copy
     self.on_vintage_copy_parameter_change()
     self.on_shape_option_change.subject = self.ir_post_processing_bool
     self.on_shape_option_change()
     self._additional_parameters = (self.band,
      self.main_section,
      self.ir_post_processing_bool,
      self.ir_attack_time_parameter,
      self.ir_decay_time_parameter,
      self.ir_size_factor_parameter,
      self.ir_category_list_parameter,
      self.ir_file_list_parameter,
      self.vintage_parameter_copy,
      self.routing_parameter_eq_off,
      self.routing_parameter_eq_on_prealgo_on,
      self.routing_parameter_eq_on_prealgo_off)
     self.register_disconnectable(self._additional_parameters)