]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix 627, change \compressMusic to \scaleDurations.
authorNeil Puttock <n.puttock@gmail.com>
Thu, 29 May 2008 21:11:26 +0000 (22:11 +0100)
committerNeil Puttock <n.puttock@gmail.com>
Thu, 29 May 2008 21:11:26 +0000 (22:11 +0100)
Documentation/es/user/rhythms.itely
Documentation/fr/user/rhythms.itely
Documentation/user/rhythms.itely
input/lsr/changing-time-signatures-inside-a-polymetric-section-using--compressmusic.ly [deleted file]
input/lsr/changing-time-signatures-inside-a-polymetric-section-using-scaledurations.ly [new file with mode: 0644]
input/lsr/contexts-and-engravers.snippet-list
input/lsr/rhythms.snippet-list
input/new/changing-time-signatures-inside-a-polymetric-section-using-scaledurations.ly [new file with mode: 0644]
ly/music-functions-init.ly
python/convertrules.py

index a6236031ef7d80c4e65fd84a2df495947d5ceebe..8e0071f8d80343abab77a31349ec342329bf8add 100644 (file)
@@ -308,7 +308,7 @@ modificar mediante un multiplicador.  Esto es útil para saltar muchos
 compases, como por ejemplo @code{s1*23}.
 
 @cindex compresión de música
-@funindex \compressMusic
+@funindex \scaleDurations
 
 De la misma forma, se pueden comprimir por una fracción trozos de
 música más largos, como si cada nota, acorde o silencio tuviera la
@@ -316,7 +316,7 @@ fracción como multiplicador.  La sintaxis general de la iinstrucción
 que lo hace es:
 
 @example
-\compressMusic #'(@emph{numerador} . @emph{denominador}) @{ @emph{música} @}
+\scaleDurations #'(@emph{numerador} . @emph{denominador}) @{ @emph{música} @}
 @end example
 
 @noindent
@@ -331,11 +331,11 @@ comprimir y expandir la música:
 % Normal durations
 <c a>4 c8 a
 % Scale music by *2/3
-\compressMusic #'(2 . 3) {
+\scaleDurations #'(2 . 3) {
   <c a f>4. c8 a f
 }
 % Scale music by *2
-\compressMusic #'(2 . 1) {
+\scaleDurations #'(2 . 1) {
   <c' a>4 c8 b
 }
 @end lilypond
index 49fdc49997a7d779705e847b68c0d69bce7529ef..e1ae49040fac8bfce3dc4a3aa76bbb636d9b24eb 100644 (file)
@@ -819,11 +819,11 @@ commune à toutes les portées,  que vous proratiserez manuellement
 selon le cas en utilisant @code{timeSignatureFraction} pour obtenir la
 division adéquate pour chaque portée.  Les durées, dans chacune des
 portées, seront alors échelonnées par rapport à la métrique commune.
-L'échelle de représentation se règle avec @code{\compressMusic} ---
+L'échelle de représentation se règle avec @code{\scaleDurations} ---
 qui fonctionne comme @code{\times}, sans toutefois créer de crochet.
 La syntaxe appropriée est :
 @example
-\compressMusic #'(@var{numérateur} . @var{dénominateur}) @var{exprmusicale}
+\scaleDurations #'(@var{numérateur} . @var{dénominateur}) @var{exprmusicale}
 @end example
 
 
