\include "changePitch.ly" %%%%%%%%%%%%%%%% example 1 \paper { line-width = 150 } pattern = { c8.-> c16-. } newnotes = \relative c' { c d e f < c e> < b d> c } \changePitch \pattern \newnotes %%%%%%%%%%%%%%%% example 2 newnotes = \relative c' { c^-\p( d) e\< f g^-( f) e^"hello" d c^-\f } \changePitch \pattern \newnotes %%%%%%%%%%%%%%%% example 3 pattern = { c8 r r4 c8 r c r} newnotes = \relative c' { f e d c} \changePitch \pattern \newnotes %%%%%%%%%%%%%%%% example 4 newnotes = \relative c' { f e d c s } \changePitch \pattern \newnotes %%%%%%%%%%%%%%%% example 5 pattern = { c8.-> c16-. } newnotes = \relative c' { c d e f \insert { \override Voice.NoteHead #'color = #red } g f e d c } \changePitch \pattern \newnotes \pageBreak %%%%%%%%%%%%%%%% example 6-7 patI = \repeat unfold 2 {r8 \repeat unfold 2 {g16 c e}} patII = \repeat unfold 2 { << \new Voice {\voiceTwo c2 } \new Voice {\voiceOne r16 \samePitch {e8. ~ e4} } >> } \score { \new PianoStaff << \new Staff \cPI \relative c' { g' c e a, d f g, d' f g, c e a, e' a fis, a d g, d' g e, g c e, g c d, fis c' %etc } \new Staff { \clef bass \cPII \relative c' { c e c d b d c e c e c d b d b c a c d, a' %etc } } >> }