Beispiel #1
0
    def __init__(self, gateway, settings, behaviour, scale="HARMONIC"):
        super(Composer, self).__init__(gateway,
                                       settings,
                                       behaviour)
        self.harm = {}
        self.speed_lim = behaviour['embellishment_speed_lim']
        self.selected_meters = ("meters" in list(self.behaviour.keys()) and
                                self.behaviour["meters"] or list(METERS.keys()))
        self.modified_note_in_current_frame = None
        self.generate_real_scale(settings['lowest_note_num'],
                                 settings['highest_note_num'])
        self.half_beat = self.behaviour['half_beat']
        self.second_beat_half = False

        # Rendezvous planning
        self.min_rendezvous_tickoffset = behaviour['min_rendezvous_tickoffset']
        self.max_rendezvous_tickoffset = behaviour['max_rendezvous_tickoffset']
        self.fixed_rendezvous_length = behaviour['fixed_rendezvous_length']
        self.min_rendezvous_length = behaviour['min_rendezvous_length']
        self.max_rendezvous_length = behaviour['max_rendezvous_length']
        self._setup_new_controller_wavetable()
        self.strategy_max_deviation_mapping = {
            'conservative': 1.0,
            'lax': 2.0,
            'outgoing': 3.0,
            'random': 1000
        }
        # Rendezvous handling
        self.num_rendezvous_between_caesurae = behaviour['num_rendezvous_between_caesurae']

        # setup state
        self.rendezvous_counter = 0
        self.ticks_counter = 0
        self.rendezvous_tick = False
        self.send_out_tick = -1
        self.select_next_harmony()
        self.select_next_anchor_tick(sendout_offset=1)
        self.prior_harmony = None

        self.set_binaural_diffs(self.behaviour['binaural_diff'])
        for voice in list(self.voices.values()):
            voice.slide = False
            args = [random() * 0.3 for n in range(4)]
            voice.pan_sine = MultiSine(args)

            if not settings['enable_adsr']:
                self.gateway.pd.send(["voice", voice.id, "adsr_enable", 0])
Beispiel #2
0
    def __init__(self,
                 gateway,
                 settings,
                 behaviour):

        super(Composer, self).__init__(gateway,
                                       settings,
                                       behaviour,
                                       scale=settings.get('start_scale', 'DIATONIC'))
        self.harm = {}
        self.speed_lim = behaviour['embellishment_speed_lim']
        self.selected_meters = ("meters" in list(self.behaviour.keys()) and
                                self.behaviour["meters"] or list(METERS.keys()))
        self.modified_note_in_current_frame = None
        self.max_binaural_diff = behaviour['max_binaural_diff']
        self.generate_real_scale(settings['lowest_note_num'],
                                 settings['highest_note_num'])
        if 'scales' in settings:
            self.offered_scales = [scale for scale in self.offered_scales
                                   if scale in settings['scales']]
Beispiel #3
0
 def __init__(self, gateway, settings, behaviour):
     super(Composer, self).__init__(gateway, settings, behaviour)
     self.harm = {}
     self.speed_lim = behaviour["embellishment_speed_lim"]
     self.selected_meters = "meters" in self.behaviour.keys() and self.behaviour["meters"] or METERS.keys()
     self.modified_note_in_current_frame = None
     self.max_binaural_diff = behaviour["max_binaural_diff"]
     self.generate_real_scale(settings["lowest_note_num"], settings["highest_note_num"])
Beispiel #4
0
    # 0.5 means that the average of all speeds will be
    # +/- in the middle of the given range
    # 0.25 means that the average of speeds will be at the first
    # quarter of the range (predominantly fast)
    "speed_target": 0.25,
    "speed_change": "leap",  # alt:"transition"
    'caesura_prob': 0.9,
    "shuffle_delay": 0.1,  # keep this between 0 and MAX_SHUFFLE
    'default_behaviour': "AUTONOMOUS",
    "max_shuffle": 0.1,
    "automate_scale": True,

    # METERS
    'automate_meters': True,
    'meter': (12, (1, 2, 2, 1, 2, 2, 2)),
    'meters': list(METERS.keys()),

    # WAVETABLES
    'automate_wavetables': True,
    'wavetable_specs': sum([[['random', ['all', 'even', 'odd']]] * 3,
                           [['random_harmonic', ['all', 'even', 'odd']]] * 5,
                           [['harmonic', ['all', 'even', 'odd']]] * 10],
                           []),
    'automate_num_partials': True,
    'default_num_partial': 13,
    'max_num_partials': 15,
    'common_wavetables': False,

    # TRANSPOSING
    'transpose': 12,
    'automate_transpose': True,
Beispiel #5
0
    # 0.5 means that the average of all speeds will be
    # +/- in the middle of the given range
    # 0.25 means that the average of speeds will be at the first
    # quarter of the range (predominantly fast)
    "speed_target": 0.25,
    "speed_change": "leap",  # alt:"transition"
    'caesura_prob': 0.9,
    "shuffle_delay": 0.1,  # keep this between 0 and MAX_SHUFFLE
    'default_behaviour': "AUTONOMOUS",
    "max_shuffle": 0.1,
    "automate_scale": True,

    # METERS
    'automate_meters': True,
    'meter': (12, (1, 2, 2, 1, 2, 2, 2)),
    'meters': METERS.keys(),

    # WAVETABLES
    'automate_wavetables': True,
    'wavetable_specs': sum([[['random', ['all', 'even', 'odd']]] * 3,
                           [['random_harmonic', ['all', 'even', 'odd']]] * 5,
                           [['harmonic', ['all', 'even', 'odd']]] * 10],
                           []),
    'automate_num_partials': True,
    'default_num_partial': 13,
    'max_num_partials': 15,
    'common_wavetables': False,

    # TRANSPOSING
    'transpose': 12,
    'automate_transpose': True,