Beispiel #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),
            )),
        }
Beispiel #2
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),
         )),
     }
    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()
Beispiel #4
0
    def _initialise_rests(self, duration: numbers.Number) -> None:
        test_point_maker = infit.Uniform(7, 12)
        test_points = []
        while sum(test_points) < duration:
            test_points.append(next(test_point_maker))

        test_points[-1] -= sum(test_points) - duration

        rests = basic.SequentialEvent([])
        for absolute_time, test_point_duration in zip(
                tools.accumulate_from_zero(test_points), test_points):
            absolute_position_on_timeline = absolute_time / duration
            activate_rest = self.get_value_of_at(
                "activate_rest", absolute_position_on_timeline)
            if activate_rest:
                rest_duration = self.get_value_of_at(
                    "rest_duration", absolute_position_on_timeline)
                if rest_duration > test_point_duration:
                    rest_duration = test_point_duration
                rest = basic.SimpleEvent(rest_duration)
                rest.is_rest = True
                rests.append(rest)
            else:
                rest_duration = 0

            remaining_playing = test_point_duration - rest_duration
            if remaining_playing:
                playing = basic.SimpleEvent(remaining_playing)
                playing.is_rest = False
            rests.append(playing)

        # rests_duration = 0
        # while rests_duration < duration:
        #     absolute_time = rests.duration / duration
        #     rest_duration = self.get_value_of_at("rest_duration", absolute_time)
        #     event = basic.SimpleEvent(rest_duration)
        #     event.is_rest = self.get_value_of_at("activate_rest", absolute_time)
        #     rests_duration += rest_duration
        #     rests.append(event)

        # difference = rests_duration - duration
        # rests[-1].duration -= difference
        self._rests = rests
Beispiel #5
0
def mk_pianoteq_engine(
    preset: str = __STANDARD_PRESET,
    fxp: str = __STANDARD_FXP,
    parameter_non_dissonant_pitches: dict = {},
    parameter_dissonant_pitches: dict = {},
    empty_attack_dynamic_maker: infit.InfIt = infit.Uniform(0.2, 0.4),
    modulator: tuple = tuple([]),
    convert_dissonant_tones2glissandi: bool = False,
) -> type:

    assert fxp is None or preset is None

    for parameter in midiplug.PyteqTone._init_args:

        if parameter not in (
                "spectrum_profile_3",
                "spectrum_profile_5",
                "spectrum_profile_6",
                "spectrum_profile_7",
        ):
            if parameter not in parameter_non_dissonant_pitches:
                parameter_non_dissonant_pitches.update({parameter: None})

            if parameter not in parameter_dissonant_pitches:
                parameter_dissonant_pitches.update({parameter: None})

    attributes = {
        "preset": preset,
        "fxp": fxp,
        "parameter_dissonant_pitches": parameter_dissonant_pitches,
        "parameter_non_dissonant_pitches": parameter_non_dissonant_pitches,
        "empty_attack_dynamic_maker": empty_attack_dynamic_maker,
        "modulator": modulator,
        "convert_dissonant_tones2glissandi": convert_dissonant_tones2glissandi,
    }
    return type("PianoteqVoice", (__PianoteqVoice, ), attributes)
Beispiel #6
0
def mk_trippy_bell_pte(
    fxp='"pbIII/fxp/GlockenspielHumanizednostretching.fxp"',
    preset=None,
    sustain_pedal: int = 0,
    *args,
    **kwargs,
) -> type:
    # for bell
    parameters = {
        "unison_width": infit.Uniform(10, 15.75),
        "impedance": infit.Uniform(1.55, 1.65, seed=2),
        "cutoff": infit.Gaussian(1.4, 0.5, seed=10),
        "q_factor": infit.Gaussian(1.4, 0.1, seed=11),
        "direct_sound_duration": infit.Uniform(0, 1, seed=12),
        "sympathetic_resonance": infit.Gaussian(3, 0.5),
        "duplex_scale": infit.Uniform(8, 20, seed=33),
        "hammer_noise": infit.Gaussian(2.8, 0.2, seed=10),
        "sustain_pedal": sustain_pedal,
        "hammer_hard_piano": 1.8,
        "hammer_hard_mezzo": 1.9,
        "hammer_hard_forte": 2,
        "strike_point": 1 / 2,
        "pinch_harmonic_pedal": 0,
        "sound_speed": infit.Gaussian(300, 20),
        "blooming_energy": infit.Uniform(1.685, 2),
        "blooming_inertia": infit.Uniform(1.6, 2),
        "effect1_switch": 1,
        "effect1_param1": infit.Gaussian(0.4, 0.05),
        "effect1_param2": infit.Gaussian(0.55, 0.1),
    }
    return mk_pianoteq_engine(
        preset=preset,
        fxp=fxp,
        parameter_non_dissonant_pitches=parameters,
        parameter_dissonant_pitches=parameters,
        *args,
        **kwargs,
    )