@@ -841,13 +841,13 @@ multipliées par 3/5, de telle sorte que @w{3/5 * 10/8 = 3/4}.
   \new Staff {
     \time 3/4
     \set Staff.timeSignatureFraction = #'(9 . 8)
-    \compressMusic #'(2 . 3)
+    \scaleDurations #'(2 . 3)
       \repeat unfold 6 { c8[ c c] }
   }
   \new Staff {
     \time 3/4
     \set Staff.timeSignatureFraction = #'(10 . 8)
-    \compressMusic #'(3 . 5) {
+    \scaleDurations #'(3 . 5) {
       \repeat unfold 2 { c8[ c c] }
       \repeat unfold 2 { c8[ c] }
       | c4. c4. \times 2/3 { c8 c c } c4
index 9219f8a06a51980388f6560ae692a50f45617654..a6b736c6651c639645a3eab7504a20084be74a18 100644 (file)
 @ignore
 GDP TODO list
 
-\compressMusic -> \scaleDurations.
-approved by Han-Wen; just needs somebody to kick up a fuss about
-it.
-
 1.2.3.1 Time signature
 Needs an example of beatLength, which is broken (see my recent
 mail
@@ -296,8 +292,6 @@ placed within tuplet brackets.
 @cindex scaling durations
 @cindex durations, scaling
 
-TODO Change \compressMusic to \scaleDurations when implemented.
-
 You can alter the duration of single notes, rests or chords by a
 fraction @code{N/M} by appending @code{*N/M} (or @code{*N} if
 @code{M} is 1) to the duration.
@@ -326,7 +320,7 @@ a multiplier.  This is useful for skipping many measures, e.g.,
 @code{s1*23}.
 
 @cindex compressing music
-@funindex \compressMusic
+@funindex \scaleDurations
 
 Longer stretches of music may be compressed by a fraction in the
 same way, as if every note, chord or rest had the fraction as a
@@ -341,11 +335,11 @@ and expanded:
 % Normal durations
 <c a>4 c8 a
 % Scale music by *2/3
-\compressMusic #'(2 . 3) {
+\scaleDurations #'(2 . 3) {
   <c a f>4. c8 a f
 }
 % Scale music by *2
-\compressMusic #'(2 . 1) {
+\scaleDurations #'(2 . 1) {
   <c' a>4 c8 b
 }
 @end lilypond
@@ -1212,7 +1206,7 @@ This notation can be created by setting a common time signature
 for each staff but replacing the symbol manually by setting
 @code{timeSignatureFraction} to the desired fraction and scaling
 the printed durations in each staff to the common time
-signature.  This done with @code{\compressMusic}, which
+signature.  This done with @code{\scaleDurations}, which
 is used in a similar way to @code{\times}, but does not create
 a tuplet bracket, see @ref{Scaling durations}.
 
