Beispiel #1
0
    if _ > instrument_three_range_highest:
        continue
    elif _ < instrument_three_range_lowest:
        continue
    else:
        voice_3_chord_1.append(_)

for _ in chord_1:
    if _ > instrument_four_range_highest:
        continue
    elif _ < instrument_four_range_lowest:
        continue
    else:
        voice_4_chord_1.append(_)

voice_1_chord_1 = evans.Sequence(voice_1_chord_1).mirror(
    sequential_duplicates=False)
voice_1_chord_1 = evans.Sequence(voice_1_chord_1).rotate(18)
voice_1_chord_1 = [
    x for x in evans.Sequence(voice_1_chord_1).random_walk(
        random_seed=1,
        length=5000,
        step_list=[1],
    )
]

voice_2_chord_1 = evans.Sequence(voice_2_chord_1).mirror(
    sequential_duplicates=False)
voice_2_chord_1 = evans.Sequence(voice_2_chord_1).rotate(18)
voice_2_chord_1 = [
    x for x in evans.Sequence(voice_2_chord_1).random_walk(
        random_seed=4,
Beispiel #2
0
     ),
     forget=False,
 ),
 attachment_handlers=[
     evans.PitchHandler(
         evans.Sequence(
             microtones.PitchSegment(
                 [
                     0,
                     "2/3",
                     "4/3",
                     "6/3",
                     "8/3",
                     "1/2",
                     "3/2",
                 ]
             ).sorted(),
         )
         .mirror(
             sequential_duplicates=False,
         )
         .random_walk(
             random_seed=25,
             length=200,
             step_list=[1, 2],
         ),
         forget=False,
     ),
     evans.ArticulationHandler(
         [
             "tremolo",
Beispiel #3
0
        item_ = []
        for _ in item:
            item_.append(_ + 12)
        chord_2.append(item_)
    else:
        assert isinstance(item, (int, float))
        chord_2.append(item + 12)

for i, pitch in enumerate(chord_2):
    if isinstance(pitch, list):
        item_ = []
        for _ in pitch:
            if 28 < _:
                item_.append(_ - 12)
            else:
                item_.append(_)
        chord_2[i] = item_
    else:
        if 28 < pitch:
            chord_2[i] = pitch - 12

# chord_2 = [
#     item + 12
#     if isinstance(item, (int, float))
#     else [_ + 12 for _ in item]
#     for item in chord_1
#     ]

chord_1 = evans.Sequence(chord_2).pitch_warp(warp_values=[0.5, -0.5],
                                             boolean_vector=[0, 0, 1, 0, 1])
Beispiel #4
0
    instrument_four_range_highest,
    instrument_four_range_lowest,
    instrument_one_range_highest,
    instrument_one_range_lowest,
    instrument_three_range_highest,
    instrument_three_range_lowest,
    instrument_two_range_highest,
    instrument_two_range_lowest,
)

chord_1 = [-24, -20, -15, -14, -4, 5, 11, 19, 26, 37, 39, 42]
chord_2 = [-24, -16, -9, 2, 4, 7, 13, 17, 22, 23, 33, 42]
chord_3 = [-24, -21, -19, -8, -1, 7, 13, 22, 32, 33, 38, 42]
chord_4 = [-24, -15, -5, -4, 1, 5, 11, 14, 16, 27, 34, 42]

chord_1 = evans.Sequence(chord_1).reproportion_by_base(
    base=1.5, round=evans.to_nearest_eighth_tone)
chord_2 = evans.Sequence(chord_2).reproportion_by_base(
    base=1.5, round=evans.to_nearest_eighth_tone)
chord_3 = evans.Sequence(chord_3).reproportion_by_base(
    base=1.5, round=evans.to_nearest_eighth_tone)
chord_4 = evans.Sequence(chord_4).reproportion_by_base(
    base=1.5, round=evans.to_nearest_eighth_tone)
# round to quarter tones?
# violin 1
violin_1_chord_1 = [
    _ for _ in chord_1
    if instrument_one_range_lowest <= _ <= instrument_one_range_highest
]
violin_1_chord_2 = [
    _ for _ in chord_2
    if instrument_one_range_lowest <= _ <= instrument_one_range_highest
Beispiel #5
0
    Fraction(5860, 100),
    Fraction(639, 100),
    Fraction(103, 100),
    Fraction(99, 100),
    Fraction(72, 100),
    Fraction(67, 100),
    Fraction(45, 100),
    Fraction(41, 100),
]

years = evans.RatioClassSegment(years)

days = [Fraction(_, days[-1]) for _ in days]
days = evans.RatioClassSegment(days)

years = evans.Sequence(years).stack_pitches(as_ratios=True)

days = evans.Sequence(days).sort().stack_pitches(as_ratios=True)

for _ in years:
    print(_)

print("")

for _ in days:
    print(_)

staff1 = abjad.Staff([abjad.Note("fs,,4") for _ in years])

staff2 = abjad.Staff([abjad.Note("a,4") for _ in days])
Beispiel #6
0
    funnel = evans.funnel_inner_tree_to_x(rtm_string=rotation, x=6)
    funnels.append(funnel)

index_cycle = evans.cyc([i for i in range(len(funnels[0]))])
tuple_list = []
for i in range(len(rotations)):
    tuple_ = (i, next(index_cycle))
    tuple_list.append(tuple_)

final_rtm_list = []
for tuple_ in tuple_list:
    a = tuple_[0]
    b = tuple_[-1]
    final_rtm_list.append(funnels[a][b])

final_rtm_list = evans.Sequence(final_rtm_list).rotate(1)
quantizer = evans.RhythmTreeQuantizer()
final_rtm_list = [quantizer(_) for _ in final_rtm_list]
final_rtm_list = [
    evans.flatten_tree_level(_, recurse=True) for _ in final_rtm_list
]
# final_rtm_list = [
#     "(1 ((1 (1 2)) 1 (1 (1 1 2)) (1 (1 2)) 1))",  # modified
#     "(1 ((1 (2 1)) 1 (1 (1 1 2)) (1 (2 1)) 1))",  # modified
#     "(1 ((1 (2 1)) 1 (1 (1 1 1)) (1 (1 2)) 2))",  # modified
#     "(1 ((2 (2 1)) 1 (2 (1 1 1)) (1 (1 1)) 2))",  # modified
#     "(1 ((1 (1 1)) 1 (1 (1 1 1)) (1 (1 1)) 1))",  # modified
#     "(1 ((1 (1 2)) 2 (2 (2 1 1)) (2 (2 1)) 1))",  # modified
#     "(1 ((1 (1 2)) 2 (1 (1 1 2)) (2 (2 1)) 1))",  # modified
#     "(1 ((2 (2 1)) 1 (1 (1 1 2)) (2 (2 1)) 1))",  # modified
#     "(1 ((2 (2 1)) 1 (2 (1 1 1)) (1 (1 2)) 2))",  # modified
Beispiel #7
0
import evans
from abjadext import microtones

source_intervals = [3, 1, 2, 2]
source = [2]

for interval in source_intervals:
    source.append(source[-1] + interval)

added_sequences = evans.Sequence(source).derive_added_sequences(
    source_intervals, flat=True
)

multiplied_sequences = evans.Sequence(added_sequences).derive_multiplied_sequences(
    source_intervals, flat=True
)

set_one = microtones.PitchClassSet(multiplied_sequences)
segment_one = microtones.PitchSegment(set_one).transpose(8)
segment_one = segment_one.transpose(9)

set_two = microtones.PitchClassSet(multiplied_sequences)
segment_two = microtones.PitchSegment(set_two)
segment_two += segment_two.invert(4).transpose(6)
segment_two = segment_two.transpose(-10).retrograde() + segment_two
segment_two = segment_two.transpose(9)

saxophone_pitch_handler_one = evans.PitchHandler(
    pitch_list=segment_one, forget=False, name="saxophone_pitch_handler_one"
)