Ejemplo n.º 1
0
    def _init_arguments(self) -> dict:
        """define class specfic data here when inherting"""
        min_vol = 0.4
        max_vol = 1

        return {
            "volume_curve":
            infit.Cycle((
                interpolations.FallingRising(min_vol, max_vol),
                interpolations.FallingRising(min_vol, max_vol),
                interpolations.Falling(min_vol, max_vol),
                interpolations.RisingFalling(min_vol, max_vol),
                interpolations.Rising(min_vol, max_vol),
                interpolations.FallingRising(min_vol, max_vol),
            )),
            "osc_noise_volume":
            infit.Uniform(30, 64),
            "osc_mix":
            infit.Value(infit.Gaussian(70, 5)),
            "osc_tune_mod_depth2":
            infit.Value(infit.Gaussian(0, 1)),
            "vcf1_freq_mod_depth":
            infit.Uniform(0, 10),
            "vcf1_filter_fm":
            infit.Cycle((
                0,
                interpolations.Rising(0, 4),
                interpolations.FallingRising(-4, 4),
                interpolations.Falling(0, 4),
                0,
                interpolations.RisingFalling(0, 4),
                interpolations.Falling(-4, 0),
                interpolations.Rising(-4, 0),
            )),
        }
Ejemplo n.º 2
0
def mk_super_dreamy_pte(
    preset: str = __STANDARD_PRESET,
    fxp: str = __STANDARD_FXP,
    sustain_pedal: int = 1,
    *args,
    **kwargs,
) -> type:
    return mk_pianoteq_engine(
        preset=preset,
        fxp=fxp,
        parameter_non_dissonant_pitches={
            "impedance": infit.Uniform(2.5, 3),
            "cutoff": infit.Uniform(2.5, 3, seed=2),
            "q_factor": infit.Uniform(0.2, 0.4, seed=2),
            "direct_sound_duration": infit.Uniform(4, 5, seed=3),
            "string_length": infit.Uniform(8, 10),
            "sympathetic_resonance": infit.Uniform(2, 5),
            "hammer_noise": infit.Uniform(0.2, 1.0, seed=10),
            "sustain_pedal": sustain_pedal,
            "hammer_hard_piano": 0.3,
            "hammer_hard_mezzo": 0.55,
            "hammer_hard_forte": 0.785,
            "strike_point": infit.Uniform(1 / 64, 1 / 8),
            "pinch_harmonic_pedal": 0,
            "buff_stop_pedal": 0,
            "sound_speed": infit.Uniform(200, 500),
            "blooming_energy": infit.Uniform(1.55, 2),
            "blooming_inertia": infit.Uniform(1.55, 2.8),
        },
        parameter_dissonant_pitches={
            "impedance": infit.Uniform(2.2, 2.75),
            "cutoff": infit.Uniform(2, 2.5, seed=2),
            "q_factor": infit.Uniform(0.2, 1),
            "string_length": infit.Uniform(4, 7),
            "direct_sound_duration": infit.Uniform(2, 4, seed=3),
            "hammer_hard_piano": 0.3,
            "hammer_hard_mezzo": 0.4,
            "hammer_hard_forte": 0.6,
            "sustain_pedal": sustain_pedal,
            "sound_speed": infit.Uniform(200, 500),
            "sympathetic_resonance": infit.Uniform(1, 2),
            "pinch_harmonic_pedal": infit.Cycle((1, 0, 1)),
            "buff_stop_pedal": infit.Cycle((0, 1, 0, 1, 0)),
            "strike_point": infit.Uniform(1 / 64, 1 / 32),
            "hammer_noise": infit.Uniform(0.65, 1.25, seed=1000),
            "blooming_energy": 0,
        },
        *args,
        **kwargs,
    )
Ejemplo n.º 3
0
    def __init__(
        self,
        # the higher the number the higher the chance there will be a glissando if
        # possible
        activity_lv: int = 8,
        # 0 for glissando at the beginning, 1 for glissando at the end, 2 for glissando at
        # the beginning and at the end
        glissando_type_generator: infit.InfIt = infit.Cycle(
            (0, 1, 2, 0, 1, 0, 1, 2, 1, 0, 2, 0, 1)),
        # glissando duration in seconds
        minima_glissando_duration: float = 0.125,
        maxima_glissando_duration: float = 0.25,
        # glissando size in cents
        minima_glissando_size: float = 30,
        maxima_glissando_size: float = 120,
        seed: int = 10,
    ):
        self.__glissando_type_generator = glissando_type_generator
        self.__al = infit.ActivityLevel(activity_lv)
        self.__minima_gissando_duration = minima_glissando_duration
        self.__maxima_glissando_duration = maxima_glissando_duration
        self.__minima_gissando_size = minima_glissando_size
        self.__maxima_glissando_size = maxima_glissando_size

        import random

        random.seed(seed)
        self.__random_module = random
Ejemplo n.º 4
0
    def __init__(
        self,
        strings: tuple,
        midi_synth: midi.MidiSynth,
        spat_maker: spat.BalancedSpatMaker,
        n_voices: int = 4,
    ):
        super().__init__()
        self._mixer = pyo.Mixer(outs=4, chnls=1, time=0.025)

        self._markov_chains = self._make_markov_chains()

        self._midi_synth = midi_synth
        self.strings = strings
        self._generators = [GenderGenerator() for _ in range(n_voices)]
        self._generator_idx_cycle = infit.Cycle(range(n_voices))
        self._spatialised_generators = [
            spat_maker.make_spatialised_signal(gen, n_voices=4)
            for gen in self._generators
        ]
        self._summed_generators = sum(self._spatialised_generators)
        self._previous_played_pitches = collections.deque([], maxlen=15)

        self._trig_func = pyo.TrigFunc(
            tuple(self.strings.values())[0].attack_detector, self.trigger_events
        )
        self._trig_func.stop()

        self._add_summed_generators_to_mixer()
Ejemplo n.º 5
0
class TransducerSynth(PolySynth):
    # repeating sine wave
    _available_types_infit = infit.Cycle((0, ))

    _midi_note2frequency = {
        mn: freq_and_instrument[0]
        for mn, freq_and_instrument in
        MIDI_NOTE2FREQ_AND_INSTRUMENT_MAPPING.items()
    }
    _midi_note2channel = {
        mn:
        settings.SINE_MIXER_INSTRUMENT2CHANNEL_MAPPING[freq_and_instrument[1]]
        for mn, freq_and_instrument in
        MIDI_NOTE2FREQ_AND_INSTRUMENT_MAPPING.items()
    }

    _nchnls_per_generator = 3
    _generator_class = TransducerSynthGenerator

    def out(self, midi_note: int, velocity: float) -> None:
        nth_voice = next(self._voice_cycle)
        self.generators[nth_voice].out(
            midi_note,
            velocity,
            next(self._available_types_infit),
            self._midi_note2frequency[midi_note],
            self._midi_note2channel[midi_note],
        )
Ejemplo n.º 6
0
    def _play(
        self,
        tempo: float = 40,
        rhythm_cycle: infit.InfIt = infit.Cycle((0,)),
        n_attackes_per_trigger_maker: infit.InfIt = infit.Cycle((1,)),
        allowed_register: tuple = (-1, 0, 1),
        allowed_soundgenerator: tuple = ("gender",),
        fadeout_maker: infit.InfIt = infit.Cycle((1,)),
        amp_maker: infit.InfIt = infit.Uniform(0.5, 1),
        find_pitches_within_the_last_n_seconds: float = 3,
        instruments_to_analyse: tuple = ("violin", "viola", "cello"),
        # onset detector arguments
        deltime: float = 0.005,
        cutoff: float = 70,
        maxthresh: float = 3,
        minthresh: float = -20,
        reltime: float = 0.15,
    ):
        self._stop()

        # override previous attributes
        self.rhythm_cycle = rhythm_cycle
        self.n_attackes_per_trigger_maker = n_attackes_per_trigger_maker
        self.allowed_register = allowed_register
        self.allowed_soundgenerator = allowed_soundgenerator
        self.fadeout_maker = fadeout_maker
        self.amp_maker = amp_maker
        self.find_pitches_within_the_last_n_seconds = (
            find_pitches_within_the_last_n_seconds
        )

        # configure & collect onset detector
        trigger_signals = []
        for string_name, string_object in self.strings.items():
            if string_name in instruments_to_analyse:
                string_object.attack_detector.deltime = deltime
                string_object.attack_detector.cutoff = cutoff
                string_object.attack_detector.maxthresh = maxthresh
                string_object.attack_detector.minthresh = minthresh
                string_object.attack_detector.play()
                trigger_signals.append(string_object.attack_detector)

        # start function for triggering new samples
        self._trig_func.input = trigger_signals
        self._trig_func.play()
Ejemplo n.º 7
0
 def _init_arguments(self) -> dict:
     """define class specfic data here when inherting"""
     return {
         "volume_curve":
         infit.Cycle((
             interpolations.Rising(),
             interpolations.FallingRising(),
             interpolations.Falling(),
             interpolations.RisingFalling(),
         )),
         "osc_noise_volume":
         infit.Uniform(0, 25),
         "osc_mix":
         infit.Value(infit.Gaussian(50, 25)),
         "osc_tune_mod_depth2":
         infit.Cycle((
             interpolations.Rising(0, 2),
             interpolations.Falling(-2, 2),
             infit.Gaussian(0, 1.5),
             interpolations.RisingFalling(-2, 2),
             interpolations.Falling(0, 2),
             0,
             interpolations.Rising(0, 1),
             infit.Uniform(-1, 1),
             interpolations.RisingFalling(-1, 1.5),
             interpolations.Falling(-2, -1),
             interpolations.Rising(-1, 0),
             0,
             infit.Gaussian(0, 2),
         )),
         "vcf1_freq_mod_depth":
         infit.Uniform(0, 30),
         "vcf1_filter_fm":
         infit.Cycle((
             0,
             interpolations.Rising(0, 10),
             interpolations.FallingRising(-10, 10),
             interpolations.Falling(0, 10),
             0,
             interpolations.RisingFalling(0, 10),
             interpolations.Falling(-10, 0),
             interpolations.Rising(-10, 0),
         )),
     }
Ejemplo n.º 8
0
def mk_super_soft_leading_pte(
    preset: str = __STANDARD_PRESET,
    fxp: str = __STANDARD_FXP,
    sustain_pedal: int = 1,
    *args,
    **kwargs,
) -> type:
    # stronger attack for leading melody
    return mk_pianoteq_engine(
        preset=preset,
        fxp=fxp,
        parameter_non_dissonant_pitches={
            "impedance": infit.Uniform(1.9, 2.3),
            "cutoff": infit.Uniform(2.3, 2.6, seed=2),
            "q_factor": infit.Uniform(0.3, 0.6, seed=2),
            "direct_sound_duration": infit.Uniform(4, 5, seed=3),
            "string_length": infit.Uniform(8, 10),
            "sympathetic_resonance": infit.Uniform(2, 5),
            "hammer_noise": infit.Uniform(1.2, 2, seed=10),
            "sustain_pedal": sustain_pedal,
            "hammer_hard_piano": infit.Uniform(0.14, 0.2),
            "hammer_hard_mezzo": infit.Uniform(0.24, 0.3),
            "hammer_hard_forte": infit.Uniform(0.34, 0.43),
            "strike_point": infit.Uniform(1 / 64, 1 / 8),
            "pinch_harmonic_pedal": 1,
            "buff_stop_pedal": infit.Cycle((0, 1, 1, 0, 1)),
            "sound_speed": infit.Uniform(200, 500),
            "blooming_energy": infit.Uniform(1.55, 2),
            "blooming_inertia": infit.Uniform(1.55, 2.8),
            "celeste_pedal": 1,
            "soft_pedal": 1,
        },
        parameter_dissonant_pitches={
            "impedance": infit.Uniform(1.9, 2.3),
            "cutoff": infit.Uniform(2.3, 2.6, seed=2),
            "q_factor": infit.Uniform(0.3, 0.6, seed=2),
            "direct_sound_duration": infit.Uniform(4, 5, seed=3),
            "string_length": infit.Uniform(8, 10),
            "sympathetic_resonance": infit.Uniform(2, 5),
            "hammer_noise": infit.Uniform(0.2, 0.5, seed=10),
            "sustain_pedal": sustain_pedal,
            "hammer_hard_piano": infit.Uniform(0.08, 0.12),
            "hammer_hard_mezzo": infit.Uniform(0.12, 0.23),
            "hammer_hard_forte": infit.Uniform(0.24, 0.33),
            "strike_point": infit.Uniform(1 / 64, 1 / 8),
            "pinch_harmonic_pedal": 1,
            "buff_stop_pedal": 1,
            "sound_speed": infit.Uniform(200, 500),
            "celeste_pedal": 1,
            "soft_pedal": 1,
        },
        *args,
        **kwargs,
    )
Ejemplo n.º 9
0
    def _make_messages(self, sequence: tuple) -> tuple:
        messages = []

        channel_cycle = infit.Cycle(self.available_channel)
        for tone in sequence:
            if tone.pitch.is_empty:
                messages.append(self._make_empty_msg(tone))
            else:
                messages.extend(
                    self._make_messages_for_one_tone(tone,
                                                     next(channel_cycle)))

        return tuple(messages)
Ejemplo n.º 10
0
class GenderGenerator(pyo.TableRead, metaclass=midi._GongSamplerMetaClass):
    _path = "samples/gender/adapted"
    pitch_per_idx = tuple(ji.JIMel.load_json("{}/idx2pitch.json".format(_path)))
    _start_at_cycle = infit.Cycle(range(3))
    _is_inverse_cycle = infit.Cycle((False, True))

    def __init__(self):
        self.fader = pyo.Fader(fadein=0.001, fadeout=0.1)
        super().__init__(self.snd_tables[0][0], mul=self.fader)

        self._left_right_cycle_per_sample = [
            infit.ActivityLevel(
                5,
                start_at=next(self._start_at_cycle),
                is_inverse=next(self._is_inverse_cycle),
            )
            for _ in self.snd_tables
        ]

    def get_nth_snd_table(self, idx: int):
        return self.snd_tables[idx][next(self._left_right_cycle_per_sample[idx])]

    def play(self, pitch: ji.JIPitch, fadeout_time: float, *args, **kwargs):
        new_table = self.get_nth_snd_table(self.pitch_per_idx.index(pitch))

        duration = new_table.getDur()
        fader_duration = duration * fadeout_time
        fadeout_time = 0.1
        if fadeout_time > fader_duration:
            fadeout_time = fader_duration * 0.9
        self.fader.setDur(fader_duration)
        self.fader.setFadeout(fadeout_time)
        self.fader.play()

        self.setTable(new_table)
        self.setFreq(new_table.getRate())
        return super().play(*args, **kwargs)
Ejemplo n.º 11
0
class GongSynth(PolySynth):
    # alternating between Javanese and Thai Gong samples
    _available_types_infit = infit.Cycle((0, 1))
    _generator_class = GongSynthGenerator
    _nchnls_per_generator = 4

    def __init__(self, n_voices: int) -> None:
        super().__init__(n_voices)
        self.spatialisation_cycle = self._make_spatialisation_cycle()

    @staticmethod
    def _make_spatialisation_cycle() -> itertools.cycle:
        def convert_vector2volume_per_channel(vector: tuple) -> tuple:
            n_items = sum(vector)
            return tuple(item / n_items for item in vector)

        graycode = tools.graycode(4, 2)
        combinations_for_left_and_right_channel = tuple(
            zip(graycode, graycode[6:]))
        spat_cycle = []
        for spat_left, spat_right in combinations_for_left_and_right_channel * 2:
            # ignore vector (0, 0, 0, 0)
            if any(spat_left) and any(spat_right):
                spat_cycle.append(
                    tuple(
                        convert_vector2volume_per_channel(vec)
                        for vec in (spat_left, spat_right)))

        return itertools.cycle(spat_cycle)

    def out(self, midi_note: int, velocity: float) -> None:
        voice_idx = next(self._voice_cycle)
        self.generators[voice_idx].out(
            midi_note,
            velocity,
            next(self._available_types_infit),
            next(self.spatialisation_cycle),
        )
Ejemplo n.º 12
0
def mk_soft_leading_overdrive_harp_pte(
    preset: str = __STANDARD_PRESET,
    fxp: str = __STANDARD_FXP,
    sustain_pedal: int = 1,
    *args,
    **kwargs,
) -> type:
    # stronger attack for leading melody
    return mk_pianoteq_engine(
        preset=preset,
        fxp=fxp,
        parameter_non_dissonant_pitches={
            "impedance": infit.Uniform(1.2, 1.9),
            "cutoff": infit.Uniform(1.8, 2.2, seed=2),
            "q_factor": infit.Uniform(0.65, 1.1, seed=2),
            "direct_sound_duration": infit.Uniform(2, 4, seed=3),
            "string_length": infit.Uniform(8, 10),
            "sympathetic_resonance": infit.Uniform(1.5, 3.5),
            "hammer_noise": infit.Uniform(1.2, 2.2, seed=10),
            "sustain_pedal": sustain_pedal,
            "hammer_hard_piano": infit.Uniform(1.24, 1.3),
            "hammer_hard_mezzo": infit.Uniform(1.44, 1.6),
            "hammer_hard_forte": infit.Uniform(1.6, 1.78),
            "strike_point": infit.Uniform(1 / 64, 1 / 8),
            "pinch_harmonic_pedal": 0,
            "buff_stop_pedal": infit.Cycle((0, 0, 0, 0, 1, 0, 0, 1)),
            "sound_speed": infit.Uniform(200, 500),
            "blooming_energy": infit.Uniform(0.2, 1),
            "blooming_inertia": infit.Uniform(0.15, 0.5),
            "celeste_pedal": 1,
            "soft_pedal": 1,
            "effect1_switch": 1,
            "effect1_param1": infit.Uniform(0.7, 0.9),
            "effect1_param2": infit.Uniform(0.4, 0.7),
        },
        parameter_dissonant_pitches={
            "impedance": infit.Uniform(1.5, 2.1),
            "cutoff": infit.Uniform(2, 2.4, seed=2),
            "q_factor": infit.Uniform(0.6, 0.9, seed=2),
            "direct_sound_duration": infit.Uniform(2, 4, seed=3),
            "string_length": infit.Uniform(8, 10),
            "sympathetic_resonance": infit.Uniform(1.5, 3.5),
            "hammer_noise": infit.Uniform(1.2, 2.2, seed=10),
            "sustain_pedal": sustain_pedal,
            "hammer_hard_piano": infit.Uniform(1.14, 1.2),
            "hammer_hard_mezzo": infit.Uniform(1.34, 1.4),
            "hammer_hard_forte": infit.Uniform(1.5, 1.68),
            "strike_point": infit.Uniform(1 / 64, 1 / 8),
            "pinch_harmonic_pedal": 1,
            "buff_stop_pedal": infit.Cycle((1, 1, 1, 0, 1)),
            "sound_speed": infit.Uniform(200, 500),
            "blooming_energy": infit.Uniform(1.55, 2),
            "blooming_inertia": infit.Uniform(1.55, 2.8),
            "celeste_pedal": 1,
            "soft_pedal": 1,
            "effect1_switch": 1,
            "effect1_param1": infit.Uniform(0.7, 1),
            "effect1_param2": infit.Uniform(0, 0.2),
        },
        *args,
        **kwargs,
    )
