def va(m): accumulator( ("va", (1, 10)), baca.staff_lines(1), baca.dynamic( '"mf"', abjad.Tweak(r"- \tweak self-alignment-X -0.75"), ), ) accumulator( ("va", (1, 10)), library.style_tailpiece_material( abjad.Tweak(r"- \tweak bound-details.right.padding 2"), ), ) accumulator( ("va", 12), baca.staff_lines(5), )
('vcr', 1), baca.mmrest_transparent(), ) # rh maker( 'rh', baca.alternate_bow_strokes(), baca.chunk( baca.bar_extent_persistent((-4, 4)), baca.literal([ r'\once \override RHStaff.StaffSymbol.line-positions =' " #'(8.2 8 7.8 -5.8 -6 -6.2)" ]), baca.staff_lines(7), ), baca.dynamic( 'mp-sempre', abjad.tweak(-0.9).self_alignment_X, ), baca.literal(r'\override DynamicLineSpanner.staff-padding = 2.5'), baca.literal(r'\override Score.BarNumber.transparent = ##t'), baca.markup( r'\huitzil-directly-on-bridge-markup', abjad.tweak(3).staff_padding, literal=True, ), baca.staff_position(8), baca.tuplet_bracket_down(), )
def battuti( maker, counts, *, first=False, omit_contrabasses=False, range_=(1, -1), ): section_to_members = { "First.Violin": 18, "Second.Violin": 18, "Viola": 18, "Cello": 14, "Contrabass": 6, } section_to_abbreviation = { "First.Violin": "Vni. I", "Second.Violin": "Vni. II", "Viola": "Vle.", "Cello": "Vc.", "Contrabass": "Cb.", } def upper_voice(): return baca.suite(baca.not_parts(baca.voice_one()), baca.staff_position(1)) def lower_voice(): return baca.suite(baca.not_parts(baca.voice_two()), baca.staff_position(-1)) duration = sum([_.duration for _ in maker.time_signatures]) assert isinstance(duration, abjad.Duration), repr(duration) wrap = duration.with_denominator(16).numerator for section, members in section_to_members.items(): if omit_contrabasses and section == "Contrabass": continue for member in range(1, members + 1): commands = [] voice = f"{section}.Voice.{member}" maker(voice, parts(section, member)) rhythm = clb_rhythm(section, member, counts, wrap) commands.append(rhythm) if member % 2 == 0: polyphony = lower_voice() else: polyphony = upper_voice() if first: markup = abjad.Markup( r"\animales-col-legno-battuti-explanation") command: baca.CommandTyping command = baca.markup( markup, selector=baca.selectors.leaf(0), ) command = baca.only_parts(command) commands.append(command) command = baca.staff_lines(1) commands.append(command) command = baca.clef("percussion") commands.append(command) if first and member % 2 == 1: abbreviation = section_to_abbreviation[section] key = f"{abbreviation} ({member}-{member+1})" margin_markup_ = margin_markup(key) commands.append(margin_markup_) commands.append(polyphony) maker((voice, range_), *commands)
time_signatures=library.time_signatures[:6], voice_abbreviations=library.voice_abbreviations(), voice_names=voice_names, ) commands( "Global_Skips", baca.metronome_mark("114"), ) # single-staff percussion commands( "perc1", library.parts("Percussion", 1), baca.staff_lines(1), ) commands( "perc2", library.parts("Percussion", 2), baca.staff_lines(1), ) commands( "perc4", library.parts("Percussion", 4), baca.staff_lines(1), ) # start markup
maker( ('cl', (69, 75)), krummzeit.white_rhythm([(3, 8)]), ) maker( ('vn', (72, 75)), baca.chunk( baca.bar_extent((-2, 2)), baca.bar_extent_persistent( (-2, 0), after=True, tag=baca.const.NOT_PARTS, ), baca.staff_lines(1), ), baca.clef('percussion'), baca.dynamic('mf'), baca.instrument(krummzeit.instruments['Percussion']), baca.make_repeat_tied_notes(), baca.markup( krummzeit.markup.stonecircle_scrape_at_moderate_speed(), boxed=True, ), baca.staff_position(0), ) maker( baca.timeline([ ('pf', (1, 11)),
baca.metronome_mark('72', selector=baca.leaf(27 - 1)), baca.metronome_mark('4.=4', selector=baca.leaf(27 - 1)), baca.metronome_mark(baca.Accelerando(), selector=baca.leaf(27 - 1)), baca.metronome_mark('108', selector=baca.leaf(35 - 1)), baca.rehearsal_mark('D'), ) maker( ('perc', (1, 3)), baca.chunk( baca.bar_extent_persistent( (0, 2), after=True, tag=baca.const.NOT_PARTS, ), baca.staff_lines(1), ), baca.markup('tam-tam', boxed=True), krummzeit.incise_attacks(), ) maker( [ ('vn', (1, 13)), ('va', (1, 7)), ('vc', (1, 13)), ], krummzeit.right_remainder_quarters(), ) maker(
baca.mmrest_transparent(), ) # rh maker( 'rh', baca.chunk( baca.bar_extent_persistent((-4, 4)), baca.literal([ r'\once \override RHStaff.StaffSymbol.line-positions =' " #'(8.2 8 7.8 -5.8 -6 -6.2 -8 -10 -12 -14 -16 -17.8 -18 -18.2)", r"\morleyDashedStaffSymbolLines #'(" " #f #f #f #f #f #f #t #t #t #t #t #f #f #f)", ]), baca.staff_lines(14), ), baca.literal(r'\override DynamicLineSpanner.staff-padding = 7'), baca.markup( r'\huitzil-ascending-fingerboard-markup', abjad.tweak(-1).self_alignment_X, abjad.tweak(4.5).staff_padding, literal=True, ), baca.markup( r'\huitzil-directly-above-end-of-fingerboard-markup', abjad.tweak(-1).self_alignment_X, abjad.tweak(1).staff_padding, literal=True, ), baca.stem_tremolo(
library.battuti( commands, [[1, -55], [1, -17], [1, -17]], omit_contrabasses=True, ) commands( "cb3", library.parts("Contrabass"), baca.clef("bass"), baca.hairpin("p <", right_broken=True), baca.make_repeat_tied_notes(), baca.markup(r"\baca-arco-markup"), baca.pitch("C#2"), baca.staff_lines(5), ) if __name__ == "__main__": metadata, persist, score, timing = baca.build.interpret_segment( score, commands, **baca.score_interpretation_defaults(), all_music_in_part_containers=True, always_make_global_rests=True, error_on_not_yet_pitched=True, transpose_score=True, ) lilypond_file = baca.make_lilypond_file( score, include_layout_ly=True,
) maker( 'pf', baca.clef('treble'), baca.make_repeat_tied_notes(), ) maker( 'perc', baca.chunk( baca.bar_extent_persistent( (-2, 2), tag=baca.const.NOT_PARTS, ), baca.staff_lines(5), ), baca.clef('treble'), baca.make_repeat_tied_notes(), ) maker( ('vn', (1, 40)), krummzeit.closing_pizzicati( counts=[2, 4, 4, 8, 4, 4, 2, 1, 1, 8, 8, 8], extra_counts_per_division=[2, 2, 1, 2, 4, 6], split_divisions_by_counts=[6, 18], ) ) maker(