Beispiel #7
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,
        ),
    )
Beispiel #8
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,
        ),
    )
Beispiel #9
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
Beispiel #10
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
            #         ),
            #     },
            # },
        ),
    )
Beispiel #11
0
def mk_bright_bell(
    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(1.7, 2.7),
            "cutoff": infit.Uniform(1.2, 2.3, seed=2),
            "q_factor": infit.Uniform(0.9, 1, seed=2),
            "direct_sound_duration": infit.Uniform(4, 5, seed=3),
            "string_length": infit.Uniform(8, 10),
            "sympathetic_resonance": infit.Uniform(3, 5),
            "hammer_noise": infit.Uniform(2, 3.0, seed=10),
            "sustain_pedal": sustain_pedal,
            "hammer_hard_piano": 1.6,
            "hammer_hard_mezzo": 1.95,
            "hammer_hard_forte": 2,
            "strike_point": infit.Uniform(1 / 64, 1 / 8),
            "pinch_harmonic_pedal": 0,
            "buff_stop_pedal": 0,
            "blooming_energy": infit.Uniform(0, 0.2),
        },
        parameter_dissonant_pitches={
            "impedance": infit.Uniform(2, 2.5),
            "cutoff": infit.Uniform(2, 2.3, seed=2),
            "q_factor": infit.Uniform(0.5, 1, seed=2),
            "direct_sound_duration": infit.Uniform(4, 5, seed=3),
            "string_length": infit.Uniform(8, 10),
            "sympathetic_resonance": infit.Uniform(3, 5),
            "hammer_noise": infit.Uniform(1, 3.0, seed=10),
            "sustain_pedal": sustain_pedal,
            "hammer_hard_piano": 1,
            "hammer_hard_mezzo": 1.65,
            "hammer_hard_forte": 2,
            "strike_point": infit.Uniform(1 / 64, 1 / 8),
            "pinch_harmonic_pedal": 0,
            "buff_stop_pedal": 0,
            "sound_speed": 500,
            "blooming_energy": infit.Uniform(1.55, 2),
            "blooming_inertia": infit.Uniform(1.55, 2.8),
        },
        *args,
        **kwargs,
    )
Beispiel #12
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),
    )