Ejemplo n.º 13
0
 ),
 percussion_engine_per_voice=(
     percussion.Rhythmizer(
         sample_maker=infit.Cycle(
             (
                 percussion.Sample(
                     path=infit.Cycle(globals.SAM_KENDANG_LOW_LOW_CLOSE_HAND),
                     frequency=globals.SAM_KENDANG_LOW_LOW_CLOSE_HAND.information[
                         "frequency"
                     ],
                     pitch_factor=infit.Cycle((0.5, 1, 0.25, 1)),
                 ),
                 percussion.Sample(
                     path=infit.Cycle(globals.SAM_KENDANG_HIGH_LOW_CLOSE_HAND),
                     frequency=globals.SAM_KENDANG_HIGH_LOW_CLOSE_HAND.information[
                         "frequency"
                     ],
                     pitch_factor=infit.Cycle((0.5, 1, 0.25, 1)),
                 ),
                 percussion.Sample(
                     path=infit.Cycle(globals.SAM_KENDANG_HIGH_LOW_FAR_HAND),
                     frequency=globals.SAM_KENDANG_HIGH_LOW_FAR_HAND.information[
                         "frequency"
                     ],
                     pitch_factor=infit.Cycle((0.5, 1, 0.25, 1)),
                 ),
             )
         ),
         # likelihood_range=(0.5, 1),
         likelihood_range=(1, 0.2),
         volume_range=(0.5, 1),
Ejemplo n.º 14
0
def make(name: str = "ONE", gender=True, group=0, sub_group0=0):
    return (
        segments.FreeStyleCP(
            "{}_3".format(name),
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(1, 1), ji.r(3, 1), ji.r(5, 4)),
            energy_per_voice=(6, 6, 7),
            weight_range=(3, 10),
            silence_decider_per_voice=(
                infit.ActivityLevel(2),
                infit.ActivityLevel(1),
                infit.ActivityLevel(1),
            ),
            group=(group, sub_group0, 0),
            start_harmony=harmony.find_harmony("A", True, 0, tuple([]), gender=gender),
            gender=gender,
            n_bars=1,
            duration_per_bar=12 * 3,
            start=0,
            metrical_numbers=(12, 12, 12),
            dynamic_range_of_voices=(0.1, 0.65),
            anticipation_time=1,
            overlaying_time=1.55,
            cp_add_dissonant_pitches_to_nth_voice=(True, True, True),
            cp_constraints_interpolation=[],
            glitter_include_dissonant_pitches=False,
            pteq_engine_per_voice=(
                pteq.mk_dreamy_pte(
                    fxp='"pbIII/fxp/VibraphoneV-BHumanizednostretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0.1),
                ),
                pteq.mk_dreamy_pte(
                    fxp='"pbIII/fxp/VibraphoneV-BHumanizednostretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0.1),
                ),
                pteq.mk_dreamy_pte(
                    fxp='"pbIII/fxp/VibraphoneV-BHumanizednostretching.fxp"',
                    preset=None,
                ),
            ),
            percussion_engine_per_voice=(
                percussion.Rhythmizer(
                    voice_meters2occupy=(0,),
                    likelihood_range=(0.1, 0.6),
                    volume_range=(0.1, 0.8),
                    ignore_beats_occupied_by_voice=True,
                    seed=100,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(2,),
                    sample_maker=infit.Cycle(
                        (
                            percussion.Sample(
                                path=infit.Cycle(globals.SAM_SPEECH_TIME),
                                pitch_factor=infit.Uniform(0.9, 1.1),
                            ),
                        )
                    ),
                    likelihood_range=(1, 0.2),
                    volume_range=(0.1, 0.3),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(2,),
                    sample_maker=infit.Cycle(
                        (
                            percussion.Sample(
                                path=infit.Cycle(globals.SAM_SPEECH_SPACE),
                                pitch_factor=infit.Uniform(0.9, 1.1),
                            ),
                        )
                    ),
                    likelihood_range=(1, 0.2),
                    volume_range=(0.1, 0.3),
                    ignore_beats_occupied_by_voice=False,
                ),
            ),
            include_glitter=True,
            include_diva=False,
            include_natural_radio=True,
            include_percussion=True,
            radio_silent_channels=(1, 5),
            radio_samples=(
                "pbIII/samples/radio/carolina/3.wav",
                "pbIII/samples/radio/carolina/1.wav",
            ),
            radio_n_changes=2,
            radio_average_volume=0.385,
            radio_shadow_time=0.2,
            radio_min_volume=0.925,
            speech_init_attributes={},
        ),
    )
Ejemplo n.º 15
0
def main() -> versemaker.Verse:
    vm = versemaker.VerseMaker(
        59,
        1,
        tempo_factor=0.32,
        octave_of_first_pitch=-1,
        harmonic_tolerance=0.8,
        ro_temperature=0.712,
        ro_density=0.68,
        harmonic_pitches_tonality_flux_maximum_octave_difference_from_melody_pitch=(
            1,
            0,
        ),
        harmonic_pitches_complex_interval_helper_maximum_octave_difference_from_melody_pitch=(
            1,
            0,
        ),
        area_density_maker=infit.Gaussian(0.5, 0.05),
        area_density_reference_size=F(1, 2),
        area_min_split_size=F(3, 16),
    )

    vm.remove_area(0, 1)

    vm.attach(
        violin=strings.SimpleStringMaker(
            globals_.VIOLIN,
            pizz_maker=infit.ActivityLevel(5, start_at=0),
            tremolo_maker=infit.ActivityLevel(0),
            acciaccatura_maker=infit.ActivityLevel(6),
            force_acciaccatura_to_glissando_maker=infit.ActivityLevel(0),
            acciaccatura_glissando_size_maker=infit.Cycle((0, 1, 0, 0, 1)),
            harmonic_pitches_activity=0.6,
            harmonic_pitches_density=0.72,
            shall_add_optional_pitches=True,
            optional_pitches_maximum_octave_difference_from_melody_pitch=(1, 0),
            optional_pitches_min_size=F(3, 32),
            optional_pitches_avg_size=F(2, 16),
            optional_pitches_density=0.7,
            after_glissando_size=F(1, 8),
        ),
        viola=strings.SimpleStringMaker(
            globals_.VIOLA,
            tremolo_maker=infit.ActivityLevel(0),
            pizz_maker=infit.ActivityLevel(5, start_at=0),
            acciaccatura_maker=infit.ActivityLevel(6, start_at=2),
            force_acciaccatura_to_glissando_maker=infit.ActivityLevel(0),
            acciaccatura_glissando_size_maker=infit.Cycle((0, 1, 0, 1, 2, 0, 1)),
            harmonic_pitches_activity=0.65,
            harmonic_pitches_density=0.72,
            shall_add_optional_pitches=True,
            optional_pitches_maximum_octave_difference_from_melody_pitch=(1, 0),
            optional_pitches_min_size=F(3, 32),
            optional_pitches_avg_size=F(1, 8),
            optional_pitches_density=0.7,
        ),
        cello=strings.SimpleStringMaker(
            globals_.CELLO,
            tremolo_maker=infit.ActivityLevel(0),
            pizz_maker=infit.ActivityLevel(8),
            acciaccatura_maker=infit.ActivityLevel(8),
            force_acciaccatura_to_glissando_maker=infit.ActivityLevel(0),
            acciaccatura_glissando_size_maker=infit.Cycle((0, 1, 0, 1, 1)),
            shall_add_optional_pitches=True,
            harmonic_pitches_activity=0.69,
            harmonic_pitches_density=0.72,
            optional_pitches_min_size=F(1, 8),
            optional_pitches_avg_size=F(2, 16),
            optional_pitches_density=0.9,
        ),
        keyboard=keyboard.KeyboardMaker(
            lh_min_metricity_to_add_harmony=0.4,
            lh_min_metricity_to_add_accent=1.2,
            lh_max_metricity_for_arpeggio=0.35,
            lh_min_metricity_to_add_restricted_harmony=0,
            lh_prohibit_repetitions=False,
            lh_add_repetitions_avoiding_notes=False,
            rh_likelihood_making_harmony=1,
            harmonies_max_difference=1200,
            harmonies_min_difference=250,
            colotomic_structure=(0, 1, 1, 1),
        ),
    )

    _adapt_violin(vm.violin.musdat[1], vm)
    _adapt_viola(vm.viola.musdat[1], vm)
    _adapt_cello(vm.cello.musdat[1], vm)
    _adapt_keyboard(vm.keyboard.musdat[2], vm.keyboard.musdat[1], vm)

    vm.add_bar(5, abjad.TimeSignature((2, 4)))
    vm.add_bar(11, abjad.TimeSignature((2, 4)))
    vm.add_bar(13, abjad.TimeSignature((1, 4)))

    vm.force_remove_area(len(vm.violin.bars) - 1, len(vm.violin.bars))

    # second round of postprocessing
    _adapt_violin2(vm.violin.musdat[1], vm)
    _adapt_viola2(vm.viola.musdat[1], vm)
    _adapt_cello2(vm.cello.musdat[1], vm)
    _adapt_left2(vm.keyboard.musdat[2], vm)
    _adapt_right2(vm.keyboard.musdat[1], vm)

    for instr in ("violin", "viola", "cello", "keyboard"):
        if instr == "keyboard":
            nth_line = (2, 1)
        else:
            nth_line = (1,)

        novent_line = getattr(vm, instr).musdat[nth_line[0]]
        novent_line[0].dynamic = attachments.Dynamic("pp")

    for string in (vm.violin.musdat[1], vm.viola.musdat[1], vm.cello.musdat[1]):
        tw.detach_hauptstimme(string)

    verse = vm()

    for instr in ("violin", "viola", "cello", "keyboard"):
        if instr == "keyboard":
            indices = ((1, 0), (1, 1))
        else:
            indices = ((1,),)

        for idx in indices:
            staff = getattr(verse, instr).abjad
            for subidx in idx:
                staff = staff[subidx]

            # [bar_idx][event_idx]

            # adapting accidental notation of keyboard
            if instr == "keyboard" and idx[1] == 0:
                abjad.Accidental.respell_with_sharps(staff[1])
                abjad.Accidental.respell_with_sharps(staff[2])
                abjad.Accidental.respell_with_sharps(staff[3])
                # abjad.Accidental.respell_with_sharps(staff[4])

                abjad.Accidental.respell_with_sharps(staff[7])
                abjad.Accidental.respell_with_flats(staff[8])

                abjad.Accidental.respell_with_sharps(staff[15][2:])

                abjad.attach(abjad.Tie(), staff[19][1])
                abjad.attach(abjad.Tie(), staff[19][2])

            elif instr == "keyboard" and idx[1] == 1:
                # abjad.Accidental.respell_with_sharps(staff[11])
                abjad.Accidental.respell_with_sharps(staff[1])
                abjad.Accidental.respell_with_sharps(staff[2])
                abjad.Accidental.respell_with_sharps(staff[3])
                # abjad.Accidental.respell_with_sharps(staff[4])

                # abjad.attach(abjad.Ottava(-1), staff[9][0])
                # tw.put_gong_to_separate_vox(9, 0, staff)

            elif instr == "violin":
                abjad.detach(abjad.Markup, staff[2][2])
                abjad.attach(
                    tw.scpm("arco sul tasto"), staff[2][2],
                )
                abjad.attach(
                    tw.scpm("molto sul tasto"), staff[3][2],
                )
                abjad.attach(abjad.StartHairpin(">"), staff[3][2])
                abjad.attach(abjad.Dynamic("ppp"), staff[4][0])
                abjad.attach(abjad.Dynamic("pp"), staff[4][1])
                abjad.detach(abjad.Markup, staff[5][1])
                abjad.attach(
                    tw.scpm("arco ordinario"), staff[5][1],
                )

            elif instr == "viola":
                abjad.attach(
                    abjad.StartTextSpan(left_text=abjad.Markup("rit.")), staff[-1][0]
                )
                abjad.attach(abjad.StopTextSpan(), staff[-1][-1])
                abjad.attach(abjad.StartHairpin(">"), staff[-1][0])
                abjad.attach(abjad.Dynamic("ppp"), staff[-1][-1])

    return verse
Ejemplo n.º 16
0
def make(name: str = "ONE", gender=True, group=0, sub_group0=0):
    return (
        segments.FreeStyleCP(
            "{}_0".format(name),
            ambitus_maker=ambitus.SymmetricalRanges(
                ji.r(4, 1), ji.r(12, 5), ji.r(9, 4)
            ),
            group=(group, sub_group0, 0),
            start_harmony=harmony.find_harmony("A", True, 0, tuple([]), gender=gender),
            energy_per_voice=(5.7, 9, 9),
            weight_range=(0.35, 1),
            decision_type="random",
            gender=gender,
            n_bars=2,
            duration_per_bar=11,
            start=0,
            dynamic_range_of_voices=(0.2, 0.6),
            anticipation_time=2.75,
            overlaying_time=3.25,
            cp_add_dissonant_pitches_to_nth_voice=(False, False, False),
            cp_constraints_interpolation=[],
            glitter_include_dissonant_pitches=False,
            pteq_engine_per_voice=(
                pteq.mk_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Value(0),
                    modulator=(ornamentations.SoftLineGlissandoMaker(),),
                    # convert_dissonant_tones2glissandi=True,
                ),
                pteq.mk_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Value(0),
                    modulator=(ornamentations.SoftLineGlissandoMaker(),),
                    # convert_dissonant_tones2glissandi=True,
                ),
                pteq.mk_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Value(0),
                    modulator=(ornamentations.SoftLineGlissandoMaker(),),
                    # convert_dissonant_tones2glissandi=True,
                ),
            ),
            speech_init_attributes={},
            include_glitter=True,
            include_diva=False,
            include_natural_radio=True,
            include_percussion=False,
            radio_silent_channels=(1, 3, 5),
            radio_samples=(
                "pbIII/samples/radio/carolina/3.wav",
                "pbIII/samples/radio/carolina/1.wav",
            ),
            radio_n_changes=1,
            radio_average_volume=0.385,
            radio_shadow_time=0.2,
            radio_min_volume=0.925,
        ),
        segments.DensityBasedThreeVoiceCP(
            "{}_1".format(name),
            ambitus_maker=ambitus.SymmetricalRanges(
                ji.r(16, 5), ji.r(5, 2), ji.r(8, 5)
            ),
            group=(group, sub_group0, 1),
            start_harmony=harmony.find_harmony("A", True, 0, (0,), gender=gender),
            density_per_voice=(0, 0.6, 0.6),
            gender=gender,
            n_bars=1,
            duration_per_bar=10,
            start=1.25,
            dynamic_range_of_voices=(0.15, 0.45),
            anticipation_time=1.5,
            overlaying_time=1.5,
            cp_constraints_harmonic=(
                counterpoint.constraints.HR_forbid_too_empty_harmonies(1, [0]),
            ),
            cp_constraints_interpolation=[],
            # cp_add_dissonant_pitches_to_nth_voice=(False, False, False),
            cp_add_dissonant_pitches_to_nth_voice=(True, True, True),
            pteq_engine_per_voice=(
                pteq.mk_super_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Value(0),
                    modulator=(
                        ornamentations.SoftLineGlissandoMaker(
                            maxima_glissando_duration=0.35, maxima_glissando_size=180
                        ),
                    ),
                    convert_dissonant_tones2glissandi=True,
                ),
                pteq.mk_super_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Value(0),
                    modulator=(
                        ornamentations.SoftLineGlissandoMaker(
                            maxima_glissando_duration=0.35, maxima_glissando_size=180
                        ),
                    ),
                    convert_dissonant_tones2glissandi=True,
                ),
                pteq.mk_super_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Value(0),
                    modulator=(
                        ornamentations.SoftLineGlissandoMaker(
                            maxima_glissando_duration=0.35, maxima_glissando_size=180
                        ),
                    ),
                    convert_dissonant_tones2glissandi=True,
                ),
            ),
            speech_init_attributes={},
            include_glitter=True,
            include_diva=False,
            include_natural_radio=True,
            include_percussion=False,
            radio_silent_channels=(1, 3, 5),
            radio_samples=(
                "pbIII/samples/radio/carolina/3.wav",
                "pbIII/samples/radio/carolina/1.wav",
            ),
            radio_n_changes=0,
            radio_average_volume=0.2,
            radio_shadow_time=0.175,
            radio_min_volume=0.875,
            glitter_include_dissonant_pitches=False,
        ),
        segments.DensityBasedThreeVoiceCP(
            "{}_2".format(name),
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(6, 1), ji.r(5, 2), ji.r(9, 4)),
            group=(group, sub_group0, 2),
            start_harmony=harmony.find_harmony("A", True, 0, (0,), gender=gender),
            density_per_voice=(0.775, 1, 1),
            gender=gender,
            n_bars=3,
            duration_per_bar=7,
            start=4.5,
            dynamic_range_of_voices=(0.1, 0.2),
            anticipation_time=1.25,
            overlaying_time=1.25,
            cp_add_dissonant_pitches_to_nth_voice=(False, False, True),
            cp_constraints_harmonic=(
                counterpoint.constraints.HR_forbid_too_empty_harmonies(1, [0]),
            ),
            cp_constraints_interpolation=[],
            glitter_include_dissonant_pitches=False,
            pteq_engine_per_voice=(
                pteq.mk_dreamy_pte(
                    fxp='"pbIII/fxp/VibraphoneV-BHumanizednostretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
                pteq.mk_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Value(0),
                    modulator=(
                        ornamentations.SoftLineGlissandoMaker(
                            maxima_glissando_duration=0.35, maxima_glissando_size=180
                        ),
                    ),
                ),
                pteq.mk_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Value(0),
                    modulator=(
                        ornamentations.SoftLineGlissandoMaker(
                            maxima_glissando_duration=0.35, maxima_glissando_size=180
                        ),
                    ),
                ),
            ),
            speech_init_attributes={},
            include_glitter=True,
            include_diva=False,
            include_natural_radio=True,
            include_percussion=True,
            percussion_engine_per_voice=(
                percussion.Rhythmizer(
                    voice_meters2occupy=(0, 1, 2),
                    sample_maker=infit.Cycle(
                        (
                            percussion.Sample(
                                path=infit.Cycle(globals.SAM_CYMBALS_BIG_CLOSE),
                                pitch_factor=infit.Uniform(0.5, 2),
                                distortion=infit.Uniform(0.05, 0.3),
                            ),
                            percussion.Sample(
                                path=infit.Cycle(globals.SAM_CYMBALS_MIDDLE_CLOSE_LOUD),
                                pitch_factor=infit.Uniform(0.5, 2),
                                distortion=infit.Uniform(0.04, 0.5),
                            ),
                        )
                    ),
                    likelihood_range=(0.1, 0.7),
                    volume_range=(0.1, 0.8),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(1,),
                    sample_maker=infit.Cycle(
                        (
                            percussion.Sample(
                                path=infit.Cycle(globals.SAM_CYMBALS_BIG_CLOSE),
                                pitch_factor=infit.Uniform(0.5, 2),
                                resonance_filter_frequency=infit.Uniform(5000, 9000),
                                resonance_filter_bandwidth=infit.Uniform(200, 700),
                            ),
                            percussion.Sample(
                                path=infit.Cycle(globals.SAM_CYMBALS_MIDDLE_CLOSE_LOUD),
                                pitch_factor=infit.Uniform(0.5, 2),
                            ),
                        )
                    ),
                    likelihood_range=(0.1, 0.7),
                    volume_range=(0.1, 0.8),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(2,),
                    sample_maker=infit.Cycle(
                        (
                            percussion.Sample(
                                path=infit.Cycle(globals.SAM_CYMBALS_BIG_CLOSE),
                                pitch_factor=infit.Uniform(0.5, 2),
                                resonance_filter_frequency=infit.Uniform(1000, 3000),
                                resonance_filter_bandwidth=infit.Uniform(90, 200),
                            ),
                            percussion.Sample(
                                path=infit.Cycle(globals.SAM_CYMBALS_MIDDLE_CLOSE_LOUD),
                                pitch_factor=infit.Uniform(0.5, 2),
                                resonance_filter_frequency=infit.Uniform(1000, 3000),
                                resonance_filter_bandwidth=infit.Uniform(90, 200),
                            ),
                        )
                    ),
                    likelihood_range=(0.1, 0.7),
                    volume_range=(0.1, 0.8),
                    ignore_beats_occupied_by_voice=False,
                ),
            ),
            radio_silent_channels=(1, 3, 5),
            radio_samples=(
                "pbIII/samples/radio/carolina/3.wav",
                "pbIII/samples/radio/carolina/1.wav",
            ),
            radio_n_changes=1,
            radio_average_volume=0.285,
            radio_shadow_time=0.2,
            radio_min_volume=0.925,
        ),
    )
