selector=selectortools.Selector().by_logical_tie(
             pitched=True).by_duration(
                 '>', (1, 16),
                 preprolated=True).by_leaf().by_length('==', 1)[0]),
     swell=consort.AttachmentExpression(
         attachments=spannertools.Hairpin('niente < f'),
         selector=selectortools.Selector().by_logical_tie(
             pitched=True).by_duration(
                 '>', (1, 16),
                 preprolated=True).by_leaf().by_length('>', 1)),
     text_spanner=consort.AttachmentExpression(
         attachments=abbreviations.make_text_spanner('crotales'),
         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.PitchClassPitchHandler(
     forbid_repetitions=True,
     pitch_specifier=abbreviations.agitato_pitch_specifier,
     register_specifier=consort.RegisterSpecifier(
         base_pitch="c'''",
         segment_inflections=consort.RegisterInflection.zigzag(6).align()),
 ),
 rhythm_maker=consort.CompositeRhythmMaker(
     default=rhythmmakertools.NoteRhythmMaker(
         tie_specifier=rhythmmakertools.TieSpecifier(
         dynamic_tokens='p mf',
         start_dynamic_tokens='niente fp',
         stop_dynamic_tokens='niente ff'),
     glissando=consort.Glissando(),
     tenuti=consort.AttachmentExpression(
         attachments=indicatortools.Articulation('tenuto'),
         selector=selectortools.Selector().by_leaf().by_logical_tie(
             pitched=True).by_pattern(
                 patterntools.Pattern(
                     indices=[3],
                     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(
Example #3
0
shaker_tremolo_music_specifier = consort.MusicSpecifier(
    attachment_handler=consort.AttachmentHandler(
        accents=consort.AttachmentExpression(
            attachments=indicatortools.Articulation('accent'),
            selector=selectortools.Selector()
                .by_leaf()
                .by_run(scoretools.Note)
                [0],
            ),
        dynamic_expression=consort.DynamicExpression(
            dynamic_tokens='fp',
            ),
        percussion_staff=abbreviations.percussion_staff,
        text_spanner=consort.AttachmentExpression(
            attachments=abbreviations.make_text_spanner('shaker'),
            selector=selectortools.Selector().by_leaf(),
            ),
        tremolo_spanner=spannertools.StemTremoloSpanner(),
        ),
    color='blue',
    labels=['shakers'],
    pitch_handler=consort.AbsolutePitchHandler(
        pitches_are_nonsemantic=True,
        ),
    rhythm_maker=rhythmmakertools.NoteRhythmMaker(
        tie_specifier=rhythmmakertools.TieSpecifier(
            tie_across_divisions=True,
            ),
        ),
    )
from abjad.tools import selectortools
from abjad.tools import spannertools
from ersilia.materials import abbreviations

string_tremolo_music_specifier = consort.MusicSpecifier(
    attachment_handler=consort.AttachmentHandler(
        accents=consort.AttachmentExpression(
            attachments=indicatortools.Articulation('accent'),
            selector=selectortools.Selector().by_logical_tie().by_duration(
                '==', (1, 16), preprolated=True).with_next_leaf()),
        dynamic_expressions=consort.DynamicExpression(
            division_period=2,
            dynamic_tokens='p ppp mp',
            start_dynamic_tokens='niente fp',
        ),
        stem_tremolo=spannertools.StemTremoloSpanner(),
    ),
    color='red',
    labels=[],
    pitch_handler=consort.PitchClassPitchHandler(
        deviations=[0, 0.5, 0, -0.5],
        logical_tie_expressions=[
            consort.ChordExpression([0, 8]),
        ],
        pitch_application_rate='phrase',
        pitch_specifier=abbreviations.agitato_pitch_specifier,
        pitch_operation_specifier=abbreviations.pitch_operation_specifier,
        register_specifier=consort.RegisterSpecifier(base_pitch='G3', ),
    ),
    rhythm_maker=rhythmmakertools.EvenDivisionRhythmMaker(
        denominators=[16],