Exemplo n.º 1
0
# -*- coding: utf-8 -*-
import abjad
from cfg.cfg import PERSISTENCEDIR
from music import find, number

eighths = load_pickle(PERSISTENCEDIR + 'eighths.pkl')
staves = load_pickle(PERSISTENCEDIR + 'paint.pkl')

p1Staff = staves[4]
p1Voice = find(p1Staff, 'piano-1 voice')
p1Leaves = instances(p1Staff, '_Leaf')
p1Staff.name = 'RH'
p1Voice.name = 'RHVoice'

p2Staff = staves[5]
p2Voice = find(p2Staff, 'piano-2 voice')
p2Leaves = instances(p2Staff, '_Leaf')
p2Staff.name = 'LH'
p2Voice.name = 'LHVoice'

crossVoice = p1Voice.copy()
crossVoice.name = 'cross voice'
p2Staff.insert(0, crossVoice)
p2Staff.brackets = 'double-angle'

# make sure to traverse and cast first ...
for l in crossVoice.leaves:
    Skip(l)
    l.beam.counts = None
    l.beam.unspan()
Exemplo n.º 2
0
# -*- coding: utf-8 -*-
import abjad
from cfg.cfg import PERSISTENCEDIR
from music import find, number


eighths = load_pickle(PERSISTENCEDIR + "eighths.pkl")
staves = load_pickle(PERSISTENCEDIR + "color-1.pkl")

# FLUTE

flutePitchStaff = find(staves, "pitches-fl staff")
flutePitchVoice = find(flutePitchStaff, "pitches-fl voice")

breathStaff = find(staves, "breath staff")
breathVoice = find(staves, "breath voice")
for l in breathVoice.leaves:
    l.history["class"] = l.__class__.__name__

attackVoice = breathVoice.copy()
attackVoice.invocation = "AttackVoice"
for l in attackVoice.leaves:
    l.duration.rewrite((1, 16))
    l.beam.clear()
    l.beam.counts = None
    l.beam.unspan()
    if l.kind("Note"):
        l.pitch = 19
    else:
        Skip(l)
Exemplo n.º 3
0
# -*- coding: utf-8 -*-
import abjad
from cfg.cfg import PERSISTENCEDIR
from music import find, number

eighths = load_pickle(PERSISTENCEDIR + 'eighths.pkl')
staves = load_pickle(PERSISTENCEDIR + 'color-1.pkl')

violinPitchStaff = find(staves, 'pitches-vl staff')
violinPitchVoice = find(staves, 'pitches-vl voice')

bowStaff = find(staves, 'bow staff')
bowVoice = find(staves, 'bow voice')
bowVoice.invocation = 'BowVoice'
for l in bowVoice.leaves:
    l.history['class'] = l.__class__.__name__

bowReferenceVoice = bowVoice.copy()
bowReferenceVoice.invocation = 'BowReferenceVoice'
bowStaff.append(bowReferenceVoice)
for l in bowReferenceVoice.leaves:
    l.beam.counts = None
    l.beam.unspan()
    if not l.kind('Rest'):
        Skip(l)

number(violinPitchVoice)
number(bowVoice)