def test_transpose_from_written_pitch_01():
    staff = abjad.Staff("a'4 a'4 a'4 a'4")
    trill_pitch = abjad.NamedPitch("b'")
    start_trill_span = abjad.StartTrillSpan(pitch=trill_pitch)
    abjad.attach(start_trill_span, staff[1])
    stop_trill_span = abjad.StopTrillSpan()
    abjad.attach(stop_trill_span, staff[2])
    instrument = abjad.AltoSaxophone()
    abjad.attach(instrument, staff[0])

    abjad.iterpitches.transpose_from_written_pitch(staff)

    string = abjad.lilypond(staff)
    assert string == abjad.String.normalize(
        r"""
        \new Staff
        {
            c'4
            \pitchedTrill
            c'4
            \startTrillSpan d'
            c'4
            \stopTrillSpan
            c'4
        }
        """
    )
Пример #2
0
    for i, logicl_tie in enumerate(logicl_ties):
        if logicl_tie.is_pitched == True:
            pitch = next(pitches)
            for note in logicl_tie:
                note.written_pitch = pitch

#attach instruments and clefs

print('Adding attachments ...')

instruments = cyc([
    abjad.SopraninoSaxophone(),
    abjad.SopranoSaxophone(),
    abjad.SopranoSaxophone(),
    abjad.SopranoSaxophone(),
    abjad.AltoSaxophone(),
    abjad.AltoSaxophone(),
    abjad.AltoSaxophone(),
    abjad.TenorSaxophone(),
    abjad.TenorSaxophone(),
    abjad.TenorSaxophone(),
    abjad.BaritoneSaxophone(),
    abjad.BaritoneSaxophone(),
    abjad.BaritoneSaxophone(),
    abjad.BassSaxophone(),
    abjad.BassSaxophone(),
    abjad.ContrabassSaxophone(),
])

abbreviations = cyc([
    abjad.MarginMarkup(markup=abjad.Markup(abbrev))
Пример #3
0
bar_line = abjad.BarLine("||")
metro = abjad.MetronomeMark((1, 4), 60)
markup1 = abjad.Markup(r"\bold { A }")
markup2 = abjad.Markup(r"\bold { B }")
markup3 = abjad.Markup(r"\bold { C }")
markup4 = abjad.Markup(r"\bold { D }")
markup5 = abjad.Markup(r"\bold { E }")
markup6 = abjad.Markup(r"\bold { F }")
mark1 = abjad.RehearsalMark(markup=markup1)
mark2 = abjad.RehearsalMark(markup=markup2)
mark3 = abjad.RehearsalMark(markup=markup3)
mark4 = abjad.RehearsalMark(markup=markup4)
mark5 = abjad.RehearsalMark(markup=markup5)
mark6 = abjad.RehearsalMark(markup=markup6)

instruments1 = cyc([abjad.Flute(), abjad.AltoSaxophone(), abjad.Cello()])

clefs1 = cyc([abjad.Clef("treble"), abjad.Clef("treble"), abjad.Clef("bass")])

abbreviations1 = cyc([
    abjad.MarginMarkup(markup=abjad.Markup("fl.")),
    abjad.MarginMarkup(markup=abjad.Markup("sx.")),
    abjad.MarginMarkup(markup=abjad.Markup("vc.")),
])

names1 = cyc([
    abjad.StartMarkup(markup=abjad.Markup("Flute")),
    abjad.StartMarkup(markup=abjad.Markup("Saxophone")),
    abjad.StartMarkup(markup=abjad.Markup("Violoncello")),
])
Пример #4
0
import abjad

instrument_one = abjad.AltoSaxophone()
instrument_one_range = instrument_one.pitch_range
instrument_one_range_lowest = abjad.NumberedPitch(
    instrument_one_range.start_pitch)
instrument_one_range_highest = abjad.NumberedPitch(
    instrument_one_range.stop_pitch)

instruments = [instrument_one]  # arbitrary change
voices = len(instruments)

voice_to_name_dict = {"Voice 1": "saxophone"}
Пример #5
0
 class OoaAltoSax2(calliope.Staff):
     instrument=abjad.AltoSaxophone(
         name="Alto Saxophone 2", short_name="asax.2")
     midi_instrument = "alto sax"
Пример #6
0
 class OoaAltoSaxes(calliope.Staff):
     instrument = abjad.AltoSaxophone(name="Alto Saxophone 1,2",
                                      short_name="asax.1,2")