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
que lo hace es:
@example
-\compressMusic #'(@emph{numerador} . @emph{denominador}) @{ @emph{música} @}
+\scaleDurations #'(@emph{numerador} . @emph{denominador}) @{ @emph{música} @}
@end example
@noindent
% 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
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
\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
@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
@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.
@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
% 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
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}.
\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
+++ /dev/null
-%% 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
- }
->>
--- /dev/null
+%% 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
+ }
+>>
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
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
--- /dev/null
+\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
+ }
+>>
(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))))
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"""))