# -*- encoding: utf-8 -*-
import consort
from abjad.tools import durationtools
from abjad.tools import rhythmmakertools
from abjad.tools import selectortools

left_hand_stasis_music_specifier = consort.MusicSpecifier(
    attachment_handler=consort.AttachmentHandler(
        trill_spanner=consort.AttachmentExpression(
            attachments=(
                consort.ConsortTrillSpanner(interval='+m3'),
                consort.ConsortTrillSpanner(interval='+P4'),
                consort.ConsortTrillSpanner(interval='+m3'),
            ),
            selector=selectortools.Selector().by_leaf(),
        ), ),
    minimum_phrase_duration=durationtools.Duration(1, 4),
    pitch_handler=consort.AbsolutePitchHandler(
        deviations=(0, 0, 0.5),
        pitch_specifier="gs'",
    ),
    rhythm_maker=rhythmmakertools.NoteRhythmMaker(
        duration_spelling_specifier=rhythmmakertools.DurationSpellingSpecifier(
            forbid_meter_rewriting=True, ), ),
)
        ),
        inhale_exhale=consort.AttachmentExpression(
            attachments=[
                markuptools.Markup(
                    'exhale', Up).italic().smaller().pad_around(0.5).box(),
                markuptools.Markup(
                    'inhale', Up).italic().smaller().pad_around(0.5).box(),
                markuptools.Markup(
                    'inhale', Up).italic().smaller().pad_around(0.5).box(),
            ],
            selector=selectortools.select_pitched_runs()[0],
        ),
        percussion_staff=abbreviations.percussion_staff),
    color='blue',
    labels=['pitch pipes'],
    pitch_handler=consort.AbsolutePitchHandler(pitches_are_nonsemantic=True, ),
    rhythm_maker=rhythmmakertools.EvenDivisionRhythmMaker(
        denominators=[8],
        division_masks=[
            rhythmmakertools.SustainMask(pattern=patterntools.Pattern(
                indices=[0, 2],
                period=3,
            ), ),
            rhythmmakertools.SustainMask(pattern=patterntools.Pattern(
                indices=[0, -1], ), ),
        ],
        tie_specifier=rhythmmakertools.TieSpecifier(
            tie_across_divisions=True, ),
    ),
)
Example #3
0
         attachments=spannertools.Slur(),
         selector=selectortools.Selector()
             .by_logical_tie(pitched=True)
             .by_duration('==', (1, 16), preprolated=True)
             .by_contiguity()
             .by_length('>', 1)
             .by_leaf()
         ),
     staccati=consort.AttachmentExpression(
         attachments=indicatortools.Articulation('staccato'),
         selector=selectortools.Selector()
             .by_logical_tie(pitched=True)
             .by_duration('==', (1, 16), preprolated=True)
             .by_contiguity()
             .by_leaf()
             [-1]
         ),
     ),
 color='darkyellow',
 pitch_handler=consort.AbsolutePitchHandler(
     forbid_repetitions=True,
     pitch_specifier="d' f'",
     ),
 rhythm_maker=rhythmmakertools.TaleaRhythmMaker(
     extra_counts_per_division=[0, 0, 1, 2, 0, 1],
     talea=rhythmmakertools.Talea(
         counts=[1, 1, -3],
         denominator=16,
         )
     ),
 )
                pitched=True).by_duration(
                    '==', (1, 16),
                    preprolated=True).by_contiguity().by_length('>',
                                                                1).by_leaf()),
        staccati=consort.AttachmentExpression(
            attachments=indicatortools.Articulation('staccato'),
            selector=selectortools.Selector().by_logical_tie(
                pitched=True).by_duration(
                    '==', (1, 16), preprolated=True).by_contiguity().by_length(
                        '>', 1).by_leaf()[-1]),
        staff_lines_spanner=spannertools.StaffLinesSpanner([-4, -2, 0, 2, 4]),
        text_spanner=consort.AttachmentExpression(
            attachments=abbreviations.make_text_spanner('marimba'),
            selector=selectortools.select_pitched_runs(),
        ),
    ),
    color='darkyellow',
    pitch_handler=consort.AbsolutePitchHandler(
        forbid_repetitions=True,
        logical_tie_expressions=[
            consort.ChordExpression(chord_expr=[0, 5]),
        ],
        pitch_specifier="d' f'",
    ),
    rhythm_maker=rhythmmakertools.TaleaRhythmMaker(
        extra_counts_per_division=[0, 0, 1, 2, 0, 1],
        talea=rhythmmakertools.Talea(
            counts=[1, 1, -3],
            denominator=16,
        )),
)
         ),
         selector=selectortools.Selector().by_leaf().append_callback(
             consort.AfterGraceSelectorCallback())), ),
 grace_handler=consort.GraceHandler(
     counts=(0, 1, 2, 0, 0, 0),
     only_if_preceded_by_nonsilence=True,
 ),
 pitch_handler=consort.AbsolutePitchHandler(
     deviations=(0, 0, 0, 0, 0.5, 0),
     forbid_repetitions=True,
     grace_expressions=(
         consort.HarmonicExpression('P4'),
         consort.HarmonicExpression('M3'),
         consort.HarmonicExpression('P5'),
     ),
     pitch_specifier=consort.PitchSpecifier(
         pitch_segments=(
             "a c' a a c'",
             "a g c' gs d'",
             "a c'",
         ),
         ratio=(1, 1, 1),
     ),
 ),
 rhythm_maker=consort.CompositeRhythmMaker(
     last=rhythmmakertools.NoteRhythmMaker(),
     default=rhythmmakertools.EvenDivisionRhythmMaker(
         denominators=(4, ),
         extra_counts_per_division=(0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1),
         duration_spelling_specifier=rhythmmakertools.
         DurationSpellingSpecifier(
Example #6
0
         selector=selectortools.Selector().by_logical_tie(pitched=True)[0]),
     dynamic_expressions=consort.DynamicExpression(
         start_dynamic_tokens='fff',
         only_first=True,
     ),
     text_spanner=consort.AttachmentExpression(
         attachments=abbreviations.make_text_spanner('overpressure'),
         selector=selectortools.Selector().by_leaf(),
     ),
 ),
 color=None,
 labels=[],
 pitch_handler=consort.AbsolutePitchHandler(
     deviations=[0, 1, 0, 0.5],
     logical_tie_expressions=[
         consort.ChordExpression(chord_expr=[0, 7]),
     ],
     pitch_application_rate='phrase',
     pitch_specifier='A3 B3 Bb3 C4',
 ),
 rhythm_maker=rhythmmakertools.EvenDivisionRhythmMaker(
     denominators=[8],
     extra_counts_per_division=[0, 1],
     division_masks=[
         rhythmmakertools.SustainMask(pattern=patterntools.Pattern(
             indices=[2],
             period=3,
         ), ),
         rhythmmakertools.SustainMask(pattern=patterntools.Pattern(
             indices=[0, -1], ), ),
     ],
     tie_specifier=rhythmmakertools.TieSpecifier(
Example #7
0
# -*- encoding: utf-8 -*-
import consort
from abjad.tools import rhythmmakertools


wind_low_pedal_music_specifier = consort.MusicSpecifier(
    attachment_handler=consort.AttachmentHandler(
        dynamic_expressions=consort.DynamicExpression(
            division_period=2,
            dynamic_tokens='p ppp',
            start_dynamic_tokens='niente',
            stop_dynamic_tokens='niente',
            )
        ),
    color=None,
    labels=[],
    minimum_phrase_duration=(3, 2),
    pitch_handler=consort.AbsolutePitchHandler(
        pitch_specifier='D2 F2 D2 G2 F2 D2 F2',
        ),
    rhythm_maker=rhythmmakertools.NoteRhythmMaker(
        tie_specifier=rhythmmakertools.TieSpecifier(
            tie_across_divisions=True,
            ),
        ),
    )
Example #8
0
         ),
     ),
 color='magenta',
 pitch_handler=consort.AbsolutePitchHandler(
     #logical_tie_expressions=[
     #    ],
     pitch_specifier=pitchtools.PitchSegment([
         ersilia.Percussion.WOOD_BLOCK_5,
         ersilia.Percussion.WOOD_BLOCK_4,
         ersilia.Percussion.WOOD_BLOCK_3,
         ersilia.Percussion.WOOD_BLOCK_2,
         ersilia.Percussion.WOOD_BLOCK_1,
         ersilia.Percussion.WOOD_BLOCK_4,
         ersilia.Percussion.WOOD_BLOCK_3,
         ersilia.Percussion.WOOD_BLOCK_2,
         ersilia.Percussion.WOOD_BLOCK_3,
         ersilia.Percussion.WOOD_BLOCK_2,
         ersilia.Percussion.WOOD_BLOCK_2,
         ]),
     pitch_operation_specifier=consort.PitchOperationSpecifier(
         pitch_operations=[
             None,
             pitchtools.Retrograde(),
             None,
             ],
         ),
     pitches_are_nonsemantic=True,
     ),
 rhythm_maker=rhythmmakertools.TaleaRhythmMaker(
     extra_counts_per_division=[0, 1, 2],
     talea=rhythmmakertools.Talea(
Example #9
0
left_hand_pizzicati_music_specifier = consort.MusicSpecifier(
    attachment_handler=consort.AttachmentHandler(
        arpeggio=indicatortools.Arpeggio(),
        clef_spanner=consort.AttachmentExpression(
            attachments=consort.ClefSpanner('treble'),
            selector=selectortools.Selector().by_leaf(),
            ),
        ),
    pitch_handler=consort.AbsolutePitchHandler(
        logical_tie_expressions=(
            consort.ChordExpression("cs' b' g'' ef'''"),
            consort.ChordExpression("fs e' c'' gs''"),
            consort.ChordExpression("f ef' b' g''"),
            consort.ChordExpression("fs e' c'' gs''"),
            consort.ChordExpression("c' bf' fs'' d'''"),
            consort.ChordExpression("cs' b' g'' ef'''"),
            consort.ChordExpression("f ef' b' g''"),
            consort.ChordExpression("fs e' c'' gs''"),
            consort.ChordExpression("d' c'' gs'' e'''"),
            ),
        ),
    rhythm_maker=rhythmmakertools.IncisedRhythmMaker(
        incise_specifier=rhythmmakertools.InciseSpecifier(
            fill_with_notes=False,
            prefix_counts=(1, 1, 1, 1, 2, 1),
            prefix_talea=(1,),
            suffix_talea=(1,),
            suffix_counts=(0,),
            talea_denominator=16,
            ),
# -*- encoding: utf-8 -*-
import consort
from abjad.tools import indicatortools
from abjad.tools import rhythmmakertools
from abjad.tools import selectortools

piano_arm_cluster_music_specifier = consort.MusicSpecifier(
    attachment_handler=consort.AttachmentHandler(
        accents=consort.AttachmentExpression(
            attachments=indicatortools.Articulation('accent'),
            selector=selectortools.Selector().by_logical_tie(pitched=True)[0],
        ),
        dynamic_expressions=consort.AttachmentExpression(
            attachments=indicatortools.Dynamic('fff'),
            selector=selectortools.Selector().by_logical_tie(pitched=True)[0]),
    ),
    color='yellow',
    labels=['piano arm cluster'],
    pitch_handler=consort.AbsolutePitchHandler(logical_tie_expressions=[
        consort.KeyClusterExpression(staff_space_width=19, ),
    ]),
    rhythm_maker=rhythmmakertools.IncisedRhythmMaker(
        incise_specifier=rhythmmakertools.InciseSpecifier(
            fill_with_notes=False,
            prefix_counts=[1],
            prefix_talea=[1],
            talea_denominator=8,
        ), ),
)
                        period=4,
                    ), )[0]),
        tremolo_trill=consort.AttachmentExpression(
            attachments=(
                spannertools.ComplexTrillSpanner(interval='+m3'),
                spannertools.StemTremoloSpanner(),
                spannertools.ComplexTrillSpanner(interval='+m3'),
                spannertools.ComplexTrillSpanner(interval='+M2'),
                spannertools.StemTremoloSpanner(),
            ),
            selector=selectortools.Selector().by_leaf().by_logical_tie(
                pitched=True).by_pattern(
                    patterntools.Pattern(
                        indices=[0, 1, 2],
                        period=4,
                    ), ),
        ),
    ),
    color='green',
    labels=[],
    pitch_handler=consort.AbsolutePitchHandler(
        pitch_specifier="d' f' d' fqs' ef' d' ef' f' fqs' d' g' d' d' as'",
        pitch_application_rate='division',
    ),
    rhythm_maker=rhythmmakertools.EvenDivisionRhythmMaker(
        denominators=[8, 4, 8, 1],
        duration_spelling_specifier=rhythmmakertools.DurationSpellingSpecifier(
            forbidden_written_duration=durationtools.Duration(1, 2), ),
        extra_counts_per_division=[0, 1, 0, 2, 1],
    ))
         dynamic_tokens='p ppp p ppp mf',
         start_dynamic_tokens='niente',
         stop_dynamic_tokens='niente',
     ),
     stem_tremolo_spanner=consort.AttachmentExpression(
         attachments=spannertools.StemTremoloSpanner(),
         selector=selectortools.select_pitched_runs(),
     ),
 ),
 color='red',
 labels=[],
 minimum_phrase_duration=(3, 2),
 pitch_handler=consort.AbsolutePitchHandler(
     pitch_application_rate='phrase',
     pitch_specifier=pitchtools.PitchSegment([
         ersilia.Percussion.BASS_DRUM,
         ersilia.Percussion.TAM_TAM,
     ]),
     pitches_are_nonsemantic=True,
 ),
 rhythm_maker=rhythmmakertools.EvenDivisionRhythmMaker(
     denominators=[8],
     division_masks=[
         rhythmmakertools.SustainMask(pattern=patterntools.Pattern(
             indices=[0, 1],
             period=3,
         ), ),
         rhythmmakertools.SustainMask(pattern=patterntools.Pattern(
             indices=[0, -1], ), ),
     ],
     tie_specifier=rhythmmakertools.TieSpecifier(
         tie_across_divisions=True, ),
         dynamic_tokens='p',
         only_first=True,
         ),
     glissando=consort.Glissando(),
     staff_lines_spanner=spannertools.StaffLinesSpanner(
         lines=[-4, 4],
         overrides={
             'note_head__style': 'cross',
             }
         ),
     text_spanner=abbreviations.make_text_spanner('inside'),
     ),
 color=None,
 labels=['pedaled'],
 pitch_handler=consort.AbsolutePitchHandler(
     forbid_repetitions=True,
     pitch_specifier="f c' g' c' f g' c' f c' g' f",
     ),
 rhythm_maker=consort.CompositeRhythmMaker(
     last=rhythmmakertools.IncisedRhythmMaker(
         incise_specifier=rhythmmakertools.InciseSpecifier(
             prefix_counts=[0],
             suffix_talea=[1],
             suffix_counts=[1],
             talea_denominator=16,
             ),
         duration_spelling_specifier=rhythmmakertools.DurationSpellingSpecifier(
             forbidden_written_duration=(1, 4),
             forbid_meter_rewriting=True,
             spell_metrically='unassignable',
             ),
         tie_specifier=rhythmmakertools.TieSpecifier(
Example #14
0
# -*- encoding: utf-8 -*-
import consort
from abjad.tools import rhythmmakertools
from abjad.tools import selectortools

left_hand_dietro_music_specifier = consort.MusicSpecifier(
    attachment_handler=consort.AttachmentHandler(
        clef_spanner=consort.AttachmentExpression(
            attachments=consort.ClefSpanner(
                clef='percussion',
                overrides={
                    'note_head__style': 'cross',
                },
            ),
            selector=selectortools.Selector().by_leaf(),
        ), ),
    pitch_handler=consort.AbsolutePitchHandler(logical_tie_expressions=(
        consort.ChordExpression("g b"),
        consort.ChordExpression("b d'"),
        consort.ChordExpression("d' f'"),
    ), ),
    rhythm_maker=rhythmmakertools.NoteRhythmMaker(
        tie_specifier=rhythmmakertools.TieSpecifier(
            tie_across_divisions=False, ), ),
)
Example #15
0
 pitch_handler=consort.AbsolutePitchHandler(
     deviations=(0, 0, 0, 0, 0.5, 0),
     forbid_repetitions=True,
     logical_tie_expressions=(
         consort.ChordExpression(chord_expr=(0, 8)),
         consort.ChordExpression(chord_expr=(0, 5)),
         consort.ChordExpression(chord_expr=(0, 8)),
         consort.ChordExpression(chord_expr=(0, 8)),
         consort.ChordExpression(chord_expr=(0, 5)),
         consort.ChordExpression(chord_expr=(0, 8)),
         consort.ChordExpression(chord_expr=(0, 5)),
         consort.ChordExpression(chord_expr=(0, 5)),
         consort.ChordExpression(chord_expr=(0, 10)),
         consort.ChordExpression(chord_expr=(0, 8)),
         consort.ChordExpression(chord_expr=(0, 8)),
         consort.ChordExpression(chord_expr=(0, 10)),
         ),
     pitch_specifier=consort.PitchSpecifier(
         pitch_segments=(
             "a c' c' a a c' a a g a c' c'",
             "a c' c' c' gs g c'",
             "a c' c' a a c' a g fs a a c' c'",
             ),
         ratio=(1, 1, 1),
         ),
     pitch_operation_specifier=consort.PitchOperationSpecifier(
         pitch_operations=(
             None,
             pitchtools.CompoundOperator(
                 pitchtools.Rotation(1, stravinsky=True),
                 ),
             None,
             pitchtools.CompoundOperator(
                 pitchtools.Rotation(1, stravinsky=True),
                 ),
             None,
             ),
         ratio=(2, 1, 2, 2, 1),
         ),
     ),
         ),
     slur=consort.AttachmentExpression(
         attachments=spannertools.Slur(),
         selector=selectortools.Selector()
             .by_leaf()
             .by_run(scoretools.Note)
             .by_counts(
                 [3, 3, 4],
                 cyclic=True,
                 overhang=True,
                 fuse_overhang=True,
                 )
         ),
     ),
 pitch_handler=consort.AbsolutePitchHandler(
     deviations=[0, 2, 0, 3, 0, 3, 0, 2, 0, 5, 0, 3, 0, 5],
     pitch_specifier="d' f' df'",
     pitch_application_rate='phrase',
     ),
 rhythm_maker=rhythmmakertools.EvenDivisionRhythmMaker(
     burnish_specifier=rhythmmakertools.BurnishSpecifier(
         outer_divisions_only=True,
         left_classes=[scoretools.Rest],
         left_counts=[1, 1, 0],
         right_classes=[scoretools.Rest],
         right_counts=[1, 0],
         ),
     denominators=[16],
     extra_counts_per_division=(0, 0, 1, 2, 0, 1),
     )
 )
                pitched=True).by_duration(
                    '>', (1, 16),
                    preprolated=True).by_leaf().by_length('>', 1)),
        text_spanner=consort.AttachmentExpression(
            attachments=abbreviations.make_text_spanner('snare'),
            selector=selectortools.select_pitched_runs(),
        ),
        tremolo=consort.AttachmentExpression(
            attachments=spannertools.StemTremoloSpanner(),
            selector=selectortools.Selector().by_logical_tie(
                pitched=True).by_duration('>', (1, 16), preprolated=True)),
    ),
    color='yellow',
    labels=[],
    pitch_handler=consort.AbsolutePitchHandler(
        pitch_specifier=ersilia.Percussion.SNARE_DRUM,
        pitches_are_nonsemantic=True,
    ),
    rhythm_maker=consort.CompositeRhythmMaker(
        default=rhythmmakertools.NoteRhythmMaker(
            tie_specifier=rhythmmakertools.TieSpecifier(
                tie_across_divisions=True, ), ),
        first=rhythmmakertools.IncisedRhythmMaker(
            incise_specifier=rhythmmakertools.InciseSpecifier(
                fill_with_notes=False,
                prefix_counts=[1, 2],
                prefix_talea=[1, -1],
                talea_denominator=16,
            ), ),
    ),
)
Example #18
0
     octavation=consort.OctavationExpression(),
     stem_tremolo_spanner=consort.AttachmentExpression(
         attachments=spannertools.StemTremoloSpanner(),
         selector=selectortools.select_pitched_runs(),
         ),
     ),
 color='red',
 labels=[
     'pedaled',
     'piano tremolo',
     ],
 pitch_handler=consort.AbsolutePitchHandler(
     deviations=[0, -2, 0, 0, 2, 0, 3],
     logical_tie_expressions=(
         consort.ChordExpression(
             chord_expr=pitchtools.IntervalSegment([-7, -3, 0, 5, 6, 12]),
             ),
         consort.ChordExpression(
             chord_expr=pitchtools.IntervalSegment([-7, -3, 0, 1, 5, 12]),
             ),
         ),
     pitch_specifier=consort.PitchSpecifier(
         pitch_segments=["d'", "f'", "c'"],
         ),
     ),
 rhythm_maker=rhythmmakertools.NoteRhythmMaker(
     tie_specifier=rhythmmakertools.TieSpecifier(
         tie_across_divisions=True,
         ),
     ),
 )