Ejemplo n.º 17
0
def make(name: str = "ONE", gender=False, group=0, sub_group0=1):
    return (
        segments.FreeStyleCP(
            "{}_chords0".format(name),
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(1, 1), ji.r(3, 1),
                                                    ji.r(5, 4)),
            energy_per_voice=(6, 7, 7),
            weight_range=(0, 6),
            silence_decider_per_voice=(
                infit.ActivityLevel(0),
                infit.ActivityLevel(0),
                infit.ActivityLevel(0),
            ),
            group=(group, sub_group0, 0),
            start_harmony=harmony.find_harmony("A",
                                               True,
                                               0,
                                               tuple([]),
                                               gender=gender),
            gender=gender,
            n_bars=1,
            duration_per_bar=22,
            start=4,
            metrical_numbers=(12, 12, 12),
            dynamic_range_of_voices=(0.6, 0.8),
            anticipation_time=0.2,
            overlaying_time=1.25,
            cp_add_dissonant_pitches_to_nth_voice=(True, True, False),
            pteq_engine_per_voice=(
                pteq.mk_super_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Value(0.1)),
                pteq.mk_super_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Value(0.1)),
                pteq.mk_super_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Value(0.1)),
            ),
            percussion_engine_per_voice=(
                percussion.Rhythmizer(
                    voice_meters2occupy=(0, ),
                    likelihood_range=(0.1, 0.6),
                    volume_range=(0.1, 0.8),
                    ignore_beats_occupied_by_voice=True,
                    seed=100,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(1, ),
                    # likelihood_range=(0.1, 0.8),
                    likelihood_range=(0, 0.1),
                    volume_range=(0.1, 1),
                    ignore_beats_occupied_by_voice=True,
                    seed=1000,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(2, ),
                    sample_maker=infit.Cycle((
                        percussion.Sample(
                            path=infit.Cycle(globals.SAM_SPEECH_SPACE),
                            pitch_factor=infit.Uniform(0.9, 1.2),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(globals.SAM_SPEECH_TIME),
                            pitch_factor=infit.Uniform(0.9, 1.2),
                        ),
                    )),
                    # likelihood_range=(1, 0.2),
                    likelihood_range=(0, 0.1),
                    volume_range=(0.1, 0.3),
                    ignore_beats_occupied_by_voice=True,
                ),
            ),
            include_glitter=False,
            include_diva=False,
            include_natural_radio=False,
            include_percussion=False,
            radio_silent_channels=(1, 5),
            radio_samples=(
                "pbIII/samples/radio/carolina/3.wav",
                "pbIII/samples/radio/carolina/1.wav",
            ),
            radio_n_changes=2,
            radio_average_volume=0.1,
            radio_shadow_time=0.2,
            radio_min_volume=0.825,
            # speech_init_attributes={
            #     "speech0": {
            #         "start": 5.85,
            #         "duration": 22.5,
            #         "sound_engine": speech.Sampler(
            #             "pbIII/samples/speech/ghost_dance/ghost_dance_quote0_noise_reduction0.wav",
            #             volume=0.58,
            #         ),
            #     },
            #     "speech2": {
            #         "start": 3,
            #         "duration": 37.5,
            #         "sound_engine": speech.Sampler(
            #             globals.SAM_SPEECH_IAN_CURTIS[2], volume=1
            #         ),
            #     },
            # },
        ),
        segments.FreeStyleCP(
            "{}_chords1".format(name),
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(1, 1), ji.r(3, 1),
                                                    ji.r(5, 4)),
            energy_per_voice=(3, 2, 2),
            weight_range=(0, 6),
            silence_decider_per_voice=(
                infit.ActivityLevel(0),
                infit.ActivityLevel(0),
                infit.ActivityLevel(0),
            ),
            group=(group, sub_group0, 1),
            start_harmony=harmony.find_harmony("A",
                                               True,
                                               0,
                                               tuple([]),
                                               gender=gender),
            gender=gender,
            n_bars=2,
            duration_per_bar=11,
            start=2,
            metrical_numbers=(6, 12, 18),
            dynamic_range_of_voices=(0.6, 0.8),
            anticipation_time=0.2,
            overlaying_time=1.25,
            cp_add_dissonant_pitches_to_nth_voice=(True, True, False),
            pteq_engine_per_voice=(
                pteq.mk_super_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Value(0.1)),
                pteq.mk_super_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Value(0.1)),
                pteq.mk_super_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Value(0.1)),
            ),
            percussion_engine_per_voice=(
                percussion.Rhythmizer(
                    voice_meters2occupy=(0, ),
                    sample_maker=infit.Cycle((
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_LOW_LOW_FAR_MALLET),
                            frequency=globals.SAM_KENDANG_LOW_LOW_FAR_MALLET.
                            information["frequency"],
                            pitch_factor=infit.Cycle((0.5, 1, 0.25, 1)),
                            distortion=infit.Uniform(0, 1),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_LOW_FAR_MALLET),
                            frequency=globals.SAM_KENDANG_HIGH_LOW_FAR_MALLET.
                            information["frequency"],
                            pitch_factor=infit.Cycle((0.5, 1, 0.25, 1)),
                            distortion=infit.Uniform(0, 1),
                        ),
                    )),
                    likelihood_range=(0.3, 1),
                    volume_range=(0.1, 0.8),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(1, ),
                    sample_maker=infit.Cycle((
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_LOW_LOW_FAR_MALLET),
                            frequency=globals.SAM_KENDANG_LOW_LOW_FAR_MALLET.
                            information["frequency"],
                            pitch_factor=infit.Cycle((0.5, 0.5, 1, 0.25, 1)),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_LOW_FAR_MALLET),
                            frequency=globals.SAM_KENDANG_HIGH_LOW_FAR_MALLET.
                            information["frequency"],
                            pitch_factor=infit.Cycle((0.5, 1, 0.25, 1)),
                            distortion=infit.Uniform(0, 1),
                        ),
                    )),
                    likelihood_range=(0.3, 1),
                    volume_range=(0.1, 0.8),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(2, ),
                    sample_maker=infit.Cycle((
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_LOW_LOW_FAR_MALLET),
                            frequency=globals.SAM_KENDANG_LOW_LOW_FAR_MALLET.
                            information["frequency"],
                            pitch_factor=infit.Cycle((0.5, 1, 0.25, 1)),
                            distortion=infit.Uniform(0, 1),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_LOW_FAR_MALLET),
                            frequency=globals.SAM_KENDANG_HIGH_LOW_FAR_MALLET.
                            information["frequency"],
                            pitch_factor=infit.Cycle((0.5, 1, 0.25, 1)),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_LOW_FAR_HAND),
                            frequency=globals.SAM_KENDANG_HIGH_LOW_FAR_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((1, 1, 0.5, 1)),
                        ),
                    )),
                    likelihood_range=(0.3, 1),
                    volume_range=(0.1, 0.8),
                    ignore_beats_occupied_by_voice=False,
                ),
            ),
            include_glitter=False,
            include_diva=False,
            include_natural_radio=False,
            include_percussion=True,
            radio_silent_channels=(1, 5),
            radio_samples=(
                "pbIII/samples/radio/carolina/3.wav",
                "pbIII/samples/radio/carolina/1.wav",
            ),
            radio_n_changes=2,
            radio_average_volume=0.1,
            radio_shadow_time=0.2,
            radio_min_volume=0.825,
            # speech_init_attributes={
            #     "speech0": {
            #         "start": 5.85,
            #         "duration": 22.5,
            #         "sound_engine": speech.Sampler(
            #             "pbIII/samples/speech/ghost_dance/ghost_dance_quote0_noise_reduction0.wav",
            #             volume=0.58,
            #         ),
            #     },
            #     "speech2": {
            #         "start": 3,
            #         "duration": 37.5,
            #         "sound_engine": speech.Sampler(
            #             globals.SAM_SPEECH_IAN_CURTIS[2], volume=1
            #         ),
            #     },
            # },
        ),
    )
Ejemplo n.º 18
0
def mk_super_soft_trippy_pte(
    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
    preset=None,
    sustain_pedal: int = 1,
    *args,
    **kwargs,
) -> type:
    # for glockenspiel
    return mk_pianoteq_engine(
        preset=preset,
        fxp=fxp,
        parameter_non_dissonant_pitches={
            "unison_width": infit.Uniform(0, 20),
            "impedance": infit.Uniform(0.65, 1.8, seed=2),
            "cutoff": infit.Uniform(0.65, 2, seed=2),
            "q_factor": infit.Uniform(0.7, 1.8, seed=2),
            "direct_sound_duration": infit.Uniform(4, 5, seed=3),
            "string_length": infit.Uniform(8, 10),
            "sympathetic_resonance": infit.Uniform(1, 5),
            "hammer_noise": infit.Uniform(0.2, 1.5, seed=10),
            "sustain_pedal": sustain_pedal,
            "hammer_hard_piano": 0.1,
            "hammer_hard_mezzo": 0.2,
            "hammer_hard_forte": 0.3,
            "strike_point": infit.Uniform(1 / 64, 1 / 8),
            "pinch_harmonic_pedal": 0,
            "celeste_pedal": infit.Cycle((1, 0, 1, 1, 1, 0)),
            "soft_pedal": infit.Cycle((0, 1, 1, 0, 1)),
            "buff_stop_pedal": infit.Cycle((0, 1, 1, 0, 1)),
            "sound_speed": 300,
            "blooming_energy": infit.Uniform(0.25, 2),
            "blooming_inertia": infit.Uniform(1.55, 2.8),
            "condition": infit.Uniform(0, 10),
            "wall_distance": infit.Uniform(0, 6),
            "effect1_switch": infit.ActivityLevel(6),
            "effect1_param1": infit.Uniform(0.2, 0.4),
            "effect1_param2": infit.Uniform(0.25, 0.6),
            "mic_1_level_1": infit.Gaussian(-2, 4, seed=5),
            "mic_1_x_position": infit.Uniform(0, 0.25, seed=5),
            "mic_2_x_position": infit.Uniform(0.6, 1.45, seed=5),
            "mic_1_z_position": infit.Uniform(1.25, 2.8, seed=5),
            "mic_2_z_position": infit.Uniform(1.25, 2.8, seed=5),
            "mic_1_elevation": infit.Uniform(-180, 180, seed=5),
            "mic_2_elevation": infit.Uniform(-180, 180, seed=5),
            "mic_1_azimuth": infit.Uniform(-180, 180, seed=5),
            "mic_2_azimuth": infit.Uniform(-180, 180, seed=5),
        },
        parameter_dissonant_pitches={
            "unison_width": infit.Uniform(0, 20),
            "impedance": infit.Uniform(0.5, 1.5, seed=2),
            "cutoff": infit.Uniform(0.65, 2, seed=2),
            "q_factor": infit.Uniform(0.8, 2, seed=2),
            "direct_sound_duration": infit.Uniform(4, 5, seed=3),
            "string_length": infit.Uniform(8, 10),
            "sympathetic_resonance": infit.Uniform(2, 5),
            "hammer_noise": infit.Uniform(0.2, 3, seed=10),
            "sustain_pedal": sustain_pedal,
            "hammer_hard_piano": 0.1,
            "hammer_hard_mezzo": 0.2,
            "hammer_hard_forte": 0.3,
            "strike_point": infit.Uniform(1 / 64, 1 / 8),
            "pinch_harmonic_pedal": 0,
            "celeste_pedal": infit.Cycle((1, 0, 1, 1, 1, 0)),
            "soft_pedal": infit.Cycle((0, 1, 1, 0, 1)),
            "buff_stop_pedal": infit.Cycle((0, 1, 1, 0, 1)),
            "sound_speed": infit.Uniform(200, 500, seed=0),
            "blooming_energy": infit.Uniform(0.25, 2),
            "blooming_inertia": infit.Uniform(1.55, 2.8),
            "wall_distance": infit.Uniform(0, 6),
            "mic_1_z_position": infit.Uniform(1.25, 2),
        },
        *args,
        **kwargs,
    )