@@ -1231,13 +1225,13 @@ staff, shown durations are multiplied by 3/5, as 3/5 * 10/8 = 3/4.
   \new Staff {
     \time 3/4
     \set Staff.timeSignatureFraction = #'(9 . 8)
-    \compressMusic #'(2 . 3)
+    \scaleDurations #'(2 . 3)
       \repeat unfold 6 { c8[ c c] }
   }
   \new Staff {
     \time 3/4
     \set Staff.timeSignatureFraction = #'(10 . 8)
-    \compressMusic #'(3 . 5) {
+    \scaleDurations #'(3 . 5) {
       \repeat unfold 2 { c8[ c c] }
       \repeat unfold 2 { c8[ c] } |
       c4. c4. \times 2/3 { c8 c c } c4
diff --git a/input/lsr/changing-time-signatures-inside-a-polymetric-section-using--compressmusic.ly b/input/lsr/changing-time-signatures-inside-a-polymetric-section-using--compressmusic.ly
deleted file mode 100644 (file)
index 46df951..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
-%% This file is in the public domain.
-\version "2.11.46"
-
-\header {
-  lsrtags = "rhythms, contexts-and-engravers"
-
-  texidoc = "
-The @code{measureLength} property, together with
-@code{measurePosition}, determines when a bar line is needed. However,
-when using @code{\\compressMusic}, the scaling of durations makes it
-difficult to change time signatures without making a mess of it.
-Therefore, @code{measureLength} has to be set manually, using the
-@code{ly:make-moment} callback. The second argument must be the same as
-the second argument of @code{\\compressMusic}. 
-
-"
-  doctitle = "Changing time signatures inside a polymetric section using \\compressMusic"
-} % begin verbatim
-\layout {
-  \context {
-    \Score
-    \remove "Timing_translator"
-    \remove "Default_bar_line_engraver"
-  }
-  \context {
-    \Staff
-    \consists "Timing_translator"
-    \consists "Default_bar_line_engraver"
-  }
-}
-
-<<
-  \new Staff {
-    \compressMusic #'(8 . 5) {
-      \time 6/8
-      \set Timing.measureLength = #(ly:make-moment 3 5)
-      b8 b b b b b
-      \time 2/4
-      \set Timing.measureLength = #(ly:make-moment 2 5)
-      b4 b
-    }
-  }
-  \new Staff {
-    \clef bass
-    \time 2/4
-    c2 d e f
-  }
->>
diff --git a/input/lsr/changing-time-signatures-inside-a-polymetric-section-using-scaledurations.ly b/input/lsr/changing-time-signatures-inside-a-polymetric-section-using-scaledurations.ly
new file mode 100644 (file)
index 0000000..09dfad9
--- /dev/null
@@ -0,0 +1,45 @@
+%% Do not edit this file; it is auto-generated from input/new
+%% This file is in the public domain.
+\version "2.11.48"
+\header {
+  lsrtags = "rhythms,contexts-and-engravers"
+  texidoc = "The @code{measureLength} property, together with
+@code{measurePosition}, determines when a bar line is needed. However,
+when using @code{\\scaleDurations}, the scaling of durations makes it
+difficult to change time signatures without making a mess of it.
+Therefore, @code{measureLength} has to be set manually, using the
+@code{ly:make-moment} callback. The second argument must be the same as
+the second argument of @code{\\scaleDurations}."
+  doctitle = "Changing time signatures inside a polymetric section using @code{\\scaleDurations}"
+} % begin verbatim
+
+\layout {
+  \context {
+    \Score
+    \remove "Timing_translator"
+    \remove "Default_bar_line_engraver"
+  }
+  \context {
+    \Staff
+    \consists "Timing_translator"
+    \consists "Default_bar_line_engraver"
+  }
+}
+
+<<
+  \new Staff {
+    \scaleDurations #'(8 . 5) {
+      \time 6/8
+      \set Timing.measureLength = #(ly:make-moment 3 5)
+      b8 b b b b b
+      \time 2/4
+      \set Timing.measureLength = #(ly:make-moment 2 5)
+      b4 b
+    }
+  }
+  \new Staff {
+    \clef bass
+    \time 2/4
+    c2 d e f
+  }
+>>
index 34d873ef8c00f2f0e2f0656e8feab84a0037a7d6..85119e85766aea7fe08a7d05964a9412ee10c4ac 100644 (file)
@@ -1,11 +1,11 @@
 creating-blank-staves.ly
 vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
+changing-time-signatures-inside-a-polymetric-section-using-scaledurations.ly
 adding-a-figured-bass-above-or-below-the-notes.ly
 adding-an-extra-staff-at-a-line-break.ly
 adding-an-extra-staff.ly
 chant-or-psalms-notation.ly
-changing-time-signatures-inside-a-polymetric-section-using--compressmusic.ly
+use-square-bracket-at-the-start-of-a-staff-group.ly
 mensurstriche-layout-bar-lines-between-the-staves.ly
 engravers-one-by-one.ly
-use-square-bracket-at-the-start-of-a-staff-group.ly
 nesting-staves.ly
index 17f851a1706943542fd1ffcc393944126cff3512..d36a0ea57559751a7802980d6ec9f71d932902dc 100644 (file)
@@ -4,23 +4,23 @@ manually-controlling-beam-positions.ly
 adding-drum-parts.ly
 rest-styles.ly
 chant-or-psalms-notation.ly
-heavily-customized-polymetric-time-signatures.ly
 controlling-tuplet-bracket-visibility.ly