Example #19
0
         is_destructive=True,
         selector=selectortools.Selector()
             .by_logical_tie(pitched=True)
             .by_contiguity()
             .by_length('>', 1)
             .by_leaf()
             [-1]
         ),
     dynamic_expressions=consort.DynamicExpression(
         dynamic_tokens='p ppp p ppp mf p',
         only_first=True,
         ),
     laissez_vibrer=abbreviations.laissez_vibrer,
     ),
 pitch_handler=consort.AbsolutePitchHandler(
     logical_tie_expressions=[
         consort.ChordExpression(
             chord_expr=_,
             arpeggio_direction=Center,
             ) for _ in abbreviations.guitar_chords
         ],
     ),
 rhythm_maker=rhythmmakertools.IncisedRhythmMaker(
     incise_specifier=rhythmmakertools.InciseSpecifier(
         fill_with_notes=False,
         prefix_counts=[1, 1, 1, 2, 1, 2, 3],
         prefix_talea=[1],
         talea_denominator=16,
         ),
     ),
 )
        dynamic_expressions=consort.DynamicExpression(
            division_period=2,
            dynamic_tokens='pp mf p p mf mf pp',
            start_dynamic_tokens='fp niente',
            stop_dynamic_tokens='niente f',
        ),
        stem_tremolo_spanner=consort.AttachmentExpression(
            attachments=spannertools.StemTremoloSpanner(),
            selector=selectortools.select_pitched_runs(),
        ),
    ),
    color='red',
    pitch_handler=consort.AbsolutePitchHandler(
        logical_tie_expressions=[
            consort.ChordExpression(chord_expr=_, )
            for _ in abbreviations.guitar_chords
        ],
        pitch_specifier=consort.PitchSpecifier(
            pitch_segments=(
                'D3',
                'F3',
                'G2',
            ),
            ratio=(1, 1, 1),
        ),
    ),
    rhythm_maker=rhythmmakertools.NoteRhythmMaker(
        tie_specifier=rhythmmakertools.TieSpecifier(
            tie_across_divisions=True, ), ),
)
            attachments=indicatortools.Dynamic('pp'),
            selector=selectortools.Selector().by_logical_tie(
                pitched=True).by_duration('>', (1, 16), preprolated=True)[0]),
        text_spanner=consort.AttachmentExpression(
            attachments=abbreviations.make_text_spanner('windchimes'),
            selector=selectortools.select_pitched_runs(),
        ),
        tremolo=consort.AttachmentExpression(
            attachments=spannertools.StemTremoloSpanner(),
            selector=selectortools.Selector().by_logical_tie(
                pitched=True).by_duration('>', (1, 16), preprolated=True)),
    ),
    color='yellow',
    labels=['bamboo windchimes'],
    pitch_handler=consort.AbsolutePitchHandler(
        pitch_specifier=ersilia.Percussion.BAMBOO_WIND_CHIMES,
        pitches_are_nonsemantic=True,
    ),
    rhythm_maker=consort.CompositeRhythmMaker(
        default=rhythmmakertools.NoteRhythmMaker(
            tie_specifier=rhythmmakertools.TieSpecifier(
                tie_across_divisions=True, ), ),
        first=rhythmmakertools.IncisedRhythmMaker(
            incise_specifier=rhythmmakertools.InciseSpecifier(
                fill_with_notes=False,
                prefix_counts=[1],
                prefix_talea=[1],
                talea_denominator=16,
            ), ),
    ),
)