Ejemplo n.º 19
0
         fxp='"pbIII/fxp/VibraphoneV-BHumanizednostretching.fxp"',
         preset=None,
     ),
     pteq.mk_dreamy_pte(
         # modulator=(ornamentations.SoftLineGlissandoMaker(),),
         empty_attack_dynamic_maker=infit.Value(0.2)),
     pteq.mk_dreamy_pte(
         # modulator=(ornamentations.SoftLineGlissandoMaker(),),
         empty_attack_dynamic_maker=infit.Value(0.2)),
 ),
 percussion_engine_per_voice=(
     percussion.Rhythmizer(
         voice_meters2occupy=(0, 1, 2),
         sample_maker=infit.Cycle((percussion.ResonanceSample(
             path=infit.Cycle(globals.SAM_CYMBALS_BIG_AGGRESSIVE),
             pitch_factor=infit.Cycle((0.5, 1, 0.25, 1)),
             resonance_filter_bandwidth=infit.Uniform(10, 20),
             resonance_filter_octave=infit.Cycle((1, 2, 1, 3, 0, 1, 2)),
         ), )),
         likelihood_range=(0.5, 0.8),
         volume_range=(0.1, 0.8),
         ignore_beats_occupied_by_voice=False,
     ),
     percussion.Rhythmizer(
         voice_meters2occupy=(1, ),
         sample_maker=infit.Cycle((percussion.ResonanceSample(
             path=infit.Cycle(globals.SAM_CYMBALS_BIG_CLOSE),
             pitch_factor=infit.Cycle((0.5, 1, 0.25, 1)),
             resonance_filter_bandwidth=infit.Uniform(10, 20),
             resonance_filter_octave=infit.Cycle((1, 2, 1, 3, 0, 1, 2)),
         ), )),
         likelihood_range=(0.5, 1),
Ejemplo n.º 20
0
    def __init__(
            self,
            voice_meters2occupy: tuple = (0, ),
            sample_maker: infit.InfIt = infit.Cycle((
                Sample(
                    path=infit.Cycle(globals.SAM_KENDANG_HIGH_LOW_CLOSE_HAND),
                    frequency=globals.SAM_KENDANG_HIGH_LOW_CLOSE_HAND.
                    information["frequency"],
                    pitch_factor=infit.Cycle((0.5, 2, 4, 1)),
                ),
                Sample(
                    path=infit.Cycle(globals.SAM_KENDANG_LOW_HIGH_CLOSE_HAND),
                    frequency=globals.SAM_KENDANG_LOW_HIGH_CLOSE_HAND.
                    information["frequency"],
                    pitch_factor=infit.Cycle((0.5, 2, 4, 1)),
                ),
                Sample(
                    path=infit.Cycle(globals.SAM_CYMBALS_BIG_AGGRESSIVE),
                    frequency=globals.SAM_CYMBALS_BIG_AGGRESSIVE.
                    information["frequency"],
                    pitch_factor=infit.Uniform(0.4, 1.3),
                ),
                Sample(
                    path=infit.Cycle(globals.SAM_KENDANG_LOW_LOW_CLOSE_HAND),
                    frequency=globals.SAM_KENDANG_LOW_LOW_CLOSE_HAND.
                    information["frequency"],
                    pitch_factor=infit.Cycle((0.5, 2, 4, 1)),
                ),
            )),
            likelihood_range: tuple = (0.79, 1),
            volume_range: tuple = (0.5, 1),
            seed: int = 100,
            chord: infit.InfIt = harmony.find_harmony(),
            ignore_beats_occupied_by_voice: bool = True,
            voices2ignore: tuple = None,
            octaves: tuple = tuple(range(-3, 4)),
    ):
        if voices2ignore is None:
            voices2ignore = voice_meters2occupy

        if type(chord) is tuple:
            chord = infit.Value(chord)

        elif isinstance(chord, infit.InfIt):
            pass

        else:
            msg = "Wrong type '{}' for chord '{}'.".format(type(chord), chord)
            raise TypeError(msg)

        self._voices2ignore = voices2ignore
        self._voice_meters2occupy = voice_meters2occupy
        self._sample_maker = sample_maker
        self._likelihood_range = likelihood_range
        self._volume_range = volume_range
        self._chord = chord
        self._ignore_beats_occupied_by_voice = ignore_beats_occupied_by_voice
        self._octaves = octaves

        import random

        random.seed(seed)

        self._random_module = random
Ejemplo n.º 21
0
def make(name: str = "TWO", gender=False, group=0, sub_group0=1):
    return (
        segments.Chord(
            "{}_Bell0".format(name),
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(2, 1), ji.r(2, 1),
                                                    ji.r(5, 4)),
            group=(group, sub_group0, 0),
            chord=harmony.find_harmony(name="A", idx=0, gender=gender),
            gender=gender,
            n_bars=1,
            duration_per_bar=5,
            start=-3,
            # start=0,
            dynamic_range_of_voices=(0.6, 0.7),
            voices_entry_delay_per_voice=(0.03, 0.07, 0.01),
            anticipation_time=6,
            overlaying_time=0,
            pteq_engine_per_voice=(
                pteq.mk_bright_bell(
                    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
                pteq.mk_bright_bell(
                    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
                pteq.mk_bright_bell(
                    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
            ),
            speech_init_attributes={},
            volume_envelope_per_track={
                "glitterN01":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(4, 0),
                    interpolations.FloatInterpolationEvent(2, 0.5),
                    interpolations.FloatInterpolationEvent(4, 1.1),
                    interpolations.FloatInterpolationEvent(0, 0.1),
                ]),
                "glitterN02":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(4, 0),
                    interpolations.FloatInterpolationEvent(2, 0.5),
                    interpolations.FloatInterpolationEvent(4, 1),
                    interpolations.FloatInterpolationEvent(0, 0.1),
                ]),
                "glitterN12":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(4, 0),
                    interpolations.FloatInterpolationEvent(2, 0.5),
                    interpolations.FloatInterpolationEvent(4, 1),
                    interpolations.FloatInterpolationEvent(0, 0.1),
                ]),
            },
            glitter_type="drone",
            glitter_wave_form_per_voice=("square", "saw", "square"),
            glitter_register_per_voice=(2, 3, 3),
            glitter_volume_per_voice=(3.85, 4.5, 4.5),
            glitter_modulater_per_voice=(None, None, None),
            glitter_release_duration=6,
            glitter_attack_duration=5,
            include_glitter=True,
            include_diva=False,
            include_natural_radio=False,
            include_percussion=False,
        ),
        segments.FreeStyleCP(
            "{}_0".format(name),
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(2, 1), ji.r(12, 5),
                                                    ji.r(9, 5)),
            volume_envelope_per_track={
                "voiceN0":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(4, 0.2),
                    interpolations.FloatInterpolationEvent(6, 1),
                    interpolations.FloatInterpolationEvent(2, 1),
                    interpolations.FloatInterpolationEvent(0, 0),
                ]),
                "voiceN1":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(2, 0.2),
                    interpolations.FloatInterpolationEvent(0, 1),
                ]),
                "voiceN2":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(3, 0.2),
                    interpolations.FloatInterpolationEvent(0, 1),
                ]),
                "glitterN01":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(2, 0),
                    interpolations.FloatInterpolationEvent(2, 0.5),
                    interpolations.FloatInterpolationEvent(5, 1),
                    interpolations.FloatInterpolationEvent(0, 0.2),
                ]),
                "glitterN02":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(2, 0),
                    interpolations.FloatInterpolationEvent(2, 0.5),
                    interpolations.FloatInterpolationEvent(5, 1),
                    interpolations.FloatInterpolationEvent(0, 0.1),
                ]),
                "glitterN12":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(2, 0),
                    interpolations.FloatInterpolationEvent(2, 0.5),
                    interpolations.FloatInterpolationEvent(5, 1),
                    interpolations.FloatInterpolationEvent(0, 0.2),
                ]),
            },
            diva_engine_per_voice=(
                diva.FlageoletDivaMidiEngine,
                diva.FlageoletDivaMidiEngine,
                diva.FlageoletDivaMidiEngine,
            ),
            group=(group, sub_group0, 0),
            start_harmony=harmony.find_harmony("A",
                                               True,
                                               0,
                                               tuple([]),
                                               gender=gender),
            energy_per_voice=(5, 10, 10),
            silence_decider_per_voice=(
                infit.ActivityLevel(6),
                infit.ActivityLevel(3),
                infit.ActivityLevel(3),
            ),
            weight_range=(6, 10),
            decision_type="activity",
            gender=gender,
            n_bars=2,
            duration_per_bar=14.5,
            start=-5,
            dynamic_range_of_voices=(0.1, 0.24),
            anticipation_time=5.5,
            overlaying_time=1.25,
            cp_add_dissonant_pitches_to_nth_voice=(False, True, True),
            cp_constraints_interpolation=(
                counterpoint.constraints.AP_tremolo(
                    0,
                    add_tremolo_decider=infit.ActivityLevel(10),
                    only_on_non_dissonant_pitches=False,
                    define_tremolo_tones_as_dissonant=False,
                    tremolo_size_generator_per_tone=infit.MetaCycle(
                        (infit.Cycle, (4, 11, 5, 6, 7, 4, 3, 4, 19))),
                ),
                counterpoint.constraints.AP_tremolo(
                    1,
                    add_tremolo_decider=infit.ActivityLevel(7),
                    only_on_non_dissonant_pitches=True,
                    define_tremolo_tones_as_dissonant=False,
                    tremolo_size_generator_per_tone=infit.MetaCycle(
                        (infit.Cycle, ((4, 3, 10, 5, 3, 7, 4, 11, 3, 9,
                                        14), ))),
                ),
                counterpoint.constraints.AP_tremolo(
                    2,
                    add_tremolo_decider=infit.ActivityLevel(6),
                    only_on_non_dissonant_pitches=True,
                    define_tremolo_tones_as_dissonant=False,
                    tremolo_size_generator_per_tone=infit.MetaCycle(
                        (infit.Cycle, ((7, 5, 8, 5, 6, 12, 8, 9, 10, 4), ))),
                ),
            ),
            glitter_include_dissonant_pitches=False,
            voices_overlaying_time=1,
            pteq_engine_per_voice=(
                pteq.mk_super_soft_leading_pte(
                    modulator=(ornamentations.SoftLineGlissandoMaker(
                        activity_lv=7,
                        minima_glissando_duration=0.05,
                        maxima_glissando_duration=0.1,
                        minima_glissando_size=20,
                        maxima_glissando_size=70,
                    ), ),
                    empty_attack_dynamic_maker=infit.Value(0.2),
                    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                    preset=None,
                    sustain_pedal=0,
                ),
                pteq.mk_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Uniform(0.15, 0.3),
                    modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                    convert_dissonant_tones2glissandi=True,
                ),
                pteq.mk_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Uniform(0.15, 0.3),
                    modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                    convert_dissonant_tones2glissandi=True,
                ),
            ),
            percussion_engine_per_voice=(
                percussion.Rhythmizer(
                    voice_meters2occupy=(0, ),
                    chord=infit.Cycle((
                        harmony.find_harmony(name="A", gender=gender),
                        harmony.find_harmony(name="C", gender=gender),
                    )),
                    sample_maker=infit.Cycle((
                        percussion.ResonanceSample(
                            path=infit.Cycle(
                                globals.SAM_CYMBALS_BIG_AGGRESSIVE),
                            pitch_factor=infit.Uniform(2, 6),
                            resonance_filter_bandwidth=infit.Uniform(0.4, 2),
                            resonance_filter_octave=infit.Cycle(
                                (2, 4, 3, 4, 1, 2)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.ResonanceSample(
                            path=infit.Cycle(
                                globals.SAM_CYMBALS_MIDDLE_AGGRESSIVE),
                            pitch_factor=infit.Uniform(2, 5),
                            resonance_filter_bandwidth=infit.Uniform(0.5, 2),
                            resonance_filter_octave=infit.Cycle(
                                (2, 3, 4, 1, 2)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                    )),
                    likelihood_range=(0.3, 0.1),
                    volume_range=(0.1, 0.5),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(1, ),
                    sample_maker=infit.Cycle((
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_LOW_LOW_FAR_MALLET),
                            frequency=globals.SAM_KENDANG_LOW_LOW_FAR_MALLET.
                            information["frequency"],
                            pitch_factor=infit.Cycle((0.5, 1, 0.25, 1, 0.5)),
                            distortion=infit.Uniform(0.7, 1.4),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_LOW_FAR_MALLET),
                            frequency=globals.SAM_KENDANG_HIGH_LOW_FAR_MALLET.
                            information["frequency"],
                            pitch_factor=infit.Cycle((1, 0.25, 1)),
                            distortion=infit.Uniform(0.7, 1.3),
                        ),
                    )),
                    likelihood_range=(0.1, 0.325),
                    volume_range=(0.45, 0.64),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(2, ),
                    sample_maker=infit.Cycle((percussion.Sample(
                        path=infit.Cycle(globals.SAM_RADIO_ROEHRENRADIO_KEYS),
                        pitch_factor=infit.Uniform(1.4, 2.75),
                        distortion=infit.Uniform(0.3, 1),
                    ), )),
                    likelihood_range=(0.08, 0.54),
                    volume_range=(0.54, 0.8),
                    ignore_beats_occupied_by_voice=False,
                    seed=39,
                ),
            ),
            speech_init_attributes={},
            glitter_modulater_per_voice=("randomi", "randomh", "randomh"),
            glitter_attack_duration=infit.Gaussian(1.2, 0.3),
            glitter_release_duration=infit.Gaussian(1, 0.2),
            include_glitter=True,
            include_diva=True,
            include_natural_radio=True,
            include_percussion=True,
            # radio_silent_channels=(0, 2, 4),
            radio_samples=(
                globals.SAM_RADIO_ROEHRENRADIO_FAR_KURZWELLE[0],
                globals.SAM_RADIO_ROEHRENRADIO_CLOSE_KURZWELLE[0],
            ),
            radio_n_changes=3,
            radio_average_volume=0.425,
            radio_shadow_time=0.04,
            radio_min_volume=0.725,
            radio_attack_duration=infit.Gaussian(1, 0.1),
            radio_release_duration=infit.Gaussian(5.2, 0.2),
        ),
        segments.Chord(
            "{}_CF_BELL_0".format(name),
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(7, 1), ji.r(2, 1),
                                                    ji.r(4, 3)),
            group=(group, sub_group0, 1),
            chord=harmony.find_harmony(name="C", gender=gender),
            gender=gender,
            n_bars=1,
            duration_per_bar=8,
            start=-1.35,
            dynamic_range_of_voices=(0.4, 0.5),
            anticipation_time=2.25,
            overlaying_time=3.25,
            pteq_engine_per_voice=(
                pteq.mk_pianoteq_engine(
                    fxp='"pbIII/fxp/Bells_no_stretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
                pteq.mk_pianoteq_engine(
                    fxp='"pbIII/fxp/Bells_no_stretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
                pteq.mk_dreamy_pte(
                    fxp='"pbIII/fxp/Bells_no_stretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
            ),
            radio_samples=(
                globals.SAM_RADIO_ITALY[-1],
                globals.SAM_RADIO_BIELEFELD[-1],
            ),
            speech_init_attributes={},
            include_glitter=False,
            include_diva=False,
            include_natural_radio=True,
            include_percussion=False,
        ),
        segments.Chord(
            "{}_Bell1".format(name),
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(2, 1), ji.r(2, 1),
                                                    ji.r(5, 4)),
            group=(group, sub_group0, 1),
            chord=harmony.find_harmony(name="A", idx=0, gender=gender),
            gender=gender,
            n_bars=1,
            duration_per_bar=5,
            start=-5,
            dynamic_range_of_voices=(0.44, 0.54),
            voices_entry_delay_per_voice=(0.03, 0.07, 0.01),
            anticipation_time=5,
            overlaying_time=0,
            pteq_engine_per_voice=(
                pteq.mk_bright_bell(
                    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
                pteq.mk_bright_bell(
                    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
                pteq.mk_bright_bell(
                    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
            ),
            speech_init_attributes={},
            volume_envelope_per_track={
                "glitterN01":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(3, 0),
                    interpolations.FloatInterpolationEvent(2, 0.3),
                    interpolations.FloatInterpolationEvent(4, 1.1),
                    interpolations.FloatInterpolationEvent(0, 0.1),
                ]),
                "glitterN02":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(3, 0),
                    interpolations.FloatInterpolationEvent(2, 0.3),
                    interpolations.FloatInterpolationEvent(4, 1),
                    interpolations.FloatInterpolationEvent(0, 0.1),
                ]),
                "glitterN12":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(3, 0),
                    interpolations.FloatInterpolationEvent(2, 0.3),
                    interpolations.FloatInterpolationEvent(4, 1),
                    interpolations.FloatInterpolationEvent(0, 0.1),
                ]),
            },
            glitter_type="drone",
            glitter_wave_form_per_voice=("square", "saw", "square"),
            glitter_register_per_voice=(3, 3, 4),
            glitter_volume_per_voice=(3.65, 4.4, 4.4),
            glitter_modulater_per_voice=(None, None, None),
            glitter_release_duration=6,
            glitter_attack_duration=5,
            include_glitter=True,
            include_diva=False,
            include_natural_radio=False,
            include_percussion=False,
        ),
        segments.MelodicCP(
            "{}_1".format(name),
            volume_envelope_per_track={
                "voiceN0":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(10, 2.1),
                    interpolations.FloatInterpolationEvent(0, 2.7),
                ]),
            },
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(2, 1), ji.r(3, 1),
                                                    ji.r(5, 4)),
            random_seed=100,
            group=(group, sub_group0, 1),
            action_per_voice=(0.7, 0.73),
            sound_per_voice=(0.82, 0.87),
            phrases=(0, ),
            melody_register=1,
            melodic_weight=0,
            weight_range=(0.3, 1),
            harmonicity_range=(0.25, 1),
            gender=gender,
            duration_per_bar=9.25,
            start=-5,
            dynamic_range_of_voices=(0.2, 0.35),
            anticipation_time=3,
            overlaying_time=2.2,
            voices_overlaying_time=3.5,
            glitter_attack_duration=infit.Gaussian(2.1, 0.15),
            glitter_release_duration=infit.Gaussian(1, 0.15),
            tremolo_maker_per_voice=(
                None,
                None,
                tremolo.TremoloMaker(
                    add_tremolo_decider=infit.ActivityLevel(6),
                    tremolo_size_generator_per_tone=infit.MetaCycle(
                        (infit.Gaussian, (0.2675, 0.11))),
                    tremolo_volume_factor=0.48,
                ),
            ),
            pteq_engine_per_voice=(
                pteq.mk_super_soft_leading_pte(
                    empty_attack_dynamic_maker=infit.Value(0.3),
                    fxp='"pbIII/fxp/VibraphoneV-BHumanizednostretching.fxp"',
                    preset=None,
                    sustain_pedal=1,
                ),
                pteq.mk_dreamy_pte(
                    modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                    empty_attack_dynamic_maker=infit.Value(0.4),
                ),
                pteq.mk_super_soft_pte(
                    modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                    empty_attack_dynamic_maker=infit.Value(0.3),
                    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                    preset=None,
                    sustain_pedal=0,
                ),
            ),
            diva_engine_per_voice=(
                diva.FlageoletDivaMidiEngine,
                diva.FlageoletDivaMidiEngine,
                diva.FlageoletDivaMidiEngine,
            ),
            percussion_engine_per_voice=(),
            speech_init_attributes={},
            include_glitter=True,
            include_diva=False,
            include_natural_radio=True,
            include_percussion=False,
            radio_silent_channels=(0, 2, 4),
            radio_samples=(globals.SAM_RADIO_PROCESSED_DEGRADE[0], ),
            radio_n_changes=2,
            radio_average_volume=0.08,
            radio_shadow_time=0.08,
            radio_min_volume=0.755,
        ),
        segments.MelodicCP(
            "{}_2".format(name),
            volume_envelope_per_track={
                "voiceN0":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(13, 2.2),
                    interpolations.FloatInterpolationEvent(5, 2.75),
                    interpolations.FloatInterpolationEvent(0, 1),
                ]),
                "voiceN1":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(16.5, 1),
                    interpolations.FloatInterpolationEvent(5, 0.9),
                    interpolations.FloatInterpolationEvent(0, 0.335),
                ]),
                "voiceN2":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(17, 1),
                    interpolations.FloatInterpolationEvent(4, 0.9),
                    interpolations.FloatInterpolationEvent(0, 0.4),
                ]),
            },
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(3, 1), ji.r(3, 1),
                                                    ji.r(5, 4)),
            random_seed=1,
            group=(group, sub_group0, 2),
            action_per_voice=(0.6, 0.63),
            sound_per_voice=(0.82, 0.87),
            phrases=(0, ),
            melody_register=1,
            melodic_weight=0,
            weight_range=(0.3, 1),
            harmonicity_range=(0.25, 1),
            gender=gender,
            duration_per_bar=8.9,
            start=0.75,
            dynamic_range_of_voices=(0.24, 0.55),
            anticipation_time=2,
            overlaying_time=2.2,
            voices_overlaying_time=3.5,
            glitter_attack_duration=infit.Gaussian(1.9, 0.15),
            glitter_release_duration=infit.Gaussian(1, 0.15),
            tremolo_maker_per_voice=(
                None,
                tremolo.TremoloMaker(
                    add_tremolo_decider=infit.ActivityLevel(6),
                    tremolo_size_generator_per_tone=infit.MetaCycle(
                        (infit.Gaussian, (0.2675, 0.11))),
                    tremolo_volume_factor=0.48,
                ),
                tremolo.TremoloMaker(
                    add_tremolo_decider=infit.ActivityLevel(6),
                    tremolo_size_generator_per_tone=infit.MetaCycle(
                        (infit.Gaussian, (0.2675, 0.11))),
                    tremolo_volume_factor=0.48,
                ),
            ),
            pteq_engine_per_voice=(
                pteq.mk_super_soft_leading_pte(
                    empty_attack_dynamic_maker=infit.Value(0.3),
                    fxp='"pbIII/fxp/VibraphoneV-BHumanizednostretching.fxp"',
                    preset=None,
                    sustain_pedal=1,
                ),
                pteq.mk_dreamy_pte(
                    modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                    empty_attack_dynamic_maker=infit.Value(0.4),
                ),
                pteq.mk_super_soft_pte(
                    modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                    empty_attack_dynamic_maker=infit.Value(0.3),
                    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                    preset=None,
                    sustain_pedal=0,
                ),
            ),
            diva_engine_per_voice=(
                diva.FlageoletDivaMidiEngine,
                diva.FlageoletDivaMidiEngine,
                diva.FlageoletDivaMidiEngine,
            ),
            percussion_engine_per_voice=(),
            speech_init_attributes={},
            include_glitter=True,
            include_diva=False,
            include_natural_radio=True,
            include_percussion=False,
            radio_silent_channels=(0, 2, 4),
            radio_samples=(globals.SAM_RADIO_PROCESSED_DEGRADE[0], ),
            radio_n_changes=2,
            radio_average_volume=0.1,
            radio_shadow_time=0.08,
            radio_min_volume=0.955,
        ),
        segments.Chord(
            "{}_Bell2".format(name),
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(5, 1), ji.r(2, 1),
                                                    ji.r(5, 4)),
            group=(group, sub_group0, 2),
            chord=harmony.find_harmony(name="A", idx=0, gender=gender),
            gender=gender,
            n_bars=1,
            duration_per_bar=8,
            start=1,
            dynamic_range_of_voices=(0.34, 0.42),
            voices_entry_delay_per_voice=(0, 0.09, 0.05),
            anticipation_time=0,
            overlaying_time=0,
            pteq_engine_per_voice=(
                pteq.mk_bright_bell(
                    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
                pteq.mk_bright_bell(
                    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
                pteq.mk_bright_bell(
                    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
            ),
            speech_init_attributes={},
            include_glitter=False,
            include_diva=False,
            include_natural_radio=False,
            include_percussion=False,
        ),
    )
Ejemplo n.º 22
0
def make(name: str = "ONE", gender=True, group=0, sub_group0=0):
    return (segments.Chord(
        "{}_fadeIn".format(name),
        volume_envelope=interpolations.InterpolationLine([
            interpolations.FloatInterpolationEvent(5, 0),
            interpolations.FloatInterpolationEvent(4, 0.35),
            interpolations.FloatInterpolationEvent(0.2, 1),
            interpolations.FloatInterpolationEvent(0, 1),
        ]),
        volume_envelope_per_track={
            "percussion_P2":
            interpolations.InterpolationLine([
                interpolations.FloatInterpolationEvent(3, 0),
                interpolations.FloatInterpolationEvent(10, 0),
                interpolations.FloatInterpolationEvent(0, 1),
            ]),
            "percussion_P1":
            interpolations.InterpolationLine([
                interpolations.FloatInterpolationEvent(2, 0),
                interpolations.FloatInterpolationEvent(10, 0),
                interpolations.FloatInterpolationEvent(0, 1),
            ]),
            "percussion_P0":
            interpolations.InterpolationLine([
                interpolations.FloatInterpolationEvent(2, 0),
                interpolations.FloatInterpolationEvent(10, 0),
                interpolations.FloatInterpolationEvent(0, 1),
            ]),
        },
        ambitus_maker=ambitus.SymmetricalRanges(ji.r(2, 1), ji.r(2, 1),
                                                ji.r(9, 8)),
        group=(group, sub_group0, 0),
        chord=harmony.find_harmony(name="A", gender=gender),
        gender=gender,
        n_bars=1,
        duration_per_bar=14,
        start=0,
        dynamic_range_of_voices=(0.8, 0.9),
        anticipation_time=1.25,
        overlaying_time=1.25,
        percussion_engine_per_voice=(
            percussion.Rhythmizer(
                voice_meters2occupy=(0, ),
                chord=infit.Cycle((
                    harmony.find_harmony(name="A", gender=gender),
                    harmony.find_harmony(name="C", gender=gender),
                )),
                sample_maker=infit.Cycle((
                    percussion.ResonanceSample(
                        path=infit.Cycle(globals.SAM_CYMBALS_BIG_AGGRESSIVE),
                        pitch_factor=infit.Uniform(2, 6),
                        resonance_filter_bandwidth=infit.Uniform(0.4, 2),
                        resonance_filter_octave=infit.Cycle(
                            (2, 4, 3, 4, 1, 2)),
                        glissando_direction=True,
                        glissando_duration=infit.Uniform(0.001, 0.2),
                        glissando_offset=infit.Uniform(0, 0.1),
                        glissando_size=infit.Gaussian(1, 0.2),
                    ),
                    percussion.ResonanceSample(
                        path=infit.Cycle(
                            globals.SAM_CYMBALS_MIDDLE_AGGRESSIVE),
                        pitch_factor=infit.Uniform(2, 5),
                        resonance_filter_bandwidth=infit.Uniform(0.5, 2),
                        resonance_filter_octave=infit.Cycle((2, 3, 4, 1, 2)),
                        glissando_direction=True,
                        glissando_duration=infit.Uniform(0.001, 0.2),
                        glissando_offset=infit.Uniform(0, 0.1),
                        glissando_size=infit.Gaussian(1, 0.2),
                    ),
                )),
                likelihood_range=(0.5, 0.1),
                volume_range=(0.1, 0.5),
                ignore_beats_occupied_by_voice=False,
            ),
            percussion.Rhythmizer(
                voice_meters2occupy=(1, ),
                chord=infit.Cycle((
                    harmony.find_harmony(name="A", gender=gender),
                    harmony.find_harmony(name="C", gender=gender),
                )),
                sample_maker=infit.Cycle((
                    percussion.ResonanceSample(
                        path=infit.Cycle(globals.SAM_CYMBALS_BIG_CLOSE),
                        pitch_factor=infit.Gaussian(4, 6),
                        resonance_filter_bandwidth=infit.Gaussian(0.4, 0.3),
                        resonance_filter_octave=infit.Cycle((2, )),
                        glissando_direction=True,
                        glissando_duration=infit.Uniform(0.001, 0.3),
                        glissando_offset=0,
                        glissando_size=infit.Gaussian(1, 0.2),
                    ),
                    percussion.ResonanceSample(
                        path=infit.Cycle(
                            globals.SAM_CYMBALS_MIDDLE_CLOSE_LOUD),
                        pitch_factor=infit.Gaussian(3, 4),
                        resonance_filter_bandwidth=infit.Uniform(0.5, 1),
                        resonance_filter_octave=infit.Cycle((2, )),
                        glissando_direction=True,
                        glissando_duration=infit.Uniform(0.001, 0.2),
                        glissando_offset=0,
                        glissando_size=infit.Gaussian(1, 0.1),
                    ),
                )),
                likelihood_range=(0.6, 0.1),
                volume_range=(0.1, 0.8),
                ignore_beats_occupied_by_voice=False,
            ),
            percussion.Rhythmizer(
                voice_meters2occupy=(0, 1, 2),
                chord=infit.Cycle((harmony.find_harmony(name="B",
                                                        gender=gender), )),
                sample_maker=infit.Cycle((
                    percussion.Sample(
                        path=infit.Cycle(
                            globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND),
                        frequency=globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND.
                        information["frequency"],
                        pitch_factor=infit.Cycle((2, 4, 8, 4)),
                        glissando_direction=True,
                        glissando_duration=infit.Uniform(0.001, 0.2),
                        glissando_offset=infit.Uniform(0, 0.1),
                        glissando_size=infit.Gaussian(1, 0.2),
                    ),
                    percussion.Sample(
                        path=infit.Cycle(
                            globals.SAM_KENDANG_LOW_LOW_CLOSE_HAND),
                        frequency=globals.SAM_KENDANG_LOW_LOW_CLOSE_HAND.
                        information["frequency"],
                        pitch_factor=infit.Cycle((16, 8, 4, 8, 2)),
                        glissando_direction=True,
                        glissando_duration=infit.Uniform(0.001, 0.2),
                        glissando_offset=infit.Uniform(0, 0.1),
                        glissando_size=infit.Gaussian(1, 0.2),
                    ),
                    percussion.Sample(
                        path=infit.Cycle(
                            globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND),
                        frequency=globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND.
                        information["frequency"],
                        pitch_factor=infit.Cycle((8, 4, 2, 4)),
                        glissando_direction=True,
                        glissando_duration=infit.Uniform(0.001, 0.2),
                        glissando_offset=infit.Uniform(0, 0.1),
                        glissando_size=infit.Gaussian(1, 0.2),
                    ),
                    percussion.Sample(
                        path=infit.Cycle(
                            globals.SAM_KENDANG_HIGH_LOW_CLOSE_HAND),
                        frequency=globals.SAM_KENDANG_HIGH_LOW_CLOSE_HAND.
                        information["frequency"],
                        pitch_factor=infit.Cycle((8, 16, 8, 4, 8, 2)),
                        glissando_direction=True,
                        glissando_duration=infit.Uniform(0.001, 0.2),
                        glissando_offset=infit.Uniform(0, 0.1),
                        glissando_size=infit.Gaussian(1, 0.2),
                    ),
                )),
                likelihood_range=(0.1, 0.5),
                volume_range=(0.1, 0.5),
                ignore_beats_occupied_by_voice=False,
            ),
        ),
        radio_samples=(
            globals.SAM_RADIO_PROCESSED_DEGRADE[0],
            globals.SAM_RADIO_BIELEFELD[-1],
        ),
        radio_average_volume=0.75,
        radio_min_volume=0.955,
        speech_init_attributes={},
        include_glitter=False,
        include_diva=False,
        include_natural_radio=True,
        include_percussion=True,
        include_voices=False,
    ), )
Ejemplo n.º 23
0
def make(name: str = "ONE", gender=False, group=0, sub_group0=1):
    return (segments.MelodicCP(
        "{}_0".format(name),
        volume_envelope=interpolations.InterpolationLine([
            interpolations.FloatInterpolationEvent(0.1, 0),
            interpolations.FloatInterpolationEvent(0, 1),
        ]),
        volume_envelope_per_track={
            "voiceN0":
            interpolations.InterpolationLine([
                interpolations.FloatInterpolationEvent(3, 0),
                interpolations.FloatInterpolationEvent(18, 1),
                interpolations.FloatInterpolationEvent(5, 1),
                interpolations.FloatInterpolationEvent(0, 0),
            ])
        },
        ambitus_maker=ambitus.SymmetricalRanges(ji.r(1, 1), ji.r(3, 1),
                                                ji.r(4, 3)),
        random_seed=1000,
        group=(group, sub_group0, 0),
        action_per_voice=(0.74, 0.73),
        sound_per_voice=(0.85, 0.85),
        phrases=(0, 1),
        melody_register=0,
        melodic_weight=0,
        weight_range=(0.5, 1),
        harmonicity_range=(0.25, 1),
        gender=gender,
        duration_per_bar=12,
        start=0,
        dynamic_range_of_voices=(0.5, 0.9),
        anticipation_time=0.7,
        overlaying_time=1.2,
        voices_overlaying_time=3.5,
        pteq_engine_per_voice=(
            pteq.mk_super_soft_pte(
                empty_attack_dynamic_maker=infit.Value(0.2),
                fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                preset=None,
                sustain_pedal=0,
            ),
            pteq.mk_dreamy_pte(
                modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                empty_attack_dynamic_maker=infit.Value(0.2),
            ),
            pteq.mk_super_soft_pte(
                modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                empty_attack_dynamic_maker=infit.Value(0.2),
            ),
        ),
        percussion_engine_per_voice=(
            percussion.Rhythmizer(
                voice_meters2occupy=(1, 2),
                sample_maker=infit.Cycle((
                    percussion.Sample(
                        path=infit.Cycle(globals.SAM_CYMBALS_BIG_CLOSE),
                        pitch_factor=infit.Uniform(0.5, 2),
                    ),
                    percussion.Sample(
                        path=infit.Cycle(
                            globals.SAM_CYMBALS_MIDDLE_CLOSE_LOUD),
                        pitch_factor=infit.Uniform(0.5, 2),
                    ),
                    percussion.Sample(
                        path=infit.Cycle(
                            globals.SAM_CYMBALS_MIDDLE_CLOSE_QUIET),
                        pitch_factor=infit.Uniform(0.5, 2),
                    ),
                )),
                likelihood_range=(0.3, 1),
                volume_range=(0.1, 0.5),
                ignore_beats_occupied_by_voice=False,
            ),
            percussion.Rhythmizer(likelihood_range=(0, 0.1),
                                  volume_range=(0, 0)),
            percussion.Rhythmizer(likelihood_range=(0, 0.1),
                                  volume_range=(0, 0)),
        ),
        speech_init_attributes={},
        include_glitter=True,
        include_diva=True,
        include_natural_radio=True,
        include_percussion=True,
        radio_silent_channels=tuple([]),
        tracks2ignore=("speech0", "speech1", "speech2"),
        radio_samples=(
            globals.SAM_RADIO_ITALY[-1],
            globals.SAM_RADIO_BIELEFELD[-1],
        ),
        radio_n_changes=8,
        radio_average_volume=0.45,
        radio_shadow_time=0.08,
        radio_min_volume=0.955,
    ), )
Ejemplo n.º 24
0
def make(name: str = "THREE", gender=False, group=0, sub_group0=2):
    return (
        segments.Chord(
            "{}_Bell0".format(name),
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(4, 1), ji.r(2, 1),
                                                    ji.r(5, 4)),
            group=(group, sub_group0, 0),
            chord=harmony.find_harmony(name="A", idx=0, gender=gender),
            gender=gender,
            n_bars=1,
            duration_per_bar=5,
            start=-2,
            # start=0,
            dynamic_range_of_voices=(0.3, 0.4),
            voices_entry_delay_per_voice=(0.03, 0.07, 0.01),
            anticipation_time=4,
            overlaying_time=0,
            pteq_engine_per_voice=(
                pteq.mk_bright_bell(
                    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
                pteq.mk_bright_bell(
                    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
                pteq.mk_bright_bell(
                    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
            ),
            speech_init_attributes={},
            volume_envelope_per_track={
                "glitterN01":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(2, 0),
                    interpolations.FloatInterpolationEvent(1, 0.5),
                    interpolations.FloatInterpolationEvent(4, 1.1),
                    interpolations.FloatInterpolationEvent(0, 0.1),
                ]),
                "glitterN02":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(2, 0),
                    interpolations.FloatInterpolationEvent(1, 0.5),
                    interpolations.FloatInterpolationEvent(4, 1),
                    interpolations.FloatInterpolationEvent(0, 0.1),
                ]),
                "glitterN12":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(2, 0),
                    interpolations.FloatInterpolationEvent(1, 0.5),
                    interpolations.FloatInterpolationEvent(4, 1),
                    interpolations.FloatInterpolationEvent(0, 0.1),
                ]),
            },
            glitter_type="drone",
            glitter_wave_form_per_voice=("square", "sine", "sine"),
            glitter_register_per_voice=(3, 4, 4),
            glitter_volume_per_voice=(3.85, 4.5, 4.5),
            glitter_modulater_per_voice=(None, None, None),
            glitter_release_duration=4,
            glitter_attack_duration=4,
            include_glitter=True,
            include_diva=False,
            include_natural_radio=False,
            include_percussion=False,
        ),
        segments.FreeStyleCP(
            "{}_0".format(name),
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(2, 1), ji.r(12, 5),
                                                    ji.r(9, 5)),
            diva_engine_per_voice=(
                diva.FlageoletDivaMidiEngine,
                diva.FlageoletDivaMidiEngine,
                diva.FlageoletDivaMidiEngine,
            ),
            group=(group, sub_group0, 0),
            start_harmony=harmony.find_harmony("A",
                                               True,
                                               0,
                                               tuple([]),
                                               gender=gender),
            energy_per_voice=(9, 10, 9),
            silence_decider_per_voice=(
                infit.ActivityLevel(2),
                infit.ActivityLevel(3),
                infit.ActivityLevel(3),
            ),
            weight_range=(5, 10),
            decision_type="activity",
            gender=gender,
            n_bars=3,
            duration_per_bar=12.75,
            start=-5,
            dynamic_range_of_voices=(0.175, 0.55),
            anticipation_time=2,
            overlaying_time=1.25,
            cp_add_dissonant_pitches_to_nth_voice=(False, True, True),
            cp_constraints_interpolation=(
                counterpoint.constraints.AP_tremolo(
                    0,
                    add_tremolo_decider=infit.ActivityLevel(10),
                    only_on_non_dissonant_pitches=False,
                    define_tremolo_tones_as_dissonant=False,
                    tremolo_size_generator_per_tone=infit.MetaCycle(
                        (infit.Cycle, ((7, 12, 8, 15, 10, 8, 10), ))),
                ),
                counterpoint.constraints.AP_tremolo(
                    1,
                    add_tremolo_decider=infit.ActivityLevel(8),
                    only_on_non_dissonant_pitches=True,
                    define_tremolo_tones_as_dissonant=False,
                    tremolo_size_generator_per_tone=infit.MetaCycle(
                        (infit.Cycle, ((7, 12, 8, 15, 10, 8, 10), ))),
                ),
                counterpoint.constraints.AP_tremolo(
                    2,
                    add_tremolo_decider=infit.ActivityLevel(8),
                    only_on_non_dissonant_pitches=True,
                    define_tremolo_tones_as_dissonant=False,
                    tremolo_size_generator_per_tone=infit.MetaCycle(
                        (infit.Cycle, ((6, 9, 8, 12, 10, 8, 10, 13, 6, 4), ))),
                ),
            ),
            volume_envelope_per_track={
                "voiceN0":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(20, 1),
                    interpolations.FloatInterpolationEvent(0, 1),
                ])
            },
            glitter_include_dissonant_pitches=False,
            voices_overlaying_time=2,
            pteq_engine_per_voice=(
                pteq.mk_soft_leading_overdrive_harp_pte(
                    fxp='"pbIII/fxp/Harp_with_overdrive.fxp"',
                    preset=None,
                    sustain_pedal=1,
                    modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                ),
                pteq.mk_super_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Uniform(0.15, 0.3),
                    modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                    convert_dissonant_tones2glissandi=True,
                ),
                pteq.mk_super_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Uniform(0.15, 0.3),
                    modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                    convert_dissonant_tones2glissandi=True,
                ),
            ),
            percussion_engine_per_voice=(
                percussion.Rhythmizer(
                    voice_meters2occupy=(0, ),
                    sample_maker=infit.Cycle((
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_LOW_CLOSE_HAND),
                            frequency=globals.SAM_KENDANG_HIGH_LOW_CLOSE_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((1, 2, 0.25, 1)),
                            glissando_size=infit.Gaussian(0.8, 0.2),
                            glissando_offset=0,
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.1, 0.5),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_LOW_LOW_CLOSE_HAND),
                            frequency=globals.SAM_KENDANG_LOW_LOW_CLOSE_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((0.5, 1, 0.25, 1, 0.5)),
                            glissando_size=infit.Gaussian(0.9, 0.1),
                            glissando_offset=0,
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.2, 0.5),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_LOW_LOW_FAR_HAND),
                            frequency=globals.SAM_KENDANG_LOW_LOW_FAR_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((1, 0.25, 1, 0.5)),
                            glissando_size=infit.Gaussian(1.15, 0.2),
                            glissando_offset=0,
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.3, 0.5),
                        ),
                    )),
                    likelihood_range=(0.1, 0.7),
                    volume_range=(0.3, 0.45),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(1, ),
                    sample_maker=infit.Cycle((
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_LOW_LOW_FAR_MALLET),
                            frequency=globals.SAM_KENDANG_LOW_LOW_FAR_MALLET.
                            information["frequency"],
                            pitch_factor=infit.Cycle((0.5, 1, 0.25, 1, 0.5)),
                            distortion=infit.Uniform(0, 1),
                            glissando_size=infit.Gaussian(1.15, 0.1),
                            glissando_offset=0,
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.25, 0.5),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_LOW_FAR_MALLET),
                            frequency=globals.SAM_KENDANG_HIGH_LOW_FAR_MALLET.
                            information["frequency"],
                            pitch_factor=infit.Cycle((1, 2, 0.25, 1)),
                            distortion=infit.Uniform(0, 0.5),
                            glissando_size=infit.Gaussian(0.9, 0.1),
                            glissando_offset=0,
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.25, 0.48),
                        ),
                    )),
                    likelihood_range=(0.1, 0.655),
                    volume_range=(0.45, 0.6),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(2, ),
                    sample_maker=infit.Cycle((percussion.Sample(
                        path=infit.Cycle(globals.SAM_RADIO_ROEHRENRADIO_KEYS),
                        pitch_factor=infit.Uniform(1.4, 2.75),
                        distortion=infit.Uniform(0.3, 1),
                    ), )),
                    likelihood_range=(0.08, 0.26),
                    volume_range=(0.54, 0.8),
                    ignore_beats_occupied_by_voice=False,
                    seed=39,
                ),
            ),
            speech_init_attributes={},
            glitter_modulater_per_voice=(None, None, None),
            glitter_attack_duration=infit.Gaussian(1.9, 0.3),
            glitter_release_duration=infit.Gaussian(2, 0.2),
            include_glitter=True,
            include_diva=True,
            include_natural_radio=True,
            include_percussion=True,
            # radio_silent_channels=(0, 2, 4),
            radio_samples=(
                globals.SAM_RADIO_ROEHRENRADIO_FAR_KURZWELLE[0],
                globals.SAM_RADIO_ROEHRENRADIO_CLOSE_KURZWELLE[0],
            ),
            radio_n_changes=3,
            radio_average_volume=0.34,
            radio_shadow_time=0.02,
            radio_min_volume=0.7,
            radio_attack_duration=infit.Gaussian(2, 0.1),
            radio_release_duration=infit.Gaussian(5.2, 0.2),
        ),
        segments.FreeStyleCP(
            "{}_1".format(name),
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(7, 4), ji.r(8, 3),
                                                    ji.r(9, 7)),
            diva_engine_per_voice=(
                diva.FlageoletDivaMidiEngine,
                diva.FlageoletDivaMidiEngine,
                diva.FlageoletDivaMidiEngine,
            ),
            group=(group, sub_group0, 1),
            start_harmony=harmony.find_harmony("A",
                                               True,
                                               0,
                                               tuple([]),
                                               gender=gender),
            energy_per_voice=(8.5, 5, 6),
            silence_decider_per_voice=(
                infit.ActivityLevel(1),
                infit.ActivityLevel(1),
                infit.ActivityLevel(1),
            ),
            weight_range=(0.5, 1),
            decision_type="random",
            random_seed=1000,
            gender=gender,
            n_bars=2,
            duration_per_bar=12.5,
            start=0.33,
            dynamic_range_of_voices=(0.185, 0.88),
            anticipation_time=1.5,
            overlaying_time=1.25,
            cp_add_dissonant_pitches_to_nth_voice=(False, True, True),
            cp_constraints_interpolation=(
                counterpoint.constraints.AP_tremolo(
                    0,
                    add_tremolo_decider=infit.ActivityLevel(10),
                    only_on_non_dissonant_pitches=False,
                    define_tremolo_tones_as_dissonant=False,
                    tremolo_size_generator_per_tone=infit.MetaCycle(
                        (infit.Cycle, ((7, 12, 8, 15, 10, 8, 10), ))),
                ),
                counterpoint.constraints.AP_tremolo(
                    1,
                    add_tremolo_decider=infit.ActivityLevel(9),
                    only_on_non_dissonant_pitches=True,
                    define_tremolo_tones_as_dissonant=False,
                    tremolo_size_generator_per_tone=infit.MetaCycle(
                        (infit.Cycle, ((7, 12, 8, 15, 10, 8, 10), ))),
                ),
                counterpoint.constraints.AP_tremolo(
                    2,
                    add_tremolo_decider=infit.ActivityLevel(9),
                    only_on_non_dissonant_pitches=True,
                    define_tremolo_tones_as_dissonant=False,
                    tremolo_size_generator_per_tone=infit.MetaCycle(
                        (infit.Cycle, ((6, 9, 8, 12, 10, 8, 10, 13, 6, 4), ))),
                ),
            ),
            volume_envelope_per_track={
                "voiceN0":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(20, 1),
                    interpolations.FloatInterpolationEvent(0, 1),
                ])
            },
            glitter_include_dissonant_pitches=False,
            voices_overlaying_time=2,
            pteq_engine_per_voice=(
                pteq.mk_soft_leading_overdrive_harp_pte(
                    fxp='"pbIII/fxp/Harp_with_overdrive.fxp"',
                    preset=None,
                    sustain_pedal=1,
                ),
                pteq.mk_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Uniform(0.15, 0.3),
                    modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                    convert_dissonant_tones2glissandi=True,
                ),
                pteq.mk_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Uniform(0.15, 0.3),
                    modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                    convert_dissonant_tones2glissandi=True,
                ),
            ),
            percussion_engine_per_voice=(
                percussion.Rhythmizer(
                    voice_meters2occupy=(0, ),
                    sample_maker=infit.Cycle((
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_LOW_CLOSE_HAND),
                            frequency=globals.SAM_KENDANG_HIGH_LOW_CLOSE_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((1, 2, 0.25, 1)),
                            glissando_size=infit.Gaussian(0.8, 0.2),
                            glissando_offset=0,
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.1, 0.5),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_LOW_LOW_CLOSE_HAND),
                            frequency=globals.SAM_KENDANG_LOW_LOW_CLOSE_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((0.5, 1, 0.25, 1, 0.5)),
                            glissando_size=infit.Gaussian(0.9, 0.1),
                            glissando_offset=0,
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.2, 0.5),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_LOW_LOW_FAR_HAND),
                            frequency=globals.SAM_KENDANG_LOW_LOW_FAR_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((1, 0.25, 1, 0.5)),
                            glissando_size=infit.Gaussian(1.15, 0.2),
                            glissando_offset=0,
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.3, 0.5),
                        ),
                    )),
                    likelihood_range=(0.15, 0.9),
                    volume_range=(0.3, 0.45),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(1, ),
                    sample_maker=infit.Cycle((
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_LOW_LOW_FAR_MALLET),
                            frequency=globals.SAM_KENDANG_LOW_LOW_FAR_MALLET.
                            information["frequency"],
                            pitch_factor=infit.Cycle((0.5, 1, 0.25, 1, 0.5)),
                            distortion=infit.Uniform(0, 1),
                            glissando_size=infit.Gaussian(1.15, 0.1),
                            glissando_offset=0,
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.25, 0.5),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_LOW_FAR_MALLET),
                            frequency=globals.SAM_KENDANG_HIGH_LOW_FAR_MALLET.
                            information["frequency"],
                            pitch_factor=infit.Cycle((1, 2, 0.25, 1)),
                            distortion=infit.Uniform(0, 0.5),
                            glissando_size=infit.Gaussian(0.9, 0.1),
                            glissando_offset=0,
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.25, 0.48),
                        ),
                    )),
                    likelihood_range=(0.15, 0.855),
                    volume_range=(0.45, 0.6),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(2, ),
                    sample_maker=infit.Cycle((percussion.Sample(
                        path=infit.Cycle(globals.SAM_RADIO_ROEHRENRADIO_KEYS),
                        pitch_factor=infit.Uniform(1.4, 2.75),
                        distortion=infit.Uniform(0.3, 1),
                    ), )),
                    likelihood_range=(0.08, 0.26),
                    volume_range=(0.54, 0.8),
                    ignore_beats_occupied_by_voice=False,
                    seed=39,
                ),
            ),
            speech_init_attributes={},
            glitter_modulater_per_voice=(None, None, None),
            glitter_attack_duration=infit.Gaussian(1.9, 0.3),
            glitter_release_duration=infit.Gaussian(2, 0.2),
            include_glitter=True,
            include_diva=True,
            include_natural_radio=True,
            include_percussion=True,
            # radio_silent_channels=(0, 2, 4),
            radio_samples=(
                globals.SAM_RADIO_ROEHRENRADIO_FAR_KURZWELLE[0],
                globals.SAM_RADIO_ROEHRENRADIO_CLOSE_KURZWELLE[0],
            ),
            radio_n_changes=5,
            radio_average_volume=0.4,
            radio_shadow_time=0.02,
            radio_min_volume=0.8,
            radio_attack_duration=infit.Gaussian(2, 0.1),
            radio_release_duration=infit.Gaussian(5.2, 0.2),
        ),
    )