Beispiel #13
0
    class GenderSampleMaker(synthesis.BasedCsoundEngine):
        gender_samples_path = "aml/electronics/samples/gender/"
        original_gender_samples_path = "{}/original".format(
            gender_samples_path)
        adapted_gender_samples_path = "{}/adapted".format(gender_samples_path)

        # detect samples with their respective frequencies
        samples = {}
        for sample in os.listdir(original_gender_samples_path):
            if sample[-3:] == "wav":
                sample_name_without_ending = sample[:-4]
                sample_json_name = "{}.json".format(sample_name_without_ending)
                complete_sample_path = "{}/{}".format(
                    original_gender_samples_path, sample)
                complete_sample_json_path = "{}/{}".format(
                    original_gender_samples_path, sample_json_name)
                frequency = float(
                    tuple(
                        json.load(open(complete_sample_json_path,
                                       "r")).values())[0][0])
                samples.update({frequency: complete_sample_path})

        available_frequencies = tuple(sorted(samples.keys()))

        cname = ".gender_sample_maker"
        tail = 0.25

        freq_used_counter = collections.Counter({freq: 0 for freq in samples})

        sine_attack_maker = infit.Uniform(0.23, 0.58)
        sine_release_maker = infit.Uniform(1.8, 2.2)
        sine_amp_maker = infit.Uniform(0.075, 0.1)

        def __init__(self, index: int, frequency: float):
            closest_frequency = tools.find_closest_item(
                frequency, self.available_frequencies)
            second_closest_frequency = tools.find_closest_item(
                frequency,
                tuple(f for f in self.available_frequencies
                      if f != closest_frequency),
            )

            if (self.freq_used_counter[closest_frequency] <=
                    self.freq_used_counter[second_closest_frequency]):
                choosen_frequency = closest_frequency
            else:
                choosen_frequency = second_closest_frequency

            print(frequency, choosen_frequency)

            self.freq_used_counter.update({choosen_frequency: 1})
            self.choosen_sample = self.samples[choosen_frequency]
            self.pitch_factor = frequency / choosen_frequency
            self.frequency = frequency
            self.duration = pyo.sndinfo(self.choosen_sample)[1] + self.tail
            self.index = index
            self.bandwidth = 2
            self.original_amp = 0.7
            self.bp_amp = 0.0000009
            self.lp_freq = 11000

        @property
        def orc(self) -> str:
            lines = [
                "0dbfs=1",
                "nchnls=2\n",
                "instr 1",
                "kvol0 linseg 0, {}, 1, 0.15, 0.4, {}, 0".format(
                    next(self.sine_attack_maker),
                    next(self.sine_release_maker)),
                "kvol1 linseg 0, {}, 1, 0.15, 0.4, {}, 0".format(
                    next(self.sine_attack_maker),
                    next(self.sine_release_maker)),
                "asine0 poscil3 {} * kvol0, {}".format(
                    next(self.sine_amp_maker), self.frequency * 2),
                "asine1 poscil3 {} * kvol1, {}".format(
                    next(self.sine_amp_maker), self.frequency * 2),
                'asig0, asig1 diskin2 "{}", {}, 0, 0, 0, 4'.format(
                    self.choosen_sample, self.pitch_factor),
                "afilteredsig0 butlp asig0, {}".format(self.lp_freq),
                "afilteredsig1 butlp asig1, {}".format(self.lp_freq),
                "afilteredsig0 buthp afilteredsig0, {}".format(self.frequency *
                                                               0.9),
                "afilteredsig1 buthp afilteredsig1, {}".format(self.frequency *
                                                               0.9),
                "abp0 reson asig0, {}, {}".format(self.frequency,
                                                  self.bandwidth),
                "abp1 reson asig1, {}, {}".format(self.frequency,
                                                  self.bandwidth),
                "outs (afilteredsig0 * {1}) + (abp0 * {0}) + asine0, (afilteredsig1 *"
                " {1}) + (abp1 * {0}) + asine1".format(self.bp_amp,
                                                       self.original_amp),
                "endin\n",
            ]
            return "\n".join(lines)

        @property
        def sco(self) -> str:
            return "i1 0 {}".format(self.duration)

        def render(self):
            super().render("{}/{}".format(self.adapted_gender_samples_path,
                                          self.index))
Beispiel #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={},
        ),
    )
Beispiel #15
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,
    )
Beispiel #16
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,
        ),
    )
Beispiel #17
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,
    )
Beispiel #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,
    )
Beispiel #19
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,
    )
Beispiel #20
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,
    ), )
Beispiel #21
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),
        ),
    )
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,
    ), )
Beispiel #23
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,
        ), )
