replacement.beam.unspan() _replace_measure(pitches[76 - 1], replacement) ### hiding bow rests and rest dots ### for leaf in bow.leaves: if isinstance(leaf, Rest): ### TODO - map the Rest grob to some Abjad structure ### leaf.formatter.before.append( r"\once \override Rest #'transparent = ##t") if leaf.duration._dots: leaf.dots.transparent = True ### numbering / unnumbering ### unnumber(staves) for leaf in instances(staves, '_Leaf'): leaf.formatter.right = [ x for x in leaf.formatter.right if 'blue' not in x] x2 = time() print('music interpretation: %s seconds.' % round(x2 - x1, 2)) #print('pickling ...') #dump_pickle(staves, 'color-3.pkl') print('writing ly ...') file(VOICESDIR + 'violin/pitches.ly', 'w').write(staves[2][0].format) file(VOICESDIR + 'violin/bow.ly', 'w').write(staves[3][0].format)
for leaf in rh.leaves[730 : 771 + 1] + rh.leaves[777 : 779 + 1] + rh.leaves[782 : 785 + 1]: split(leaf, lh._parent) for leaf in rh.leaves[809 : 811 + 1]: split(leaf, lh._parent) ### number measures ### for staff in staves: for voice in staff: for i, measure in enumerate(voice): measure.comments.before.append("measure %s" % (i + 1)) ### remove original leaf numbering ### unnumber(staves) for leaf in instances(staves, "_Leaf"): leaf.formatter.right = [x for x in leaf.formatter.right if "blue" not in x and "red" not in x] ### apply new leaf numbering to accommodate rh split ### number(rh) number(lh) rhoctspan(734, 734, 1, 0, 6) rh.leaves[740].dynamics = "f" rh.leaves[740].articulations.append("tenuto") rh.leaves[742].articulations.append("tenuto") rh.leaves[741].pitches = [18, 26, 28] # transpose e'''' down to e''' rh.leaves[744].articulations.append("tenuto")