Ejemplo n.º 25
0
def make(name: str = "TWO", gender=False, group=0, sub_group0=1):
    return (segments.MelodicCP(
        "{}_0".format(name),
        volume_envelope=interpolations.InterpolationLine([
            interpolations.FloatInterpolationEvent(11, 1),
            interpolations.FloatInterpolationEvent(4, 1),
            interpolations.FloatInterpolationEvent(0, 0.4),
        ]),
        volume_envelope_per_track={
            "voiceP0":
            interpolations.InterpolationLine([
                interpolations.FloatInterpolationEvent(4, 0),
                interpolations.FloatInterpolationEvent(6, 1),
                interpolations.FloatInterpolationEvent(2, 1),
                interpolations.FloatInterpolationEvent(0, 0),
            ]),
            "divaP0":
            interpolations.InterpolationLine([
                interpolations.FloatInterpolationEvent(4, 0),
                interpolations.FloatInterpolationEvent(6, 1),
                interpolations.FloatInterpolationEvent(2, 1),
                interpolations.FloatInterpolationEvent(0, 0),
            ]),
            "voiceP1":
            interpolations.InterpolationLine([
                interpolations.FloatInterpolationEvent(2, 0),
                interpolations.FloatInterpolationEvent(0, 1),
            ]),
            "voiceP2":
            interpolations.InterpolationLine([
                interpolations.FloatInterpolationEvent(3, 0),
                interpolations.FloatInterpolationEvent(0, 1),
            ]),
        },
        ambitus_maker=ambitus.SymmetricalRanges(ji.r(2, 1), ji.r(3, 1),
                                                ji.r(5, 4)),
        random_seed=1000,
        group=(group, sub_group0, 0),
        action_per_voice=(0.94, 0.93),
        sound_per_voice=(0.85, 0.85),
        phrases=(0, ),
        melody_register=1,
        melodic_weight=0,
        weight_range=(0.3, 1),
        harmonicity_range=(0.25, 1),
        gender=gender,
        duration_per_bar=13,
        start=0,
        dynamic_range_of_voices=(0.4, 0.6),
        anticipation_time=2.7,
        overlaying_time=2.2,
        voices_overlaying_time=3.5,
        pteq_engine_per_voice=(
            pteq.mk_super_soft_pte(
                empty_attack_dynamic_maker=infit.Value(0.3),
                fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                preset=None,
                sustain_pedal=1,
            ),
            pteq.mk_dreamy_pte(
                modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                empty_attack_dynamic_maker=infit.Value(0.4),
            ),
            pteq.mk_super_soft_pte(
                modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                empty_attack_dynamic_maker=infit.Value(0.3),
                fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                preset=None,
            ),
        ),
        percussion_engine_per_voice=(
            percussion.Rhythmizer(
                voice_meters2occupy=(0, ),
                chord=infit.Cycle((
                    harmony.find_harmony(name="A", gender=gender),
                    harmony.find_harmony(name="C", gender=gender),
                )),
                sample_maker=infit.Cycle((
                    percussion.ResonanceSample(
                        path=infit.Cycle(globals.SAM_CYMBALS_BIG_AGGRESSIVE),
                        pitch_factor=infit.Uniform(2, 6),
                        resonance_filter_bandwidth=infit.Uniform(0.4, 2),
                        resonance_filter_octave=infit.Cycle(
                            (2, 4, 3, 4, 1, 2)),
                        glissando_direction=True,
                        glissando_duration=infit.Uniform(0.001, 0.2),
                        glissando_offset=infit.Uniform(0, 0.1),
                        glissando_size=infit.Gaussian(1, 0.2),
                    ),
                    percussion.ResonanceSample(
                        path=infit.Cycle(
                            globals.SAM_CYMBALS_MIDDLE_AGGRESSIVE),
                        pitch_factor=infit.Uniform(2, 5),
                        resonance_filter_bandwidth=infit.Uniform(0.5, 2),
                        resonance_filter_octave=infit.Cycle((2, 3, 4, 1, 2)),
                        glissando_direction=True,
                        glissando_duration=infit.Uniform(0.001, 0.2),
                        glissando_offset=infit.Uniform(0, 0.1),
                        glissando_size=infit.Gaussian(1, 0.2),
                    ),
                )),
                likelihood_range=(0.75, 0.225),
                volume_range=(0.1, 0.5),
                ignore_beats_occupied_by_voice=False,
            ),
            percussion.Rhythmizer(
                voice_meters2occupy=(1, ),
                chord=infit.Cycle((
                    harmony.find_harmony(name="A", gender=gender),
                    harmony.find_harmony(name="C", gender=gender),
                )),
                sample_maker=infit.Cycle((
                    percussion.ResonanceSample(
                        path=infit.Cycle(globals.SAM_CYMBALS_BIG_CLOSE),
                        pitch_factor=infit.Gaussian(3, 5),
                        resonance_filter_bandwidth=infit.Gaussian(0.8, 0.5),
                        resonance_filter_octave=infit.Cycle((2, )),
                        glissando_direction=True,
                        glissando_duration=infit.Uniform(0.001, 0.3),
                        glissando_offset=0,
                        glissando_size=infit.Gaussian(1, 0.2),
                    ),
                    percussion.ResonanceSample(
                        path=infit.Cycle(
                            globals.SAM_CYMBALS_MIDDLE_CLOSE_LOUD),
                        pitch_factor=infit.Gaussian(3, 4),
                        resonance_filter_bandwidth=infit.Uniform(0.5, 1),
                        resonance_filter_octave=infit.Cycle((2, )),
                        glissando_direction=True,
                        glissando_duration=infit.Uniform(0.001, 0.2),
                        glissando_offset=0,
                        glissando_size=infit.Gaussian(1, 0.1),
                    ),
                )),
                likelihood_range=(0.6, 0.1),
                volume_range=(0.1, 0.8),
                ignore_beats_occupied_by_voice=False,
            ),
            percussion.Rhythmizer(
                voice_meters2occupy=(0, 1, 2),
                chord=infit.Cycle((harmony.find_harmony(name="B",
                                                        gender=gender), )),
                sample_maker=infit.Cycle((
                    percussion.Sample(
                        path=infit.Cycle(
                            globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND),
                        frequency=globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND.
                        information["frequency"],
                        pitch_factor=infit.Cycle((2, 4, 8, 4)),
                        glissando_direction=True,
                        glissando_duration=infit.Uniform(0.001, 0.2),
                        glissando_offset=infit.Uniform(0, 0.1),
                        glissando_size=infit.Gaussian(1, 0.2),
                    ),
                    percussion.Sample(
                        path=infit.Cycle(
                            globals.SAM_KENDANG_LOW_LOW_CLOSE_HAND),
                        frequency=globals.SAM_KENDANG_LOW_LOW_CLOSE_HAND.
                        information["frequency"],
                        pitch_factor=infit.Cycle((16, 8, 4, 8, 2)),
                        glissando_direction=True,
                        glissando_duration=infit.Uniform(0.001, 0.2),
                        glissando_offset=infit.Uniform(0, 0.1),
                        glissando_size=infit.Gaussian(1, 0.2),
                    ),
                    percussion.Sample(
                        path=infit.Cycle(
                            globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND),
                        frequency=globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND.
                        information["frequency"],
                        pitch_factor=infit.Cycle((8, 4, 2, 4)),
                        glissando_direction=True,
                        glissando_duration=infit.Uniform(0.001, 0.2),
                        glissando_offset=infit.Uniform(0, 0.1),
                        glissando_size=infit.Gaussian(1, 0.2),
                    ),
                    percussion.Sample(
                        path=infit.Cycle(
                            globals.SAM_KENDANG_HIGH_LOW_CLOSE_HAND),
                        frequency=globals.SAM_KENDANG_HIGH_LOW_CLOSE_HAND.
                        information["frequency"],
                        pitch_factor=infit.Cycle((8, 16, 8, 4, 8, 2)),
                        glissando_direction=True,
                        glissando_duration=infit.Uniform(0.001, 0.2),
                        glissando_offset=infit.Uniform(0, 0.1),
                        glissando_size=infit.Gaussian(1, 0.2),
                    ),
                )),
                likelihood_range=(0.1, 0.5),
                volume_range=(0.1, 0.5),
                ignore_beats_occupied_by_voice=False,
            ),
        ),
        speech_init_attributes={},
        include_glitter=True,
        include_diva=True,
        include_natural_radio=True,
        include_percussion=True,
        radio_silent_channels=tuple([]),
        tracks2ignore=("speech0", "speech1", "speech2"),
        radio_samples=(
            globals.SAM_RADIO_ITALY[-1],
            globals.SAM_RADIO_BIELEFELD[-1],
        ),
        radio_n_changes=8,
        radio_average_volume=0.45,
        radio_shadow_time=0.08,
        radio_min_volume=0.955,
    ), )
