handlers¶
Handler classes.
Classes
Articulation Handler |
|
Bend Handler |
|
Bisbigliando Handler |
|
Bow Angle Handler: In Progress |
|
Clef Handler |
|
Composite Handler |
|
Dynamic Handler |
|
Gettato Handler |
|
Glissando Handler |
|
Grace Handler |
|
Handler Base Class |
|
Notehead Handler |
|
On Beat Grace Handler |
|
Pitch Handler |
|
Rhythm Handler |
|
Slur Handler |
|
Tempo Spanner Handler |
|
Text Span Handler |
|
Trill Handler |
- class evans.handlers.ArticulationHandler(articulation_list=None, articulation_boolean_vector=(1), vector_forget=False, forget=True, count=- 1, vector_count=- 1, name='Articulation Handler')[source]¶
Articulation Handler
>>> staff = abjad.Staff("c'4 c'4 c'4 r4 c'4 c'4 c'4 c'4 c'4") >>> art_lst = [ ... "staccato", ... "tenuto", ... "staccatissimo", ... "open", ... "halfopen", ... "stopped", ... "portato", ... "tremolo", ... ] >>> handler = evans.ArticulationHandler( ... articulation_list=art_lst, ... articulation_boolean_vector=[1], ... vector_forget=False, ... forget=False, ... ) >>> handler(staff) >>> score = abjad.Score([staff]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> abjad.show(file)
Attributes Summary
Call self as a function.
Special methods
Methods
- class evans.handlers.BendHandler(bend_amounts=(1), bend_forget=False, boolean_vector=(1), vector_forget=False, bend_count=- 1, vector_count=- 1, name='Bend Handler')[source]¶
Bend Handler
>>> staff = abjad.Staff("c'4 c'4 c'4 c'4") >>> handler = evans.BendHandler( ... bend_amounts=[1, 1.5], ... bend_forget=False, ... boolean_vector=[1, 1, 0, 1], ... vector_forget=False, ... ) >>> handler(staff) >>> score = abjad.Score([staff]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> abjad.show(file)
Attributes Summary
Call self as a function.
Special methods
Methods
- class evans.handlers.BisbigliandoHandler(*, bis_count=- 1, bool_count=- 1, boolean_vector=None, forget=False, fingering_list=None, name=None, padding=2, right_padding=2, staff_padding=2)[source]¶
Bisbigliando Handler
>>> s = abjad.Staff("c''4 c''4 c''4 c''4") >>> m = [ ... r"\markup {", ... r"\lower #1.5", ... r"\override #'(graphical . #t)", ... r"\override #'(size . 0.4)", ... r"\override #'(thickness . 0.25)", ... r"\woodwind-diagram", ... r"#'flute", ... r"#'((cc . (one two three four five six)) (lh . (bes b gis)) (rh . (bes d dis ees cis c gz)))", ... r"}", ... ] >>> handler = evans.BisbigliandoHandler( ... fingering_list=[None, m], ... boolean_vector=[1], ... staff_padding=2, ... forget=False, ... ) >>> handler(s[:-1]) >>> score = abjad.Score([s]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> abjad.show(file)
Attributes Summary
Call self as a function.
Special methods
Methods
- class evans.handlers.BowAngleHandler(angles=(0, 45))[source]¶
Bow Angle Handler: In Progress
>>> s = abjad.Staff("c'2 c'2 c'2 c'2 r2 r2") >>> handler = evans.BowAngleHandler([0, 45, 0, -45]) >>> handler(s) >>> score = abjad.Score([s]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=[ ... "abjad.ily", ... "/Users/evansdsg2/evans/lilypond/evans-markups.ily", ... "/Users/evansdsg2/evans/lilypond/evans-spanners.ily", ... ], ... global_staff_size=16, ... ) >>> abjad.show(file)
Attributes Summary
Call self as a function.
Special methods
Methods
- class evans.handlers.ClefHandler(clef=None, clef_shelf=None, allowable_clefs=None, add_extended_clefs=False, ottava_shelf=None, add_ottavas=False, extend_in_direction='up')[source]¶
Clef Handler
>>> s = abjad.Staff("c,4 c'4 c4 c''4 c''''8 r8") >>> handler = evans.ClefHandler( ... clef="bass", ... add_extended_clefs=True, ... add_ottavas=True, ... ) >>> handler(s) >>> score = abjad.Score([s]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> abjad.show(file)
Attributes Summary
Call self as a function.
Special methods
- class evans.handlers.CompositeHandler(rhythm_handler=None, attachment_handlers=(None), name='Composite Handler')[source]¶
Composite Handler
>>> durs = [abjad.Duration((4, 4))] >>> rh = evans.RhythmHandler(evans.RTMMaker(["(1 (1 1 1 1))"])) >>> ph = evans.PitchHandler([0, 1, 2, 3]) >>> ah = evans.ArticulationHandler(["staccato", "tenuto"]) >>> comp = evans.CompositeHandler(rhythm_handler=rh, attachment_handlers=[ph, ah]) >>> n = comp(durations=durs) >>> st = abjad.Staff() >>> st.extend(n) >>> score = abjad.Score([st]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> abjad.show(file)
Attributes Summary
Call self as a function.
Special methods
Methods
- class evans.handlers.DynamicHandler(dynamic_list=None, flare_boolean_vector=[0], flare_forget=False, hold_first_boolean_vector=[0], hold_first_forget=False, hold_last_boolean_vector=[0], hold_last_forget=False, effort_boolean_vector=[0], effort_forget=False, with_constante_hairpins=True, forget=False, terminating_dynamic_markup=False, terminating_dynamic_markup_boolean_vector=[1], count_1=- 1, count_2=- 1, count_3=- 1, count_4=- 1, count_5=- 1, name='Dynamic Handler')[source]¶
Dynamic Handler
>>> staff = abjad.Staff("c'4 d'4 e'4 f'4 r4 g'4 r2") >>> handler = evans.DynamicHandler( ... dynamic_list=["f", "niente", "p", "mf"], ... flare_boolean_vector=[0, 0, 0, 1], ... flare_forget=False, ... hold_first_boolean_vector=[ ... 1, ... 0, ... 0, ... ], ... hold_first_forget=False, ... hold_last_boolean_vector=[0, 1], ... hold_last_forget=False, ... effort_boolean_vector=[1, 0], ... effort_forget=False, ... forget=False, ... ) >>> first_group = staff[0:3] >>> second_group = staff[2:] >>> handler(first_group) >>> handler(second_group) >>> score = abjad.Score([staff]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> abjad.show(file)
Attributes Summary
Call self as a function.
Special methods
Methods
- class evans.handlers.GettatoHandler(number_of_attacks=[4, 5, 6], attack_number_forget=False, actions=['throw', 'drop'], action_forget=False, boolean_vector=[1], vector_forget=False, attack_count=- 1, action_count=- 1, vector_count=- 1, name='Gettato Handler')[source]¶
Gettato Handler
>>> staff = abjad.Voice("c'4 fs'4 c''4 gqs''4", name="Voice 1") >>> handler = evans.GettatoHandler( ... number_of_attacks=[4, 5, 6], ... actions=["throw", "drop"], ... ) >>> handler(staff) >>> score = abjad.Score([staff]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> abjad.show(file)
Attributes Summary
Call self as a function.
Special methods
Methods
- class evans.handlers.GlissandoHandler(glissando_style=None, line_style=None, boolean_vector=[0], forget=False, apply_to='runs', count=- 1, name='Glissando Handler')[source]¶
Glissando Handler
>>> staff = abjad.Staff("c'4 c'4 c'4 c'4") >>> handler = evans.GlissandoHandler( ... line_style="dotted-line", ... boolean_vector=[1], ... forget=False, ... apply_to="runs", ... ) >>> handler(staff) >>> score = abjad.Score([staff]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> abjad.show(file)
Attributes Summary
Call self as a function.
Special methods
Methods
- class evans.handlers.GraceHandler(boolean_vector=None, gesture_lengths=None, forget=True, remove_skips=False, vector_count=- 1, gesture_count=- 1, name='Grace Handler')[source]¶
Grace Handler
>>> staff = abjad.Staff("c'4 c'4 c'4 c'4") >>> handler = evans.GraceHandler( ... boolean_vector=[0, 1, 0, 1], ... gesture_lengths=[1, 2], ... forget=False, ... ) >>> handler(staff[:]) >>> score = abjad.Score([staff]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> abjad.show(file)
Attributes Summary
Call self as a function.
Special methods
Methods
- class evans.handlers.Handler[source]¶
Handler Base Class
Attributes Summary
Return repr(self).
Special methods
- class evans.handlers.IntermittentVoiceHandler(rhythm_handler, direction=Up)[source]¶
>>> ph_up = evans.PitchHandler([8, 8.5, 9, 9.5, 9, 8.5], forget=False) >>> ph_down = evans.PitchHandler([0, 1, 2, 3, 4, 5], forget=False) >>> s = abjad.Staff( ... [abjad.Voice("c'4 c'8 c'8 c'8 c'4.", name="Voice1")], name="Staff1" ... ) >>> ph_down(s) >>> h = evans.RhythmHandler( ... rmakers.stack( ... rmakers.talea( ... [1, 2, 3, 4], ... 8, ... extra_counts=[1, 0, -1], ... ), ... rmakers.trivialize(abjad.select().tuplets()), ... rmakers.extract_trivial(abjad.select().tuplets()), ... rmakers.rewrite_rest_filled(abjad.select().tuplets()), ... rmakers.rewrite_sustained(abjad.select().tuplets()), ... ), ... forget=False, ... ) >>> ivh = evans.IntermittentVoiceHandler(h, direction=abjad.Up) >>> sel1 = abjad.select(s["Voice1"]).leaf(0) >>> sel2 = abjad.select(s["Voice1"]).leaf(2) >>> sel3 = abjad.select(s["Voice1"]).leaves().get([3, 4]) >>> ivh(sel1) >>> ivh(sel2) >>> ivh(sel3) >>> ph_up = evans.PitchHandler([8, 8.5, 9, 9.5, 9, 8.5], forget=False) >>> for voice in abjad.select(s).components(abjad.Voice): ... if voice.name == "intermittent_voice": ... ph_up(voice) ... >>> score = abjad.Score([s]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> abjad.show(file)
Attributes Summary
Call self as a function.
Special methods
- class evans.handlers.NoteheadHandler(notehead_list=None, transition=False, head_boolean_vector=[0], head_vector_forget=False, transition_boolean_vector=[0], transition_vector_forget=False, forget=True, count=- 1, name='Notehead Handler')[source]¶
Notehead Handler
>>> staff = abjad.Staff("c'4 c'4 c'4 c'4") >>> handler = evans.NoteheadHandler( ... notehead_list=["default", "harmonic", "triangle", "slash"], ... transition=True, ... head_boolean_vector=[1], ... head_vector_forget=False, ... transition_boolean_vector=[0, 1], ... transition_vector_forget=False, ... forget=True, ... ) >>> handler(staff) >>> score = abjad.Score([staff]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> abjad.show(file)
Attributes Summary
Call self as a function.
Special methods
Methods
- class evans.handlers.OnBeatGraceHandler(number_of_attacks=[4, 5, 6], durations=[2, 1, 1, 1, 2, 1, 2, 1, 1], attack_number_forget=False, durations_forget=False, font_size=- 4, leaf_duration=(1, 28), boolean_vector=[1], vector_forget=False, attack_count=- 1, durations_count=- 1, vector_count=- 1, name='On Beat Grace Handler')[source]¶
On Beat Grace Handler
>>> grace_handler = evans.OnBeatGraceHandler( ... number_of_attacks=[ ... 4, ... 3, ... 4, ... 5, ... 6, ... 3, ... 4, ... 3, ... 4, ... 3, ... 4, ... 5, ... 5, ... 3, ... 4, ... 3, ... ], ... durations=[ ... 2, ... 1, ... 1, ... 1, ... 2, ... 1, ... 2, ... 1, ... 1, ... ], ... font_size=-4, ... leaf_duration=(1, 100), ... attack_number_forget=False, ... durations_forget=False, ... boolean_vector=[1], ... vector_forget=False, ... name="On Beat Grace Handler", ... ) >>> head_handler = evans.NoteheadHandler( ... ["harmonic"], ... head_boolean_vector=[1], ... forget=False, ... ) >>> pitch_handler = evans.PitchHandler( ... [ ... 30, ... 32, ... 29.5, ... 31, ... 31.5, ... 33, ... 30, ... 29, ... 32.5, ... ], ... forget=False, ... ) >>> s = abjad.Staff([abjad.Voice("e''4 e''2 e''4", name="Voice1")], name="Staff1") >>> grace_handler(abjad.select(s).leaf(1)) >>> pitch_handler(abjad.select(s).logical_ties(grace=True)) >>> head_handler(abjad.select(s).logical_ties(grace=True)) >>> score = abjad.Score([s]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> abjad.show(file)
Attributes Summary
Call self as a function.
Special methods
Methods
- class evans.handlers.PitchHandler(pitch_list=None, allow_chord_duplicates=False, apply_all=False, apply_all_spelling=None, as_ratios=False, chord_boolean_vector=[0], chord_groups=None, forget=True, to_ties=False, pitch_count=- 1, state=None, chord_boolean_count=- 1, chord_groups_count=- 1, name='Pitch Handler')[source]¶
Pitch Handler
>>> import fractions
>>> s = abjad.Staff("c'4 c'4 c'4 c'4") >>> handler = evans.PitchHandler( ... pitch_list=[1, 2, 3, 4], ... forget=False, ... ) >>> handler(abjad.select(s).logical_ties()) >>> score = abjad.Score([s]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> abjad.show(file)
>>> s = abjad.Staff("c'4 c'4 c'4 c'4") >>> handler = evans.PitchHandler( ... pitch_list=[1, [2, 3], 4], ... forget=False, ... ) >>> handler(abjad.select(s).logical_ties()) >>> score = abjad.Score([s]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> abjad.show(file)
>>> s = abjad.Staff("c'4 c'4 c'4 c'4") >>> handler = evans.PitchHandler( ... pitch_list=[0, 1, 2.5, 3, 4, 5.5], ... chord_boolean_vector=[0, 1, 1], ... chord_groups=[2, 4], ... forget=False, ... ) >>> handler(abjad.select(s).logical_ties()) >>> score = abjad.Score([s]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> abjad.show(file)
>>> s = abjad.Staff("c'4 c'4 c'4 c'4") >>> handler = evans.PitchHandler( ... pitch_list=[0, 1, 1, 3, 4, 5.5], ... allow_chord_duplicates=True, ... chord_boolean_vector=[0, 1, 1], ... chord_groups=[2, 4], ... forget=False, ... ) >>> handler(abjad.select(s).logical_ties()) >>> score = abjad.Score([s]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> abjad.show(file)
>>> s = abjad.Staff("c'4 c'4 c'4 c'4") >>> handler = evans.PitchHandler( ... pitch_list=[1, fractions.Fraction(9, 4), 3, 4], ... forget=False, ... ) >>> handler(abjad.select(s).logical_ties()) >>> score = abjad.Score([s]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score, abjad.Block(name="layout")], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> style = '"dodecaphonic"' >>> file.layout_block.items.append(fr"\accidentalStyle {style}") >>> abjad.show(file)
>>> s = abjad.Staff("c'4 c'4 c'4 c'4") >>> handler = evans.PitchHandler( ... pitch_list=[1, [fractions.Fraction(4, 3), 4], 5, fractions.Fraction(37, 6)], ... allow_chord_duplicates=True, ... forget=False, ... ) >>> handler(abjad.select(s).logical_ties()) >>> score = abjad.Score([s]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score, abjad.Block(name="layout")], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> style = '"dodecaphonic"' >>> file.layout_block.items.append(fr"\accidentalStyle {style}") >>> abjad.show(file)
>>> s = abjad.Staff("c'4 c'4 c'4 c'4") >>> handler = evans.PitchHandler( ... pitch_list=[ ... fractions.Fraction(3, 4), ... [ ... fractions.Fraction(25, 2), ... fractions.Fraction(4, 3), ... ], ... 2, ... fractions.Fraction(23, 4), ... ], ... forget=False, ... allow_chord_duplicates=True, ... ) >>> handler(s) >>> score = abjad.Score([s]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score, abjad.Block(name="layout")], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> style = '"dodecaphonic"' >>> file.layout_block.items.append(fr"\accidentalStyle {style}") >>> abjad.show(file)
>>> pitch_set = microtones.PitchSegment([0, Fraction(3, 2), 7, Fraction(19, 4)]) >>> pitch_set = pitch_set + pitch_set.invert(2).multiply(Fraction(5, 4)) >>> pitch_set = pitch_set + pitch_set.retrograde().rotate(3).transpose( ... Fraction(13, 2) ... ) >>> pitch_set = microtones.PitchSegment( ... [evans.to_nearest_eighth_tone(_) for _ in pitch_set] ... ) >>> notes = [abjad.Note() for _ in pitch_set] >>> staff = abjad.Staff(notes) >>> handler = evans.PitchHandler( ... pitch_list=[_ for _ in pitch_set], ... forget=False, ... ) >>> handler(staff) >>> score = abjad.Score([staff]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score, abjad.Block(name="layout")], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> style = '"dodecaphonic"' >>> file.layout_block.items.append(fr"\accidentalStyle {style}") >>> abjad.show(file)
>>> pitch_segment = microtones.PitchSegment([0, Fraction(3, 2), 7, Fraction(19, 4)]) >>> pitch_segment = pitch_segment + pitch_segment.invert(2).multiply(Fraction(5, 4)) >>> pitch_segment = pitch_segment + pitch_segment.retrograde().rotate(3).transpose( ... Fraction(13, 2) ... ) >>> pitch_segment = microtones.PitchSegment( ... [evans.to_nearest_eighth_tone(_) for _ in pitch_segment] ... ) >>> notes = [abjad.Note() for _ in pitch_segment] >>> staff = abjad.Staff(notes) >>> handler = evans.PitchHandler( ... pitch_list=[_ for _ in pitch_set], ... apply_all=True, ... forget=False, ... ) >>> handler(staff) >>> score = abjad.Score([staff]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score, abjad.Block(name="layout")], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> style = '"dodecaphonic"' >>> file.layout_block.items.append(fr"\accidentalStyle {style}") >>> abjad.show(file)
>>> ratio_segment = microtones.RatioSegment([1, Fraction(3, 2), Fraction(5, 4)]) >>> ratio_segment = ratio_segment + ratio_segment.invert(2).multiply(Fraction(5, 4)) >>> ratio_segment = ratio_segment + ratio_segment.retrograde().rotate(3).transpose( ... 1 ... ) >>> notes = [abjad.Note() for _ in ratio_segment] >>> staff = abjad.Staff(notes) >>> handler = evans.PitchHandler( ... pitch_list=[_ for _ in ratio_segment], ... as_ratios=True, ... forget=False, ... ) >>> handler(staff) >>> score = abjad.Score([staff]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score, abjad.Block(name="layout")], ... includes=["ekmelos-ji-accidental-markups.ily"], ... global_staff_size=16, ... ) >>> style = '"dodecaphonic"' >>> file.layout_block.items.append(fr"\accidentalStyle {style}") >>> abjad.show(file)
Attributes Summary
Call self as a function.
Special methods
Methods
- class evans.handlers.RhythmHandler(rmaker, forget=True, state=None, name='Rhythm Handler')[source]¶
Rhythm Handler
>>> spans = abjad.TimespanList( ... [ ... abjad.Timespan(0, 1), ... abjad.Timespan(1, 2), ... ] ... ) >>> maker = rmakers.stack(rmakers.NoteRhythmMaker()) >>> handler = evans.RhythmHandler(rmaker=maker) >>> staff = abjad.Staff() >>> for span in spans: ... selections = maker([span.duration]) ... staff.extend(selections) ... >>> score = abjad.Score([staff]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> abjad.show(file)
Attributes Summary
Call self as a function.
Special methods
Methods
- class evans.handlers.SlurHandler(apply_slur_to='runs', boolean_vector=[1], forget=False, count=- 1, name='Slur Handler')[source]¶
Slur Handler
>>> staff = abjad.Staff("c'4 c'4 c'4 c'4") >>> handler = evans.SlurHandler() >>> handler(staff) >>> score = abjad.Score([staff]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> abjad.show(file)
Attributes Summary
Call self as a function.
Special methods
Methods
- class evans.handlers.TempoSpannerHandler(tempo_list=[(3, 0, 1, '87'), (3, 0, 1, '95')], boolean_vector=[1], padding=4, staff_padding=2, font_size=2, forget=False, tempo_count=- 1, bool_count=- 1, name='Tempo Spanner Handler')[source]¶
Tempo Spanner Handler
>>> s = abjad.Staff("s4 s4 s4 s4") >>> handler = evans.TempoSpannerHandler( ... tempo_list=[(3, 0, 1, "87"), (3, 0, 1, "95")], ... boolean_vector=[1], ... padding=4, ... staff_padding=2, ... forget=False, ... ) >>> handler(s[:-1]) >>> score = abjad.Score([s]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=[ ... "abjad.ily", ... "/Users/evansdsg2/evans/lilypond/evans-spanners.ily", ... ], ... global_staff_size=16, ... ) >>> abjad.show(file)
Attributes Summary
Call self as a function.
Special methods
Methods
- class evans.handlers.TextSpanHandler(span_one_positions=None, span_one_style=None, span_one_padding=None, attach_span_one_to=None, span_two_positions=None, span_two_style=None, span_two_padding=None, attach_span_two_to=None, span_three_positions=None, span_three_style=None, span_three_padding=None, attach_span_three_to=None, hooks=True, forget=True, count_1=- 1, count_2=- 1, count_3=- 1, name='TextSpan Handler')[source]¶
Text Span Handler
>>> staff = abjad.Staff("c'4 c'4 c'4 r4") >>> handler = evans.TextSpanHandler( ... span_one_positions=["pont.", "tast."], ... span_one_style="dashed-line", ... span_one_padding=1.5, ... attach_span_one_to="bounds", ... ) >>> handler(staff) >>> score = abjad.Score([staff]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> abjad.show(file)
Attributes Summary
Call self as a function.
Special methods
Methods
- class evans.handlers.TrillHandler(boolean_vector=[0], forget=False, count=- 1, name='Trill Handler', only_chords=False)[source]¶
Trill Handler
>>> staff = abjad.Staff("<c' d'>4 c'4 c'4 <c' d'>4 c'4 c'4 c'4 c'4 ") >>> handler = evans.TrillHandler(boolean_vector=[0, 1], forget=False) >>> handler(staff) >>> score = abjad.Score([staff]) >>> moment = "#(ly:make-moment 1 25)" >>> abjad.setting(score).proportional_notation_duration = moment >>> file = abjad.LilyPondFile( ... items=[score], ... includes=["abjad.ily"], ... global_staff_size=16, ... ) >>> abjad.show(file)
Attributes Summary
Call self as a function.
Special methods
Methods