-skips-in-lyric-mode-2.ly
+heavily-customized-polymetric-time-signatures.ly
 positioning-multi--measure-rests.ly
 using-ties-with-arpeggios.ly
 forcing-rehearsal-marks-to-start-from-a-given-letter-or-number.ly
 integrating-text-indications-in-metronome-marks.ly
 compound-time-signatures.ly
+changing-time-signatures-inside-a-polymetric-section-using-scaledurations.ly
 modifying-tuplet-bracket-length.ly
 printing-metronome-and-rehearsal-marks-below-the-staff.ly
-changing-time-signatures-inside-a-polymetric-section-using--compressmusic.ly
 making-an-object-invisible-with-the-transparent-property.ly
 merging-multi-measure-rests-in-a-polyphonic-part.ly
 automatic-beam-subdivisions.ly
 changing-the-tuplet-number.ly
 entering-several-tuplets-using-only-one--times-command.ly
 conducting-signs,-measure-grouping-signs.ly
+skips-in-lyric-mode-2.ly
 changing-form-of-multi--measure-rests.ly
 rhythmic-slashes.ly
 automatic-beams-two-per-two-in-4-4-or-2-2-time-signature.ly
diff --git a/input/new/changing-time-signatures-inside-a-polymetric-section-using-scaledurations.ly b/input/new/changing-time-signatures-inside-a-polymetric-section-using-scaledurations.ly
new file mode 100644 (file)
index 0000000..6cef1f8
--- /dev/null
@@ -0,0 +1,43 @@
+\version "2.11.48"
+\header {
+  lsrtags = "rhythms,contexts-and-engravers"
+  texidoc = "The @code{measureLength} property, together with
+@code{measurePosition}, determines when a bar line is needed. However,
+when using @code{\\scaleDurations}, the scaling of durations makes it
+difficult to change time signatures without making a mess of it.
+Therefore, @code{measureLength} has to be set manually, using the
+@code{ly:make-moment} callback. The second argument must be the same as
+the second argument of @code{\\scaleDurations}."
+  doctitle = "Changing time signatures inside a polymetric section using @code{\\scaleDurations}"
+}
+
+\layout {
+  \context {
+    \Score
+    \remove "Timing_translator"
+    \remove "Default_bar_line_engraver"
+  }
+  \context {
+    \Staff
+    \consists "Timing_translator"
+    \consists "Default_bar_line_engraver"
+  }
+}
+
+<<
+  \new Staff {
+    \scaleDurations #'(8 . 5) {
+      \time 6/8
+      \set Timing.measureLength = #(ly:make-moment 3 5)
+      b8 b b b b b
+      \time 2/4
+      \set Timing.measureLength = #(ly:make-moment 2 5)
+      b4 b
+    }
+  }
+  \new Staff {
+    \clef bass
+    \time 2/4
+    c2 d e f
+  }
+>>
index 3f9ad80c5ddbf04a20c2f879ff9e5da8ae0e452d..129f6a3ade08d91a79ecfc446d1ffd13dee96e0c 100644 (file)
@@ -157,7 +157,7 @@ clef =
    (make-clef-set type))
 
 
-compressMusic =
+scaleDurations =
 #(define-music-function
                  (parser location fraction music) (number-pair? ly:music?)
                  (ly:music-compress music (ly:make-moment (car fraction) (cdr fraction))))
index ebf2b5afb90fd451601bb4e68f3b5a211ff1dc9a..66c083599ddbb675e9ebfadc370b4b388c97db59 100644 (file)
@@ -3050,3 +3050,9 @@ def conv (str):
     return str
 
 conversions.append (((2, 11, 46), conv, """\\set hairpinToBarline -> \\override Hairpin #'to-barline"""))
+
+def conv (str):
+    str = re.sub (r"compressMusic", r"scaleDurations", str)
+    return str
+
+conversions.append (((2, 11, 48), conv, """\\compressMusic -> \\scaleDurations"""))