Ejemplo n.º 26
0
def make(name: str = "ONE", gender=False, group=0, sub_group0=0):
    return (
        # with activity level
        segments.FreeStyleCP(
            "{}_0".format(name),
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(3, 2), ji.r(3, 1),
                                                    ji.r(5, 4)),
            decision_type="activity",
            energy_per_voice=(7, 10, 6),
            weight_range=(4, 10),
            metrical_numbers=(12, 6, 18),
            silence_decider_per_voice=(
                infit.ActivityLevel(1),
                infit.ActivityLevel(1),
                infit.ActivityLevel(1),
            ),
            group=(group, sub_group0, 2),
            start_harmony=harmony.find_harmony("A",
                                               True,
                                               0,
                                               tuple([]),
                                               gender=gender),
            gender=gender,
            n_bars=3,
            duration_per_bar=10,
            start=2,
            dynamic_range_of_voices=(0.2, 0.45),
            anticipation_time=0.2,
            overlaying_time=0.25,
            cp_add_dissonant_pitches_to_nth_voice=(False, True, False),
            glitter_include_dissonant_pitches=True,
            pteq_engine_per_voice=(
                pteq.mk_super_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Value(0.2),
                    fxp='"pbIII/fxp/VibraphoneV-BHumanizednostretching.fxp"',
                    preset=None,
                    sustain_pedal=1,
                ),
                pteq.mk_dreamy_pte(
                    modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                    empty_attack_dynamic_maker=infit.Value(0.2),
                ),
                pteq.mk_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Value(0.2)),
            ),
            percussion_engine_per_voice=(
                percussion.Rhythmizer(
                    voice_meters2occupy=(0, ),
                    sample_maker=infit.Cycle((
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_LOW_LOW_FAR_MALLET),
                            frequency=globals.SAM_KENDANG_LOW_LOW_FAR_MALLET.
                            information["frequency"],
                            pitch_factor=infit.Cycle((0.5, 1, 0.25, 1)),
                            distortion=infit.Uniform(0, 1),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_LOW_FAR_MALLET),
                            frequency=globals.SAM_KENDANG_HIGH_LOW_FAR_MALLET.
                            information["frequency"],
                            pitch_factor=infit.Cycle((0.5, 1, 0.25, 1)),
                            distortion=infit.Uniform(0, 1),
                        ),
                    )),
                    likelihood_range=(0.3, 1),
                    volume_range=(0.1, 0.8),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(1, ),
                    sample_maker=infit.Cycle((
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_LOW_LOW_FAR_MALLET),
                            frequency=globals.SAM_KENDANG_LOW_LOW_FAR_MALLET.
                            information["frequency"],
                            pitch_factor=infit.Cycle((0.5, 0.5, 1, 0.25, 1)),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_LOW_FAR_MALLET),
                            frequency=globals.SAM_KENDANG_HIGH_LOW_FAR_MALLET.
                            information["frequency"],
                            pitch_factor=infit.Cycle((0.5, 1, 0.25, 1)),
                            distortion=infit.Uniform(0, 1),
                        ),
                    )),
                    likelihood_range=(0.3, 1),
                    volume_range=(0.1, 0.8),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(2, ),
                    sample_maker=infit.Cycle((
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_LOW_LOW_FAR_MALLET),
                            frequency=globals.SAM_KENDANG_LOW_LOW_FAR_MALLET.
                            information["frequency"],
                            pitch_factor=infit.Cycle((0.5, 1, 0.25, 1)),
                            distortion=infit.Uniform(0, 1),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_LOW_FAR_MALLET),
                            frequency=globals.SAM_KENDANG_HIGH_LOW_FAR_MALLET.
                            information["frequency"],
                            pitch_factor=infit.Cycle((0.5, 1, 0.25, 1)),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_LOW_FAR_HAND),
                            frequency=globals.SAM_KENDANG_HIGH_LOW_FAR_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((1, 1, 0.5, 1)),
                        ),
                    )),
                    likelihood_range=(0.3, 1),
                    volume_range=(0.1, 0.8),
                    ignore_beats_occupied_by_voice=False,
                ),
            ),
            speech_init_attributes={},
            include_glitter=True,
            include_diva=False,
            include_natural_radio=True,
            voices_overlaying_time=5,
            radio_silent_channels=(1, 3, 5),
            radio_samples=(
                "pbIII/samples/radio/carolina/3.wav",
                "pbIII/samples/radio/carolina/1.wav",
            ),
            radio_n_changes=1,
            radio_average_volume=0.095,
            radio_shadow_time=0.085,
            radio_min_volume=0.825,
        ), )
Ejemplo n.º 27
0
    def __init__(
        self,
        sources: tuple,
        order_per_source: tuple = None,
        skip_n_samples_per_source: tuple = None,
        source_decider: tuple = None,
        activity_lv_per_effect: dict = {},
        level_per_effect: dict = {},
        volume: float = 1,
        curve: interpolations.InterpolationLine = interpolations.
        InterpolationLine([
            interpolations.FloatInterpolationEvent(0.15, 0.5),
            interpolations.FloatInterpolationEvent(0.8, 1),
            interpolations.FloatInterpolationEvent(0.2, 1),
            interpolations.FloatInterpolationEvent(0, 0.2),
        ]),
        duration: float = 10,
        interlocking: str = "parallel",
        pause_per_event: infit.InfIt = infit.Cycle((0, )),
        filter_freq_maker: infit.InfIt = infit.Cycle((200, )),
        filter_q_maker: infit.InfIt = infit.Cycle((0.5, )),
        rm_freq_maker: infit.InfIt = infit.Cycle((700, )),
        transpo_maker: infit.InfIt = infit.Cycle((-3, -1, -2, -5)),
        chenlee_chaos_maker: infit.InfIt = infit.Cycle((0.75, 1, 0.5, 0.8)),
        chenlee_pitch_maker: infit.InfIt = infit.Cycle((0.5, 0.75, 0.66)),
        lorenz_chaos_maker: infit.InfIt = infit.Cycle((0.5, 0.7, 0.6)),
        lorenz_pitch_maker: infit.InfIt = infit.Cycle((0.5, 0.6, 0.55)),
    ) -> None:

        super().__init__()

        if order_per_source is None:
            order_per_source = tuple("original" for i in sources)

        if source_decider is None:
            source_decider = infit.Cycle(range(len(sources)))

        if skip_n_samples_per_source is None:
            skip_n_samples_per_source = tuple(0 for i in sources)

        self.sources = sources
        self.interlocking = interlocking
        self.pause_per_event = pause_per_event
        self.order_per_source = order_per_source
        self.skip_n_samples_per_source = skip_n_samples_per_source
        self.volume = volume
        self.curve = curve
        self.__duration = duration
        self.source_decider = source_decider
        self.filter_q_maker = filter_q_maker
        self.filter_freq_maker = filter_freq_maker
        self.rm_freq_maker = rm_freq_maker
        self.transpo_maker = transpo_maker
        self.chenlee_chaos_maker = chenlee_chaos_maker
        self.chenlee_pitch_maker = chenlee_pitch_maker
        self.lorenz_chaos_maker = lorenz_chaos_maker
        self.lorenz_pitch_maker = lorenz_pitch_maker

        for effect in self.__effects:
            if effect not in activity_lv_per_effect:
                activity_lv_per_effect.update({effect: 0})

            if effect not in level_per_effect:
                level_per_effect.update({effect: infit.Cycle((1, ))})

        self.level_per_effect = level_per_effect
        self.activity_lv_per_effect = activity_lv_per_effect

        self.path_per_source = BrokenRadio.detect_files(
            self.sources, order_per_source, skip_n_samples_per_source)
        self.data_per_source = BrokenRadio.detect_data_per_source(
            self.path_per_source)
        self.activity_object_per_effect = {
            effect: activity_levels.ActivityLevel()
            for effect in self.__effects
        }

        if interlocking == "parallel":
            self.maxima_n_events = min(
                len(paths) for paths in self.path_per_source)
        elif interlocking == "sequential":
            self.maxima_n_events = sum(
                len(paths) for paths in self.path_per_source)
        else:
            raise ValueError("Unknown interlocking: {}.".format(interlocking))

        if interlocking == "parallel":
            self.sample_key_per_event = tuple(
                (next(self.source_decider), idx)
                for idx in range(self.maxima_n_events))

        elif interlocking == "sequential":
            self.sample_key_per_event = tools.euclidic_interlocking(*tuple(
                tuple((idx, i) for i in range(len(source)))
                for idx, source in enumerate(self.path_per_source)))

        self.sample_path_per_event = tuple(
            self.path_per_source[source_idx][sample_idx]
            for source_idx, sample_idx in self.sample_key_per_event)
        ig1 = operator.itemgetter(1)
        self.duration_per_sample = tuple(
            ig1(self.data_per_source[source_idx][sample_idx])
            for source_idx, sample_idx in self.sample_key_per_event)

        self.duration_per_event = tuple(dps - 1 + next(pause_per_event)
                                        for dps in self.duration_per_sample)
        self.maxima_duration = sum(self.duration_per_event)

        try:
            assert self.maxima_duration > self.duration
        except AssertionError:
            msg = "Not enough samples for duration {}. Max duration {}".format(
                self.duration, self.maxima_duration)
            raise ValueError(msg)
