Пример #1
0
def configure_score(score):
    """
    Configures score.
    """
    # configure bell staff
    bell_staff = score["Bell Staff"]
    leaf = abjad.inspect(bell_staff).leaf(0)
    clef = abjad.Clef("treble")
    abjad.attach(clef, leaf)
    bells = abjad.Instrument(name="Campana in La",
                             short_name="Camp.",
                             pitch_range="[C4, C6]")
    abjad.attach(bells, leaf)
    mark = abjad.MetronomeMark((1, 4), (112, 120))
    abjad.attach(mark, leaf)
    # time_signature = abjad.TimeSignature((6, 4))
    # abjad.attach(time_signature, leaf)
    # configure first violin staff
    first_violin_staff = score["First Violin Staff"]
    leaf = abjad.inspect(first_violin_staff).leaf(0)
    clef = abjad.Clef("treble")
    abjad.attach(clef, leaf)
    violin = abjad.Violin(markup=abjad.Markup("Violin I"),
                          short_markup=abjad.Markup("Vl. I"))
    abjad.attach(violin, leaf)
    # configure second violin staff
    second_violin_staff = score["Second Violin Staff"]
    leaf = abjad.inspect(second_violin_staff).leaf(0)
    clef = abjad.Clef("treble")
    abjad.attach(clef, leaf)
    violin = abjad.Violin(markup=abjad.Markup("Violin II"),
                          short_markup=abjad.Markup("Vl. II"))
    abjad.attach(violin, leaf)
    # configure viola staff
    leaf = abjad.inspect(score["Viola Staff"]).leaf(0)
    clef = abjad.Clef("alto")
    abjad.attach(clef, leaf)
    viola = abjad.Viola()
    abjad.attach(viola, leaf)
    # configure cello staff
    leaf = abjad.inspect(score["Cello Staff"]).leaf(0)
    clef = abjad.Clef("bass")
    abjad.attach(clef, leaf)
    cello = abjad.Cello()
    abjad.attach(cello, leaf)
    # configure bass staff
    leaf = abjad.inspect(score["Bass Staff"]).leaf(0)
    clef = abjad.Clef("bass")
    abjad.attach(clef, leaf)
    contrabass = abjad.Contrabass(short_markup=abjad.Markup("Cb."))
    abjad.attach(contrabass, leaf)
    # configure score
    vector = abjad.SpacingVector(0, 0, 8, 0)
    abjad.override(score).vertical_axis_group.staff_staff_spacing = vector
    abjad.override(score).staff_grouper.staff_staff_spacing = vector
    abjad.override(score).staff_symbol.thickness = 0.5
    scheme = abjad.Scheme("format-mark-box-numbers")
    abjad.setting(score).mark_formatter = scheme
Пример #2
0
 class OoaDrumSet(calliope.Staff):
     instrument=abjad.Instrument(
         name="Drum Set", short_name="drum.")
     midi_instrument = "taiko drum"
     clef = "percussion"
Пример #3
0
 class BassRhythm(calliope.RhythmicStaff):
     instrument=abjad.Instrument(
         name="Bass Rhythm", short_name="b.rhm.")
     midi_instrument = "taiko drum"
Пример #4
0
 class MidRhythm(calliope.RhythmicStaff):
     instrument=abjad.Instrument(
         name="Mid Rhythm", short_name="m.rhm.")
     midi_instrument = "melodic tom"
Пример #5
0
 class HighRhythm(calliope.RhythmicStaff):
     instrument=abjad.Instrument(
         name="High Rhythm", short_name="h.rhm.")
     midi_instrument = "agogo"
Пример #6
0
 class CcoPercussion(calliope.Staff): 
         instrument=abjad.Instrument(
             name="Percussion", short_name="perc.")
         midi_instrument = "woodblock"
Пример #7
0
Файл: part.py Проект: gsy/gmajor
def configure_score(score):
    """
    Configures score.
    """
    # configure bell staff
    bell_staff = score['Bell Staff']
    leaf = abjad.inspect(bell_staff).leaf(0)
    clef = abjad.Clef('treble')
    abjad.attach(clef, leaf)
    bells = abjad.Instrument(
        name='Campana in La',
        short_name='Camp.',
        pitch_range='[C4, C6]',
        )
    abjad.attach(bells, leaf)
    mark = abjad.MetronomeMark((1, 4), (112, 120))
    abjad.attach(mark, leaf)
    time_signature = abjad.TimeSignature((6, 4))
    abjad.attach(time_signature, leaf)
    # configure first violin staff
    first_violin_staff = score['First Violin Staff']
    leaf = abjad.inspect(first_violin_staff).leaf(0)
    clef = abjad.Clef('treble')
    abjad.attach(clef, leaf)
    violin = abjad.Violin(
        markup=abjad.Markup('Violin I'),
        short_markup=abjad.Markup('Vl. I'),
        )
    abjad.attach(violin, leaf)
    # configure second violin staff
    second_violin_staff = score['Second Violin Staff']
    leaf = abjad.inspect(second_violin_staff).leaf(0)
    clef = abjad.Clef('treble')
    abjad.attach(clef, leaf)
    violin = abjad.Violin(
        markup=abjad.Markup('Violin II'),
        short_markup=abjad.Markup('Vl. II'),
        )
    abjad.attach(violin, leaf)
    # configure viola staff
    leaf = abjad.inspect(score['Viola Staff']).leaf(0)
    clef = abjad.Clef('alto')
    abjad.attach(clef, leaf)
    viola = abjad.Viola()
    abjad.attach(viola, leaf)
    # configure cello staff
    leaf = abjad.inspect(score['Cello Staff']).leaf(0)
    clef = abjad.Clef('bass')
    abjad.attach(clef, leaf)
    cello = abjad.Cello()
    abjad.attach(cello, leaf)
    # configure bass staff
    leaf = abjad.inspect(score['Bass Staff']).leaf(0)
    clef = abjad.Clef('bass')
    abjad.attach(clef, leaf)
    contrabass = abjad.Contrabass(
        short_markup=abjad.Markup('Cb.'),
        )
    abjad.attach(contrabass, leaf)
    # configure score
    vector = abjad.SpacingVector(0, 0, 8, 0)
    abjad.override(score).vertical_axis_group.staff_staff_spacing = vector
    abjad.override(score).staff_grouper.staff_staff_spacing = vector
    abjad.override(score).staff_symbol.thickness = 0.5
    scheme = abjad.Scheme('format-mark-box-numbers')
    abjad.setting(score).mark_formatter = scheme
Пример #8
0
 class S1(calliope.Staff):
     instrument = abjad.Instrument(
         name="S 1",
         short_name="s.1",
     )
Пример #9
0
 class S0(calliope.Staff):
     instrument = abjad.Instrument(
         name="S 0",
         short_name="s.0",
     )
Пример #10
0
 class CcoPercussion(calliope.RhythmicStaff):
     instrument = abjad.Instrument(name="Percussion",
                                   short_name="perc.")
     clef = "percussion"