]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 185 Squishing chords
authorTrevor Daniels <t.daniels@treda.co.uk>
Thu, 19 Jan 2017 20:47:36 +0000 (20:47 +0000)
committerTrevor Daniels <t.daniels@treda.co.uk>
Sat, 28 Jan 2017 15:12:12 +0000 (15:12 +0000)
  Add a user-level interface to the event-chord-reduce function.

  Document its use for squishing chords in music being used to
  provide the rhythms to RhythmicStaff and the Pitch_squash_engraver.

Documentation/notation/rhythms.itely
ly/music-functions-init.ly

index 9d4a75634699f2515e5936f5fc3b1c0d171c3b05..8dc6252ecaf2f7f18bba4cc3cc6e209760e5b612 100644 (file)
@@ -1929,6 +1929,22 @@ be done with the @code{Pitch_squash_engraver} and
 >>
 @end lilypond
 
+Music containing chords can also be used as input to @code{RhythmicStaff}
+and for use with the @code{Pitch_squash_engraver} if the chords are first
+reduced to single notes with the @code{\reduceChords} music function:
+
+@lilypond[quote,verbatim]
+\new RhythmicStaff {
+  \time 4/4
+  \reduceChords {
+    <c>2
+    <e>2
+    <c e g>2
+    <c e g>4
+    <c e g>4
+  }
+}
+@end lilypond
 
 @predefined
 @code{\improvisationOn},
index 1f94319bce743ca1e6994eebdff7daa672db0e12..d7eba42a4b03159d4b14860031596db4930111ff 100644 (file)
@@ -1506,6 +1506,12 @@ usually contains spacers or multi-measure rests.")
                'element main-music
                'quoted-music-name what))
 
+reduceChords =
+#(define-music-function (music) (ly:music?)
+   (_i "Reduce chords contained in @var{music} to single notes,
+intended mainly for reusing music in RhythmicStaff.  Does not
+reduce parallel music.")
+   (event-chord-reduce music))
 
 relative =
 #(define-music-function (pitch music)