Ejemplo n.º 28
0
def main() -> versemaker.Verse:
    vm = versemaker.VerseMaker(
        59,
        "closing",
        tempo_factor=0.31,
        octave_of_first_pitch=-1,
        harmonic_tolerance=0.89,
        ro_temperature=0.685,
        ro_density=0.8,
        harmonic_pitches_tonality_flux_maximum_octave_difference_from_melody_pitch=(
            1,
            0,
        ),
        harmonic_pitches_complex_interval_helper_maximum_octave_difference_from_melody_pitch=(
            1,
            0,
        ),
        area_density_maker=infit.Gaussian(0.35, 0.1),
        area_density_reference_size=F(1, 2),
        area_min_split_size=F(1, 8),
    )

    vm.remove_area(0, 1)
    # vm.remove_area(30, len(vm.bars))
    # vm.remove_area(len(vm.bars) - 2, len(vm.bars) + 1)
    vm.add_bar(5, abjad.TimeSignature((3, 4)))
    vm.add_bar(9, abjad.TimeSignature((2, 4)))
    vm.add_bar(23, abjad.TimeSignature((1, 4)))
    vm.add_bar(25, abjad.TimeSignature((2, 4)))
    # vm.add_bar(26, abjad.TimeSignature((1, 4)))

    vm.attach(
        violin=strings.SimpleStringMaker(
            globals_.VIOLIN,
            pizz_maker=infit.ActivityLevel(5, start_at=0),
            tremolo_maker=infit.ActivityLevel(0),
            acciaccatura_maker=infit.ActivityLevel(5),
            force_acciaccatura_to_glissando_maker=infit.ActivityLevel(0),
            acciaccatura_glissando_size_maker=infit.Cycle((0, 1, 0)),
            harmonic_pitches_activity=0.3,
            harmonic_pitches_density=0.7,
            shall_add_optional_pitches=True,
            optional_pitches_maximum_octave_difference_from_melody_pitch=(1, 0),
            optional_pitches_min_size=F(3, 16),
            optional_pitches_density=0.75,
            after_glissando_size=F(1, 8),
        ),
        viola=strings.SimpleStringMaker(
            globals_.VIOLA,
            tremolo_maker=infit.ActivityLevel(0),
            pizz_maker=infit.ActivityLevel(5, start_at=0),
            acciaccatura_maker=infit.ActivityLevel(5),
            force_acciaccatura_to_glissando_maker=infit.ActivityLevel(0),
            acciaccatura_glissando_size_maker=infit.Cycle((0, 1, 0, 1, 0, 0, 0)),
            harmonic_pitches_activity=0.4,
            harmonic_pitches_density=0.75,
            shall_add_optional_pitches=True,
            optional_pitches_maximum_octave_difference_from_melody_pitch=(1, 0),
            optional_pitches_min_size=F(3, 16),
            optional_pitches_density=0.75,
        ),
        cello=strings.SimpleStringMaker(
            globals_.CELLO,
            tremolo_maker=infit.ActivityLevel(0),
            pizz_maker=infit.ActivityLevel(0),
            force_acciaccatura_to_glissando_maker=infit.ActivityLevel(0),
            acciaccatura_glissando_size_maker=infit.Cycle((0, 1, 0, 1, 0)),
            shall_add_optional_pitches=True,
            acciaccatura_maker=infit.ActivityLevel(5),
            harmonic_pitches_activity=0.35,
            harmonic_pitches_density=0.7,
            optional_pitches_maximum_octave_difference_from_melody_pitch=(1, 0),
            optional_pitches_min_size=F(3, 16),
            optional_pitches_density=0.7,
            after_glissando_size=F(1, 8),
        ),
        keyboard=keyboard.KeyboardMaker(
            lh_min_volume=0.68,
            lh_max_volume=0.79,
            lh_min_metricity_to_add_harmony=0,
            lh_min_metricity_to_add_accent=10,
            lh_max_metricity_for_arpeggio=0.3,
            lh_min_metricity_to_add_restricted_harmony=0,
            lh_prohibit_repetitions=False,
            lh_add_repetitions_avoiding_notes=False,
            rh_likelihood_making_harmony=1,
            harmonies_max_difference=1200,
            harmonies_min_difference=250,
            colotomic_structure=(1, 2, 2, 2),
        ),
    )

    _adapt_violin(vm.violin.musdat[1], vm)
    _adapt_viola(vm.viola.musdat[1], vm)
    _adapt_cello(vm.cello.musdat[1], vm)
    _adapt_keyboard(vm.keyboard.musdat[2], vm.keyboard.musdat[1], vm)

    # vm.add_bar(33, abjad.TimeSignature((2, 4)), force_adding=True)

    # _adapt_left_hand(vm.keyboard.musdat[2], vm)

    for string in (vm.violin.musdat[1], vm.viola.musdat[1], vm.cello.musdat[1]):
        tw.detach_hauptstimme(string)
        tw.detach_optional_events(string)

    for instr in (
        vm.violin.musdat[1],
        vm.viola.musdat[1],
        vm.cello.musdat[1],
        vm.keyboard.musdat[2],
        vm.keyboard.musdat[1],
    ):
        tw.detach_optional_events(instr)

    verse = vm()

    for instr in ("violin", "viola", "cello", "keyboard"):
        if instr == "keyboard":
            indices = ((1, 0), (1, 1))
        else:
            indices = ((1,),)

        for idx in indices:
            staff = getattr(verse, instr).abjad
            for subidx in idx:
                staff = staff[subidx]

            """
            # adapting accidental notation of keyboard
            if instr == "keyboard" and idx[1] == 1:
                abjad.Accidental.respell_with_sharps(staff[6][3:])
                abjad.Accidental.respell_with_sharps(staff[7])
                abjad.Accidental.respell_with_sharps(staff[8])
                abjad.Accidental.respell_with_sharps(staff[18])
                abjad.Accidental.respell_with_sharps(staff[19])
                abjad.Accidental.respell_with_sharps(staff[20])
            """

            if instr == "violin":
                # abjad.attach(abjad.Dynamic('ppp'), staff[0][0])
                abjad.attach(abjad.StartHairpin(), staff[2][0])
                abjad.attach(abjad.Dynamic("p"), staff[3][0])
                abjad.attach(abjad.StartHairpin(">"), staff[3][6])
                abjad.attach(abjad.Dynamic("ppp"), staff[4][2])
                abjad.attach(abjad.StartHairpin(">"), staff[6][2])
                abjad.attach(abjad.Dynamic("pppp"), staff[7][0])
                # abjad.attach(
                #     abjad.StringContactPoint("sul tasto").markup, staff[7][0],
                # )
                # abjad.attach(
                #     abjad.StringContactPoint("ordinario").markup, staff[8][0],
                # )
                # abjad.attach(
                #     abjad.StringContactPoint("sul tasto").markup, staff[9][0],
                # )
                abjad.attach(abjad.Dynamic("pp"), staff[12][2])
                abjad.attach(abjad.Fermata(), staff[16][2])
                abjad.attach(abjad.Dynamic("p"), staff[17][0])
                abjad.attach(abjad.Dynamic("pppp"), staff[17][2])
                abjad.attach(abjad.StartHairpin(), staff[18][1])
                abjad.attach(abjad.Dynamic("p"), staff[19][0])
                abjad.attach(abjad.Dynamic("pp"), staff[22][-1])
                abjad.attach(abjad.Dynamic("p"), staff[30][2])
                abjad.attach(abjad.StartHairpin(">"), staff[31][-1])
                abjad.attach(abjad.Dynamic("pppp"), staff[33][0])
                # abjad.attach(FLAUTANDO, staff[33][0])

            elif instr == "viola":
                abjad.attach(abjad.StartHairpin(), staff[2][0])
                abjad.attach(abjad.Dynamic("pp"), staff[3][0])
                abjad.attach(abjad.StartHairpin(">"), staff[3][3])
                abjad.attach(abjad.Dynamic("ppp"), staff[4][1])
                abjad.attach(abjad.Dynamic("pppp"), staff[7][0])
                # abjad.attach(
                #     abjad.StringContactPoint("sul tasto").markup, staff[8][0],
                # )
                abjad.attach(abjad.Dynamic("pp"), staff[12][2])
                abjad.attach(abjad.Fermata(), staff[16][2])
                abjad.attach(abjad.Dynamic("p"), staff[17][0])
                abjad.attach(abjad.Dynamic("pp"), staff[18][2])
                abjad.attach(abjad.StartHairpin(), staff[18][2])
                abjad.attach(abjad.Dynamic("p"), staff[19][0])
                abjad.attach(abjad.Dynamic("pp"), staff[23][0])
                abjad.attach(abjad.Dynamic("p"), staff[30][1])
                abjad.attach(abjad.StartHairpin(">"), staff[31][-1])
                abjad.attach(abjad.Dynamic("pppp"), staff[33][0])
                # abjad.attach(FLAUTANDO, staff[33][0])

            elif instr == "cello":
                abjad.attach(abjad.StartHairpin(), staff[2][0])
                abjad.attach(abjad.Dynamic("pp"), staff[3][0])
                # abjad.attach(abjad.Dynamic('pp'), staff[2][0])
                abjad.attach(abjad.StartHairpin(">"), staff[3][5])
                abjad.attach(abjad.Dynamic("ppp"), staff[4][1])
                abjad.attach(abjad.StartHairpin(">"), staff[6][1])
                abjad.attach(abjad.Dynamic("pppp"), staff[7][0])
                abjad.attach(
                    abjad.StringContactPoint("sul tasto"), staff[8][0],
                )
                abjad.attach(abjad.Dynamic("pp"), staff[12][2])
                abjad.attach(abjad.Fermata(), staff[16][2])
                abjad.attach(abjad.Dynamic("p"), staff[17][0])
                abjad.attach(abjad.Dynamic("ppp"), staff[18][0])
                abjad.attach(abjad.StartHairpin(), staff[18][0])
                abjad.attach(abjad.Dynamic("p"), staff[19][0])
                abjad.attach(abjad.Dynamic("pp"), staff[23][0])
                abjad.attach(abjad.Dynamic("ppp"), staff[24][5])
                abjad.attach(abjad.Dynamic("pp"), staff[26][0])
                abjad.attach(abjad.Dynamic("ppp"), staff[29][0])
                abjad.attach(abjad.Dynamic("pp"), staff[29][4])
                abjad.attach(abjad.Dynamic("p"), staff[30][1])
                abjad.attach(abjad.StartHairpin(">"), staff[31][4])
                abjad.attach(abjad.Dynamic("pppp"), staff[33][0])

                abjad.attach(abjad.Fermata("longfermata"), staff[-1][-1])

                abjad.detach(globals_.NONVIB_MARKUP, staff[0][0])
                abjad.detach(globals_.CON_SORDINO_MARKUP, staff[0][0])
                abjad.attach(globals_.NONVIB_MARKUP, staff[0][1])
                abjad.attach(globals_.CON_SORDINO_MARKUP, staff[0][1])

                # abjad.attach(FLAUTANDO, staff[33][0])

            elif instr == "keyboard":
                if idx[1] == 1:
                    abjad.attach(abjad.Dynamic("pp"), staff[2][0])
                    abjad.attach(abjad.Dynamic("ppp"), staff[7][0])
                    abjad.attach(abjad.Dynamic("p"), staff[11][0])
                    abjad.attach(abjad.Dynamic("pp"), staff[12][1])
                    abjad.attach(abjad.Dynamic("p"), staff[18][1])
                    abjad.attach(abjad.Dynamic("pp"), staff[26][3])
                    abjad.attach(abjad.Dynamic("ppp"), staff[27][1])
                    abjad.attach(abjad.Dynamic("pp"), staff[30][0])
                    abjad.attach(abjad.Dynamic("p"), staff[31][0])
                    abjad.attach(abjad.StartHairpin(">"), staff[32][1])
                    abjad.attach(abjad.Dynamic("ppp"), staff[33][0])

                    abjad.attach(abjad.Fermata(), staff[16][1])
                else:
                    abjad.attach(abjad.Fermata(), staff[16][1])

            abjad.attach(abjad.Dynamic("ppp"), staff[0][0])

    return verse
