]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/test/smart-transpose.ly
Remove input/test/ files that have been moved into LSR.
[lilypond.git] / input / test / smart-transpose.ly
index d8fdd1edaf67f0fd7443c05311444ad6b5ecf60d..f6e31ca57d6371580916aad70b7015374ce57132 100644 (file)
@@ -1,5 +1,5 @@
-
-\version "2.2.0"
+\version "2.10.0"
+\sourcefilename "smart-transpose.ly"
 
 \header {
 texidoc="@cindex Smart Transpose
@@ -8,8 +8,7 @@ There is a way to enforce enharmonic modifications for notes in order
 to have the minimum number of accidentals. In that case, ``Double 
 accidentals should be removed, as well as E-sharp (-> F), bC (-> B),
 bF (-> E), B-sharp (-> C).'', as proposed by a request for a new feature.
-In that manner, the most natural enharmonic notes are chosen in this example.
-
+In this manner, the most natural enharmonic notes are chosen in this example.
 "
 }
 %
@@ -64,16 +63,20 @@ In that manner, the most natural enharmonic notes are chosen in this example.
 
     music))
 
-music = \notes \relative c' { c4 d  e f g a b  c }
+music =  \relative c' { c4 d  e f g a b  c }
+
+naturaliseMusic =
+#(define-music-function (parser location m)
+                                       (ly:music?)
+                       (naturalise m))
 
 \score {
-  \notes \context Staff {
+   \context Staff {
     \transpose c ais \music
-    \apply #naturalise \transpose c ais \music
+    \naturaliseMusic \transpose c ais \music
     \transpose c deses \music
-    \apply #naturalise \transpose c deses \music
+    \naturaliseMusic \transpose c deses \music
   }
-  \paper { raggedright = ##t}
+  \layout { ragged-right = ##t}
 }
 
-