Beispiel #24
0
                 ],
                 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),
     ignore_beats_occupied_by_voice=False,
 ),
 percussion.Rhythmizer(
     sample_maker=infit.Cycle(
         (
             percussion.Sample(
                 path=infit.Cycle(globals.SAM_CYMBALS_BIG_AGGRESSIVE),
                 pitch_factor=infit.Uniform(0.5, 1.2),
             ),
             percussion.Sample(
                 path=infit.Cycle(globals.SAM_CYMBALS_MIDDLE_AGGRESSIVE),
                 pitch_factor=infit.Uniform(0.5, 1.2),
             ),
         )
     ),
     likelihood_range=(0.3, 0),
     volume_range=(0.4, 0.2),
     ignore_beats_occupied_by_voice=False,
 ),
 percussion.Rhythmizer(
     sample_maker=infit.Cycle(
         (
             percussion.Sample(
Beispiel #25
0
         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),
Beispiel #26
0
def make(name: str = "ONE", gender=False, group=0, sub_group0=1):
    return (
        segments.Silence(name="{}_start_silence".format(name), duration=18),
        segments.Chord(
            "{}_Speech0".format(name),
            ambitus_maker=ambitus.SymmetricalRanges(ji.r(7, 1), ji.r(2, 1), ji.r(4, 3)),
            group=(group, sub_group0, 0),
            chord=harmony.find_harmony(name="A", gender=gender),
            gender=gender,
            n_bars=1,
            duration_per_bar=34,
            start=0,
            dynamic_range_of_voices=(0.8, 1),
            anticipation_time=2.25,
            overlaying_time=3.25,
            speech_init_attributes={
                "speech0": {
                    "start": 0,
                    "duration": 35,
                    "sound_engine": speech.BrokenRadio(
                        (globals.SAM_SPEECH_SLICED_DERRIDA_KAFKA.path,),
                        duration=32,
                        volume=0.42,
                        activity_lv_per_effect={
                            "original": 8,
                            "harmonizer": 6,
                            "filter": 10,
                            "noise": 10,
                            "lorenz": 10,
                            "chenlee": 6,
                        },
                        level_per_effect={
                            "original": infit.Gaussian(0.4, 0.05),
                            "filter": infit.Gaussian(10.2, 2.25),
                            "harmonizer": infit.Gaussian(0.7, 0.15),
                            "chenlee": infit.Gaussian(0.1, 0.02),
                            "lorenz": infit.Gaussian(0.4, 0.02),
                            "noise": infit.Gaussian(0.32, 0.04),
                        },
                        transpo_maker=infit.Uniform(0.14, 0.8),
                        filter_freq_maker=infit.Gaussian(110, 50),
                        filter_q_maker=infit.Gaussian(5, 1),
                        curve=interpolations.InterpolationLine(
                            [
                                interpolations.FloatInterpolationEvent(0.25, 0.01),
                                interpolations.FloatInterpolationEvent(0.8, 1),
                                interpolations.FloatInterpolationEvent(0.3, 1),
                                interpolations.FloatInterpolationEvent(0, 0.1),
                            ]
                        ),
                    ),
                },
                "speech1": {
                    "start": 0.1,
                    "duration": 35,
                    "sound_engine": speech.BrokenRadio(
                        (globals.SAM_SPEECH_SLICED_DERRIDA_KAFKA.path,),
                        duration=32,
                        volume=0.3,
                        activity_lv_per_effect={
                            "original": 6,
                            "harmonizer": 4,
                            "filter": 9,
                            "noise": 9,
                            "lorenz": 8,
                            "chenlee": 7,
                        },
                        level_per_effect={
                            "original": infit.Gaussian(0.4, 0.05),
                            "filter": infit.Gaussian(10.2, 2.25),
                            "harmonizer": infit.Gaussian(0.7, 0.15),
                            "chenlee": infit.Gaussian(0.1, 0.02),
                            "lorenz": infit.Gaussian(0.4, 0.02),
                            "noise": infit.Gaussian(0.32, 0.04),
                        },
                        transpo_maker=infit.Uniform(1.14, 1.5),
                        filter_freq_maker=infit.Gaussian(200, 50),
                        filter_q_maker=infit.Gaussian(5, 1),
                        curve=interpolations.InterpolationLine(
                            [
                                interpolations.FloatInterpolationEvent(0.3, 0.01),
                                interpolations.FloatInterpolationEvent(0.8, 1),
                                interpolations.FloatInterpolationEvent(0.3, 1),
                                interpolations.FloatInterpolationEvent(0, 0.1),
                            ]
                        ),
                    ),
                },
                "speech2": {
                    "start": 0.075,
                    "duration": 35,
                    "sound_engine": speech.BrokenRadio(
                        (globals.SAM_SPEECH_SLICED_DERRIDA_KAFKA.path,),
                        duration=32,
                        volume=0.34,
                        activity_lv_per_effect={
                            "original": 6,
                            "harmonizer": 4,
                            "filter": 9,
                            "noise": 9,
                            "lorenz": 8,
                            "chenlee": 7,
                        },
                        level_per_effect={
                            "original": infit.Gaussian(0.4, 0.05),
                            "filter": infit.Gaussian(10.2, 2.25),
                            "harmonizer": infit.Gaussian(0.7, 0.15),
                            "chenlee": infit.Gaussian(0.1, 0.02),
                            "lorenz": infit.Gaussian(0.4, 0.02),
                            "noise": infit.Gaussian(0.32, 0.04),
                        },
                        transpo_maker=infit.Uniform(1.14, 1.5),
                        filter_freq_maker=infit.Gaussian(200, 50),
                        filter_q_maker=infit.Gaussian(5, 1),
                        curve=interpolations.InterpolationLine(
                            [
                                interpolations.FloatInterpolationEvent(0.4, 0.01),
                                interpolations.FloatInterpolationEvent(0.8, 1),
                                interpolations.FloatInterpolationEvent(0.3, 1),
                                interpolations.FloatInterpolationEvent(0, 0.1),
                            ]
                        ),
                    ),
                },
            },
            include_glitter=False,
            include_diva=False,
            include_natural_radio=False,
            include_percussion=False,
            include_voices=False,
        ),
    )
Beispiel #27
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,
    ), )