Ejemplo n.º 29
0
def make(name: str = "TWO", gender=False, group=0, sub_group0=1):
    return (
        segments.FreeStyleCP(
            "{}_0".format(name),
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(5, 1), ji.r(9, 4),
                                                    ji.r(16, 11)),
            decision_type="activity",
            energy_per_voice=(9, 7, 7),
            weight_range=(4, 10),
            metrical_numbers=(12, 9, 12),
            silence_decider_per_voice=(
                infit.ActivityLevel(2),
                infit.ActivityLevel(1),
                infit.ActivityLevel(2),
            ),
            group=(group, sub_group0, 0),
            start_harmony=harmony.find_harmony("A",
                                               True,
                                               0,
                                               tuple([]),
                                               gender=gender),
            gender=gender,
            n_bars=2,
            duration_per_bar=13,
            start=0,
            dynamic_range_of_voices=(0.2, 0.5),
            anticipation_time=0.01,
            overlaying_time=0.25,
            cp_add_dissonant_pitches_to_nth_voice=(True, True, True),
            glitter_include_dissonant_pitches=True,
            pteq_engine_per_voice=(
                pteq.mk_super_soft_trippy_pte(
                    empty_attack_dynamic_maker=infit.Value(0.2),
                    fxp='"pbIII/fxp/VibraphoneV-BHumanizednostretching.fxp"',
                    preset=None,
                    sustain_pedal=0,
                ),
                pteq.mk_dreamy_pte(
                    # modulator=(ornamentations.SoftLineGlissandoMaker(),),
                    convert_dissonant_tones2glissandi=True,
                    empty_attack_dynamic_maker=infit.Value(0.2),
                ),
                pteq.mk_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Value(0.2),
                    convert_dissonant_tones2glissandi=True,
                ),
            ),
            speech_init_attributes={},
            percussion_engine_per_voice=(
                percussion.Rhythmizer(
                    voice_meters2occupy=(0, ),
                    chord=infit.Cycle((
                        harmony.find_harmony(name="A", gender=gender),
                        harmony.find_harmony(name="C", gender=gender),
                    )),
                    sample_maker=infit.Cycle((
                        percussion.ResonanceSample(
                            path=infit.Cycle(
                                globals.SAM_CYMBALS_BIG_AGGRESSIVE),
                            pitch_factor=infit.Uniform(2, 6),
                            resonance_filter_bandwidth=infit.Uniform(0.4, 2),
                            resonance_filter_octave=infit.Cycle(
                                (2, 4, 3, 4, 1, 2)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.ResonanceSample(
                            path=infit.Cycle(
                                globals.SAM_CYMBALS_MIDDLE_AGGRESSIVE),
                            pitch_factor=infit.Uniform(2, 5),
                            resonance_filter_bandwidth=infit.Uniform(0.5, 2),
                            resonance_filter_octave=infit.Cycle(
                                (2, 3, 4, 1, 2)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                    )),
                    likelihood_range=(0.5, 0.1),
                    volume_range=(0.1, 0.5),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(1, ),
                    chord=infit.Cycle((
                        harmony.find_harmony(name="A", gender=gender),
                        harmony.find_harmony(name="C", gender=gender),
                    )),
                    sample_maker=infit.Cycle((
                        percussion.ResonanceSample(
                            path=infit.Cycle(globals.SAM_CYMBALS_BIG_CLOSE),
                            pitch_factor=infit.Gaussian(3, 5),
                            resonance_filter_bandwidth=infit.Gaussian(
                                0.8, 0.5),
                            resonance_filter_octave=infit.Cycle((2, )),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.3),
                            glissando_offset=0,
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.ResonanceSample(
                            path=infit.Cycle(
                                globals.SAM_CYMBALS_MIDDLE_CLOSE_LOUD),
                            pitch_factor=infit.Gaussian(3, 4),
                            resonance_filter_bandwidth=infit.Uniform(0.5, 1),
                            resonance_filter_octave=infit.Cycle((2, )),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=0,
                            glissando_size=infit.Gaussian(1, 0.1),
                        ),
                    )),
                    likelihood_range=(0.6, 0.1),
                    volume_range=(0.1, 0.8),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(0, 1, 2),
                    chord=infit.Cycle((harmony.find_harmony(name="B",
                                                            gender=gender), )),
                    sample_maker=infit.Cycle((
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND),
                            frequency=globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((2, 4, 8, 4)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_LOW_LOW_CLOSE_HAND),
                            frequency=globals.SAM_KENDANG_LOW_LOW_CLOSE_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((16, 8, 4, 8, 2)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND),
                            frequency=globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((8, 4, 2, 4)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_LOW_CLOSE_HAND),
                            frequency=globals.SAM_KENDANG_HIGH_LOW_CLOSE_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((8, 16, 8, 4, 8, 2)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                    )),
                    likelihood_range=(0.1, 0.5),
                    volume_range=(0.1, 0.5),
                    ignore_beats_occupied_by_voice=False,
                ),
            ),
            include_glitter=True,
            include_diva=False,
            include_natural_radio=True,
            include_percussion=True,
            voices_overlaying_time=5,
            radio_samples=(
                globals.SAM_RADIO_ITALY[-1],
                globals.SAM_RADIO_BIELEFELD[-1],
            ),
            radio_n_changes=8,
            radio_average_volume=0.1,
            radio_shadow_time=0.01,
            radio_min_volume=0.825,
        ),
        segments.Chord(
            "{}_Bell2".format(name),
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(12, 1), ji.r(2, 1),
                                                    ji.r(15, 8)),
            group=(group, sub_group0, 1),
            chord=harmony.find_harmony(name="A", idx=0, gender=gender),
            gender=gender,
            n_bars=1,
            duration_per_bar=8,
            start=4,
            dynamic_range_of_voices=(0.7, 0.9),
            anticipation_time=0.2,
            overlaying_time=1.25,
            glitter_modulater_per_voice=("randomh", "randomh", "randomh"),
            pteq_engine_per_voice=(
                pteq.mk_bright_bell(
                    fxp='"pbIII/fxp/Bells_no_stretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
                pteq.mk_bright_bell(
                    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
                pteq.mk_bright_bell(
                    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
            ),
            # speech_init_attributes={
            #     # "speech0": {
            #     #     "start": 0.3,
            #     #     "duration": 12.5,
            #     #     "sound_engine": speech.Sampler(
            #     #         globals.SAM_RADIO_CAROLINA[1], volume=0.6
            #     #     ),
            #     # },
            #     # "speech2": {
            #     #     "start": -0.3,
            #     #     "duration": 12.5,
            #     #     "sound_engine": speech.Sampler(
            #     #         globals.SAM_RADIO_ROEHRENRADIO_CLOSE_MITTELWELLE[-1], volume=0.6
            #     #     ),
            #     # },
            # },
            include_glitter=False,
            include_diva=False,
            include_natural_radio=False,
            include_percussion=False,
        ),
        segments.FreeStyleCP(
            "{}_1".format(name),
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(5, 1), ji.r(9, 4),
                                                    ji.r(16, 11)),
            decision_type="activity",
            energy_per_voice=(9, 6, 7),
            weight_range=(4, 10),
            metrical_numbers=(13, 9, 13),
            silence_decider_per_voice=(
                infit.ActivityLevel(2),
                infit.ActivityLevel(1),
                infit.ActivityLevel(2),
            ),
            group=(group, sub_group0, 1),
            start_harmony=harmony.find_harmony("A",
                                               True,
                                               0,
                                               tuple([]),
                                               gender=gender),
            gender=gender,
            n_bars=2,
            duration_per_bar=15,
            start=-3.8,
            dynamic_range_of_voices=(0.2, 0.4),
            anticipation_time=0.01,
            overlaying_time=0.25,
            cp_add_dissonant_pitches_to_nth_voice=(True, True, True),
            glitter_include_dissonant_pitches=True,
            pteq_engine_per_voice=(
                pteq.mk_super_soft_trippy_pte(
                    empty_attack_dynamic_maker=infit.Value(0.2),
                    fxp='"pbIII/fxp/VibraphoneV-BHumanizednostretching.fxp"',
                    preset=None,
                    sustain_pedal=0,
                ),
                pteq.mk_dreamy_pte(
                    # modulator=(ornamentations.SoftLineGlissandoMaker(),),
                    convert_dissonant_tones2glissandi=True,
                    empty_attack_dynamic_maker=infit.Value(0.2),
                ),
                pteq.mk_dreamy_pte(
                    empty_attack_dynamic_maker=infit.Value(0.2),
                    convert_dissonant_tones2glissandi=True,
                ),
            ),
            speech_init_attributes={},
            percussion_engine_per_voice=(
                percussion.Rhythmizer(
                    voice_meters2occupy=(0, ),
                    chord=infit.Cycle((
                        harmony.find_harmony(name="A", gender=gender),
                        harmony.find_harmony(name="C", gender=gender),
                    )),
                    sample_maker=infit.Cycle((
                        percussion.ResonanceSample(
                            path=infit.Cycle(
                                globals.SAM_CYMBALS_BIG_AGGRESSIVE),
                            pitch_factor=infit.Uniform(2, 6),
                            resonance_filter_bandwidth=infit.Uniform(0.4, 2),
                            resonance_filter_octave=infit.Cycle(
                                (2, 4, 3, 4, 1, 2)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.ResonanceSample(
                            path=infit.Cycle(
                                globals.SAM_CYMBALS_MIDDLE_AGGRESSIVE),
                            pitch_factor=infit.Uniform(2, 5),
                            resonance_filter_bandwidth=infit.Uniform(0.5, 2),
                            resonance_filter_octave=infit.Cycle(
                                (2, 3, 4, 1, 2)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                    )),
                    likelihood_range=(0.5, 0.1),
                    volume_range=(0.1, 0.5),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(1, ),
                    chord=infit.Cycle((
                        harmony.find_harmony(name="A", gender=gender),
                        harmony.find_harmony(name="C", gender=gender),
                    )),
                    sample_maker=infit.Cycle((
                        percussion.ResonanceSample(
                            path=infit.Cycle(globals.SAM_CYMBALS_BIG_CLOSE),
                            pitch_factor=infit.Gaussian(3, 5),
                            resonance_filter_bandwidth=infit.Gaussian(
                                0.8, 0.5),
                            resonance_filter_octave=infit.Cycle((2, )),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.3),
                            glissando_offset=0,
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.ResonanceSample(
                            path=infit.Cycle(
                                globals.SAM_CYMBALS_MIDDLE_CLOSE_LOUD),
                            pitch_factor=infit.Gaussian(3, 4),
                            resonance_filter_bandwidth=infit.Uniform(0.5, 1),
                            resonance_filter_octave=infit.Cycle((2, )),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=0,
                            glissando_size=infit.Gaussian(1, 0.1),
                        ),
                    )),
                    likelihood_range=(0.6, 0.1),
                    volume_range=(0.1, 0.8),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(0, 1, 2),
                    chord=infit.Cycle((harmony.find_harmony(name="B",
                                                            gender=gender), )),
                    sample_maker=infit.Cycle((
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND),
                            frequency=globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((2, 4, 8, 4)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_LOW_LOW_CLOSE_HAND),
                            frequency=globals.SAM_KENDANG_LOW_LOW_CLOSE_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((16, 8, 4, 8, 2)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND),
                            frequency=globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((8, 4, 2, 4)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_LOW_CLOSE_HAND),
                            frequency=globals.SAM_KENDANG_HIGH_LOW_CLOSE_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((8, 16, 8, 4, 8, 2)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                    )),
                    likelihood_range=(0.1, 0.5),
                    volume_range=(0.1, 0.5),
                    ignore_beats_occupied_by_voice=False,
                ),
            ),
            include_glitter=True,
            include_diva=False,
            include_natural_radio=True,
            include_percussion=True,
            voices_overlaying_time=5,
            radio_samples=(
                globals.SAM_RADIO_ITALY[-1],
                globals.SAM_RADIO_BIELEFELD[-1],
            ),
            radio_n_changes=8,
            radio_average_volume=0.1,
            radio_shadow_time=0.01,
            radio_min_volume=0.825,
        ),
    )
Ejemplo n.º 30
0
def make(name: str = "ONE", gender=True, group=0, sub_group0=0):
    return (
        segments.MelodicCP(
            "{}_0".format(name),
            volume_envelope=interpolations.InterpolationLine([
                interpolations.FloatInterpolationEvent(11, 1),
                interpolations.FloatInterpolationEvent(4, 1),
                interpolations.FloatInterpolationEvent(0, 0.4),
            ]),
            volume_envelope_per_track={
                "voiceP0":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(4, 0.7),
                    interpolations.FloatInterpolationEvent(6, 1.1),
                    interpolations.FloatInterpolationEvent(2, 1.1),
                    interpolations.FloatInterpolationEvent(0, 0.4),
                ]),
                "divaP0":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(4, 0.4),
                    interpolations.FloatInterpolationEvent(6, 1),
                    interpolations.FloatInterpolationEvent(2, 1),
                    interpolations.FloatInterpolationEvent(0, 0),
                ]),
                "voiceP1":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(2, 0),
                    interpolations.FloatInterpolationEvent(0, 1),
                ]),
                "voiceP2":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(3, 0),
                    interpolations.FloatInterpolationEvent(0, 1),
                ]),
            },
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(2, 1), ji.r(3, 1),
                                                    ji.r(5, 4)),
            random_seed=1000,
            group=(group, sub_group0, 0),
            action_per_voice=(0.94, 0.93),
            sound_per_voice=(0.89, 0.87),
            phrases=(0, ),
            melody_register=1,
            melodic_weight=0,
            weight_range=(0.3, 1),
            harmonicity_range=(0.25, 1),
            gender=gender,
            duration_per_bar=13,
            start=0,
            dynamic_range_of_voices=(0.4, 0.75),
            anticipation_time=3,
            overlaying_time=2.2,
            voices_overlaying_time=3.5,
            glitter_attack_duration=infit.Gaussian(1.9, 0.15),
            glitter_release_duration=infit.Gaussian(1, 0.15),
            tremolo_maker_per_voice=(
                None,
                None,
                tremolo.TremoloMaker(
                    add_tremolo_decider=infit.ActivityLevel(6),
                    tremolo_size_generator_per_tone=infit.MetaCycle(
                        (infit.Gaussian, (0.2675, 0.11))),
                    tremolo_volume_factor=0.48,
                ),
            ),
            pteq_engine_per_voice=(
                pteq.mk_super_soft_leading_pte(
                    empty_attack_dynamic_maker=infit.Value(0.3),
                    fxp='"pbIII/fxp/VibraphoneV-BHumanizednostretching.fxp"',
                    preset=None,
                    sustain_pedal=1,
                ),
                pteq.mk_dreamy_pte(
                    modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                    empty_attack_dynamic_maker=infit.Value(0.4),
                ),
                pteq.mk_super_soft_pte(
                    modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                    empty_attack_dynamic_maker=infit.Value(0.3),
                    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                    preset=None,
                    sustain_pedal=0,
                ),
            ),
            diva_engine_per_voice=(
                diva.FlageoletDivaMidiEngine,
                diva.FlageoletDivaMidiEngine,
                diva.FlageoletDivaMidiEngine,
            ),
            percussion_engine_per_voice=(
                percussion.Rhythmizer(
                    voice_meters2occupy=(0, ),
                    chord=infit.Cycle((
                        harmony.find_harmony(name="A", gender=gender),
                        harmony.find_harmony(name="C", gender=gender),
                    )),
                    sample_maker=infit.Cycle((
                        percussion.ResonanceSample(
                            path=infit.Cycle(
                                globals.SAM_CYMBALS_BIG_AGGRESSIVE),
                            pitch_factor=infit.Uniform(2, 6),
                            resonance_filter_bandwidth=infit.Uniform(0.4, 2),
                            resonance_filter_octave=infit.Cycle(
                                (2, 4, 3, 4, 1, 2)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.ResonanceSample(
                            path=infit.Cycle(
                                globals.SAM_CYMBALS_MIDDLE_AGGRESSIVE),
                            pitch_factor=infit.Uniform(2, 5),
                            resonance_filter_bandwidth=infit.Uniform(0.5, 2),
                            resonance_filter_octave=infit.Cycle(
                                (2, 3, 4, 1, 2)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                    )),
                    likelihood_range=(0.85, 0.285),
                    volume_range=(0.1, 0.5),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(1, ),
                    chord=infit.Cycle((
                        harmony.find_harmony(name="A", gender=gender),
                        harmony.find_harmony(name="C", gender=gender),
                    )),
                    sample_maker=infit.Cycle((
                        percussion.ResonanceSample(
                            path=infit.Cycle(globals.SAM_CYMBALS_BIG_CLOSE),
                            pitch_factor=infit.Gaussian(3, 5),
                            resonance_filter_bandwidth=infit.Gaussian(
                                0.8, 0.5),
                            resonance_filter_octave=infit.Cycle((2, )),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.3),
                            glissando_offset=0,
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.ResonanceSample(
                            path=infit.Cycle(
                                globals.SAM_CYMBALS_MIDDLE_CLOSE_LOUD),
                            pitch_factor=infit.Gaussian(3, 4),
                            resonance_filter_bandwidth=infit.Uniform(0.5, 1),
                            resonance_filter_octave=infit.Cycle((2, )),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=0,
                            glissando_size=infit.Gaussian(1, 0.1),
                        ),
                    )),
                    likelihood_range=(0.6, 0.1),
                    volume_range=(0.1, 0.8),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(0, 1, 2),
                    chord=infit.Cycle((harmony.find_harmony(name="B",
                                                            gender=gender), )),
                    sample_maker=infit.Cycle((
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND),
                            frequency=globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((2, 4, 8, 4)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_LOW_LOW_CLOSE_HAND),
                            frequency=globals.SAM_KENDANG_LOW_LOW_CLOSE_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((16, 8, 4, 8, 2)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND),
                            frequency=globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((8, 4, 2, 4)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_LOW_CLOSE_HAND),
                            frequency=globals.SAM_KENDANG_HIGH_LOW_CLOSE_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((8, 16, 8, 4, 8, 2)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                    )),
                    likelihood_range=(0.1, 0.5),
                    volume_range=(0.1, 0.5),
                    ignore_beats_occupied_by_voice=False,
                ),
            ),
            speech_init_attributes={},
            include_glitter=True,
            include_diva=True,
            include_natural_radio=True,
            include_percussion=True,
            radio_silent_channels=(1, 3, 5),
            tracks2ignore=("speech0", "speech1", "speech2"),
            radio_samples=(
                globals.SAM_RADIO_PROCESSED_DEGRADE[0],
                globals.SAM_RADIO_ITALY[-1],
                globals.SAM_RADIO_BIELEFELD[-1],
            ),
            radio_n_changes=8,
            radio_average_volume=0.45,
            radio_shadow_time=0.08,
            radio_min_volume=0.955,
        ),
        segments.MelodicCP(
            "{}_1".format(name),
            volume_envelope=interpolations.InterpolationLine([
                interpolations.FloatInterpolationEvent(0.1, 0),
                interpolations.FloatInterpolationEvent(0, 1),
            ]),
            volume_envelope_per_track={
                "voiceP0":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(3, 0.5),
                    interpolations.FloatInterpolationEvent(18, 1),
                    interpolations.FloatInterpolationEvent(5, 1),
                    interpolations.FloatInterpolationEvent(0, 0),
                ]),
                "voiceP1":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(21, 1),
                    interpolations.FloatInterpolationEvent(6, 1),
                    interpolations.FloatInterpolationEvent(3, 0.7),
                    interpolations.FloatInterpolationEvent(0, 0.135),
                ])
            },
            diva_engine_per_voice=(
                diva.FlageoletDivaMidiEngine,
                diva.FlageoletDivaMidiEngine,
                diva.FlageoletDivaMidiEngine,
            ),
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(3, 2), ji.r(3, 1),
                                                    ji.r(5, 4)),
            random_seed=1000,
            group=(group, sub_group0, 1),
            action_per_voice=(0.94, 0.97),
            sound_per_voice=(0.96, 0.96),
            phrases=(1, 2),
            melody_register=1,
            melodic_weight=0,
            weight_range=(0.5, 1),
            harmonicity_range=(0.25, 1),
            gender=gender,
            duration_per_bar=13,
            start=0.72,
            glitter_attack_duration=infit.Gaussian(1, 0.15),
            glitter_release_duration=infit.Gaussian(1, 0.15),
            dynamic_range_of_voices=(0.55, 0.9),
            anticipation_time=1,
            overlaying_time=1.5,
            voices_overlaying_time=4,
            tremolo_maker_per_voice=(
                None,
                tremolo.TremoloMaker(
                    add_tremolo_decider=infit.ActivityLevel(6),
                    tremolo_size_generator_per_tone=infit.MetaCycle(
                        (infit.Gaussian, (0.23, 0.12))),
                    tremolo_volume_factor=0.39,
                ),
                tremolo.TremoloMaker(
                    add_tremolo_decider=infit.ActivityLevel(6),
                    tremolo_size_generator_per_tone=infit.MetaCycle(
                        (infit.Gaussian, (0.09, 0.03))),
                    tremolo_volume_factor=0.42,
                ),
            ),
            pteq_engine_per_voice=(
                pteq.mk_super_soft_leading_pte(
                    empty_attack_dynamic_maker=infit.Value(0.2),
                    fxp='"pbIII/fxp/VibraphoneV-BHumanizednostretching.fxp"',
                    preset=None,
                    sustain_pedal=1,
                ),
                pteq.mk_dreamy_pte(
                    modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                    empty_attack_dynamic_maker=infit.Value(0.2),
                ),
                pteq.mk_super_soft_pte(
                    modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                    empty_attack_dynamic_maker=infit.Value(0.2),
                ),
            ),
            percussion_engine_per_voice=(
                percussion.Rhythmizer(
                    voice_meters2occupy=(0, ),
                    chord=infit.Cycle((
                        harmony.find_harmony(name="A", gender=gender),
                        harmony.find_harmony(name="C", gender=gender),
                    )),
                    sample_maker=infit.Cycle((
                        percussion.ResonanceSample(
                            path=infit.Cycle(
                                globals.SAM_CYMBALS_BIG_AGGRESSIVE),
                            pitch_factor=infit.Uniform(2, 6),
                            resonance_filter_bandwidth=infit.Uniform(0.4, 2),
                            resonance_filter_octave=infit.Cycle(
                                (2, 4, 3, 4, 1, 2)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.ResonanceSample(
                            path=infit.Cycle(
                                globals.SAM_CYMBALS_MIDDLE_AGGRESSIVE),
                            pitch_factor=infit.Uniform(2, 5),
                            resonance_filter_bandwidth=infit.Uniform(0.5, 2),
                            resonance_filter_octave=infit.Cycle(
                                (2, 3, 4, 1, 2)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                    )),
                    likelihood_range=(0.89, 0.5),
                    volume_range=(0.1, 0.5),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(1, ),
                    chord=infit.Cycle((
                        harmony.find_harmony(name="B", gender=gender),
                        harmony.find_harmony(name="C", gender=gender),
                    )),
                    sample_maker=infit.Cycle((
                        percussion.ResonanceSample(
                            path=infit.Cycle(globals.SAM_CYMBALS_BIG_CLOSE),
                            pitch_factor=infit.Gaussian(3, 5),
                            resonance_filter_bandwidth=infit.Gaussian(
                                0.8, 0.5),
                            resonance_filter_octave=infit.Cycle((2, )),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.3),
                            glissando_offset=0,
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.ResonanceSample(
                            path=infit.Cycle(
                                globals.SAM_CYMBALS_MIDDLE_CLOSE_LOUD),
                            pitch_factor=infit.Gaussian(3, 4),
                            resonance_filter_bandwidth=infit.Uniform(0.5, 1),
                            resonance_filter_octave=infit.Cycle((2, )),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=0,
                            glissando_size=infit.Gaussian(1, 0.1),
                        ),
                    )),
                    likelihood_range=(0.8, 0.1),
                    volume_range=(0.1, 0.8),
                    ignore_beats_occupied_by_voice=False,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(0, 1, 2),
                    chord=infit.Cycle((harmony.find_harmony(name="B",
                                                            gender=gender), )),
                    sample_maker=infit.Cycle((
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND),
                            frequency=globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((2, 4, 8, 4)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_RADIO_ROEHRENRADIO_KEYS),
                            pitch_factor=infit.Uniform(0.8, 2),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_LOW_LOW_CLOSE_HAND),
                            frequency=globals.SAM_KENDANG_LOW_LOW_CLOSE_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((16, 8, 4, 8, 2)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND),
                            frequency=globals.SAM_KENDANG_HIGH_HIGH_CLOSE_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((8, 4, 2, 4)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                        percussion.Sample(
                            path=infit.Cycle(
                                globals.SAM_KENDANG_HIGH_LOW_CLOSE_HAND),
                            frequency=globals.SAM_KENDANG_HIGH_LOW_CLOSE_HAND.
                            information["frequency"],
                            pitch_factor=infit.Cycle((8, 16, 8, 4, 8, 2)),
                            glissando_direction=True,
                            glissando_duration=infit.Uniform(0.001, 0.2),
                            glissando_offset=infit.Uniform(0, 0.1),
                            glissando_size=infit.Gaussian(1, 0.2),
                        ),
                    )),
                    likelihood_range=(0.1, 0.7),
                    volume_range=(0.1, 0.5),
                    ignore_beats_occupied_by_voice=False,
                ),
            ),
            speech_init_attributes={},
            include_glitter=True,
            include_diva=True,
            include_natural_radio=True,
            include_percussion=True,
            radio_silent_channels=(1, 3),
            tracks2ignore=("speech0", "speech1", "speech2"),
            radio_samples=(
                globals.SAM_RADIO_ITALY[-1],
                globals.SAM_RADIO_BIELEFELD[-1],
            ),
            radio_n_changes=8,
            radio_average_volume=0.4,
            radio_shadow_time=0.08,
            radio_min_volume=0.955,
        ),
        segments.Chord(
            "{}_CF_BELL_0".format(name),
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(7, 1), ji.r(2, 1),
                                                    ji.r(4, 3)),
            group=(group, sub_group0, 2),
            chord=harmony.find_harmony(name="A", gender=gender),
            gender=gender,
            n_bars=1,
            duration_per_bar=8,
            start=-0.75,
            dynamic_range_of_voices=(0.8, 1),
            anticipation_time=0.1,
            overlaying_time=0.25,
            voices_entry_delay_per_voice=(0, 0.05, 0.08),
            pteq_engine_per_voice=(
                pteq.mk_pianoteq_engine(
                    fxp='"pbIII/fxp/Bells_no_stretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
                pteq.mk_pianoteq_engine(
                    fxp='"pbIII/fxp/Bells_no_stretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
                pteq.mk_dreamy_pte(
                    fxp='"pbIII/fxp/Bells_no_stretching.fxp"',
                    preset=None,
                    empty_attack_dynamic_maker=infit.Value(0),
                ),
            ),
            radio_samples=(
                globals.SAM_RADIO_ITALY[-1],
                globals.SAM_RADIO_BIELEFELD[-1],
            ),
            speech_init_attributes={},
            glitter_type="drone",
            glitter_register_per_voice=(4, 5, 5),
            glitter_volume_per_voice=(0.85, 0.94, 0.95),
            glitter_modulater_per_voice=("lfo", "lfo", "lfo"),
            glitter_release_duration=7,
            glitter_attack_duration=0.2,
            radio_shadow_time=0,
            include_glitter=True,
            include_diva=False,
            include_natural_radio=True,
            include_percussion=False,
        ),
        segments.MelodicCP(
            "{}_2".format(name),
            volume_envelope=interpolations.InterpolationLine([
                interpolations.FloatInterpolationEvent(0.1, 0),
                interpolations.FloatInterpolationEvent(24, 1),
                interpolations.FloatInterpolationEvent(3, 1),
                interpolations.FloatInterpolationEvent(2, 0.9),
                interpolations.FloatInterpolationEvent(0, 0.45),
            ]),
            volume_envelope_per_track={
                "voiceP0":
                interpolations.InterpolationLine([
                    interpolations.FloatInterpolationEvent(2, 0.65),
                    interpolations.FloatInterpolationEvent(30, 0.8),
                    interpolations.FloatInterpolationEvent(5, 0.8),
                    interpolations.FloatInterpolationEvent(0, 0.1),
                ])
            },
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(8, 1), ji.r(3, 1),
                                                    ji.r(2, 1)),
            random_seed=1000,
            group=(group, sub_group0, 2),
            action_per_voice=(0.82, 0.81),
            sound_per_voice=(0.75, 0.74),
            phrases=(3, 3),
            melody_register=1,
            melodic_weight=0,
            weight_range=(0.5, 1),
            harmonicity_range=(0.25, 1),
            gender=gender,
            duration_per_bar=12.75,
            start=-3.5,
            dynamic_range_of_voices=(0.3, 0.5),
            anticipation_time=2,
            overlaying_time=3.2,
            voices_overlaying_time=4.5,
            pteq_engine_per_voice=(
                pteq.mk_super_soft_trippy_pte(
                    modulator=(ornamentations.SoftLineGlissandoMaker(
                        activity_lv=7,
                        minima_glissando_duration=0.05,
                        maxima_glissando_duration=0.1,
                        minima_glissando_size=20,
                        maxima_glissando_size=70,
                    ), ),
                    empty_attack_dynamic_maker=infit.Value(0.2),
                    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
                    preset=None,
                    sustain_pedal=0,
                ),
                pteq.mk_super_soft_pte(
                    modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                    empty_attack_dynamic_maker=infit.Value(0.2),
                    fxp='"pbIII/fxp/Marimba_no_stretching.fxp"',
                    preset=None,
                    sustain_pedal=0,
                ),
                pteq.mk_super_soft_pte(
                    modulator=(ornamentations.SoftLineGlissandoMaker(), ),
                    empty_attack_dynamic_maker=infit.Value(0.2),
                    fxp='"pbIII/fxp/Marimba_no_stretching.fxp"',
                    preset=None,
                    sustain_pedal=0,
                ),
            ),
            diva_engine_per_voice=(diva.FlageoletDivaMidiEngine, None, None),
            percussion_engine_per_voice=(
                percussion.Rhythmizer(
                    voice_meters2occupy=(0, 1, 2),
                    sample_maker=infit.Cycle((percussion.Sample(
                        path=infit.Cycle(globals.SAM_RADIO_ROEHRENRADIO_KEYS),
                        pitch_factor=infit.Uniform(0.8, 2),
                        distortion=infit.Uniform(0, 1, seed=0),
                    ), )),
                    likelihood_range=(0.1, 0.2),
                    volume_range=(0, 0.001),
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(0, 1, 2),
                    sample_maker=infit.Cycle((percussion.Sample(
                        path=infit.Cycle(globals.SAM_RADIO_ROEHRENRADIO_KEYS),
                        pitch_factor=infit.Uniform(0.7, 1.7),
                        distortion=infit.Uniform(0, 2, seed=0),
                    ), )),
                    likelihood_range=(0.08, 0.55),
                    volume_range=(0.54, 0.8),
                    ignore_beats_occupied_by_voice=True,
                    seed=39,
                ),
                percussion.Rhythmizer(
                    voice_meters2occupy=(0, 1, 2),
                    sample_maker=infit.Cycle((percussion.Sample(
                        path=infit.Cycle(globals.SAM_RADIO_ROEHRENRADIO_KEYS),
                        pitch_factor=infit.Uniform(0.4, 1),
                        distortion=infit.Uniform(0.4, 1.8),
                    ), )),
                    likelihood_range=(0.1, 0.2),
                    volume_range=(0, 0.01),
                ),
            ),
            speech_init_attributes={},
            include_glitter=True,
            include_diva=True,
            include_natural_radio=True,
            include_percussion=True,
            radio_silent_channels=tuple([]),
            glitter_modulater_per_voice=("randomh", "randomh", "randomh"),
            glitter_attack_duration=infit.Gaussian(0.75, 0.15),
            glitter_release_duration=infit.Gaussian(1.8, 0.25),
            tracks2ignore=("speech0", "speech1", "speech2"),
            radio_samples=(globals.SAM_RADIO_ITALY[-1],
                           globals.SAM_RADIO_ITALY[-2]),
            radio_n_changes=4,
            radio_average_volume=0.4,
            radio_shadow_time=0.08,
            radio_min_volume=0.855,
        ),
        segments.Silence(name="{}_silence0".format(name), duration=11),
    )