From: Jean-Charles Malahieude Date: Sat, 25 May 2013 10:36:59 +0000 (+0200) Subject: Merge branch 'master' into translation X-Git-Tag: release/2.17.19-1~8 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=94345c6367d9e6a7dac6711cbb81845e8e889db5;hp=01a5fd7af43a9b70f002f49775287f5736da0bec;p=lilypond.git Merge branch 'master' into translation --- diff --git a/Documentation/changes.tely b/Documentation/changes.tely index 313f3845be..683cdb54fc 100644 --- a/Documentation/changes.tely +++ b/Documentation/changes.tely @@ -62,14 +62,18 @@ which scares away people. @end ignore @item -Horizontal space is allowed for tempo and rehearsal marks, -so that these marks do not overlap each other. -A new command @code{\markLengthOff} turns this feature off. -@lilypond[quote,relative=0] -\compressFullBarRests -\tempo "Molto vivace" c''2 c' -\mark\default -\tempo "Meno mosso" R1*16 +Grob @code{OctavateEight} was renamed to @code{ClefModifier}. +Related context properties were renamed from @code{xxxOctavationyyy} +to @code{xxxTranspositionyyy}. + +@item +There is a new @code{\absolute} command explicitly marking music +as being entered in absolute pitch. While this has been the +default previously, an explicit @code{\absolute} also prevents +reinterpretation when the passage is placed inside of +@code{\relative}: +@lilypond[verbatim,quote] +\relative c { c'4 \absolute { f'' g'' } c } @end lilypond @item @@ -161,6 +165,41 @@ contains @code{\transposition}. Previously, was equivalent to @code{\transposition f'}. Now it stays equivalent to @code{\transposition bes'}. +@item +When checking for collisions, LilyPond no longer treats objects as +rectangles. Instead, the actual shape of objects is approximated +using an integral-like approach. This generally results in more +even and snug positioning of objects and systems: + +@lilypond[relative=1] +#(ly:set-option 'debug-skylines #t) +\dynamicUp +c'4\f a4\f d\f( f) +a,4\< c c c\! +d4-.\downbow a4^"r'venu..." c \tempo "T1" e +@end lilypond + +Previously, the above snippet looked like this: + +@lilypond[relative=1] +#(ly:set-option 'debug-skylines #t) +\override Hairpin #'vertical-skylines = #'() +\override DynamicText #'vertical-skylines = #'() +\override TextScript #'vertical-skylines = #'() +\override Score.MetronomeMark #'vertical-skylines = #'() +\override Staff.Clef #'vertical-skylines = #'() +\dynamicUp +c'4\f a4\f d\f( f) +a,4\< c c c\! +d4-.\downbow a4^"r'venu..." c \tempo "T1" e +@end lilypond + +Affected objects include @code{Accidentals}, @code{Beams}, @code{Clefs}, +@code{Dynamics}, @code{FiguredBass}, @code{Flags}, @code{Glissandos}, +@code{Lyrics}, @code{MetronomeMarks}, @code{OttavaBrackets}, +@code{Pedals}, @code{RehearsalMarks}, @code{Rests}, @code{Scripts}, +@code{TextScripts}, @code{Ties}, @code{Tuplets} and @code{VoltaBrackets}. + @item Tuplets are now created with the @code{\tuplet} command, which takes a fraction @code{@var{t}/@var{n}} to specify that @var{t} @@ -214,7 +253,7 @@ than@tie{}0. The byte offset (also part of @code{textedit} @acronym{URI}s) still starts at@tie{}0. @item -The @code{\clef} command supports optional octavation: +The @code{\clef} command supports optional transposition: @lilypond[verbatim,quote,relative=1] \clef "treble_(8)" c2 c diff --git a/Documentation/cs/learning/fundamental.itely b/Documentation/cs/learning/fundamental.itely index c4c5e6eeb5..a0eee4d3a1 100644 --- a/Documentation/cs/learning/fundamental.itely +++ b/Documentation/cs/learning/fundamental.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes. @end ignore -@c \version "2.17.11" +@c \version "2.17.18" @c Translators: Pavel Fric @node Základní pojmy @@ -1940,7 +1940,7 @@ während das dazu dient, sie in allen Systemen auszuschalten: >> @end lilypond -Ein anderes Beispiel ist die Eigenschaft @code{clefOctavation}: +Ein anderes Beispiel ist die Eigenschaft @code{clefTransposition}: wenn sie im @code{Score}-Kontext gesetzt wird, ändert sich sofort der Wert der Oktavierung in allen aktuellen Systemen und wird auf einen neuen Wert gesetzt, der sich auf alle Systeme auswirkt. diff --git a/Documentation/de/learning/fundamental.itely b/Documentation/de/learning/fundamental.itely index f53b326965..bd96bfc91f 100644 --- a/Documentation/de/learning/fundamental.itely +++ b/Documentation/de/learning/fundamental.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes. @end ignore -@c \version "2.17.11" +@c \version "2.17.18" @c Translators: Till Paala, Reinhold Kainhofer @node Grundbegriffe @@ -1975,7 +1975,7 @@ während das dazu dient, sie in allen Systemen auszuschalten: >> @end lilypond -Ein anderes Beispiel ist die Eigenschaft @code{clefOctavation}: +Ein anderes Beispiel ist die Eigenschaft @code{clefTransposition}: wenn sie im @code{Score}-Kontext gesetzt wird, ändert sich sofort der Wert der Oktavierung in allen aktuellen Systemen und wird auf einen neuen Wert gesetzt, der sich auf alle Systeme auswirkt. diff --git a/Documentation/de/notation/changing-defaults.itely b/Documentation/de/notation/changing-defaults.itely index b63b85561e..97585267c0 100644 --- a/Documentation/de/notation/changing-defaults.itely +++ b/Documentation/de/notation/changing-defaults.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.17.6" +@c \version "2.17.18" @c Translators: Till Paala @@ -3328,7 +3328,7 @@ jeweiligen Standardeinstellungen der Eigenschaft: @item @code{KeySignature} (Tonart) @tab @code{Staff} @tab @code{begin-of-line-visible} @c omit LeftEdge until it can be explained -td @c @item @code{LeftEdge} @tab @code{Score} @tab @code{center-invisible} -@item @code{OctavateEight} (Oktavierungs-Acht) @tab @code{Staff} @tab @code{begin-of-line-visible} +@item @code{ClefModifier} (Oktavierungs-Acht) @tab @code{Staff} @tab @code{begin-of-line-visible} @item @code{RehearsalMark} (Übungszeichen) @tab @code{Score} @tab @code{end-of-line-invisible} @item @code{TimeSignature} (Taktart) @tab @code{Staff} @tab @code{all-visible} @@ -3485,10 +3485,10 @@ auftreten. @cindex Schlüssel, Sichtbarkeit der Oktavierung Das kleine Oktavierungssymbol von oktavierten Notenschlüsseln -wird durch das @code{OctavateEight}-Layout-Objekt erstellt. +wird durch das @code{ClefModifier}-Layout-Objekt erstellt. Seine Sichtbarkeit wird automatisch vom @code{Clef}-Objekt geerbt, sodass Veränderungen von @code{break-visibility} -des @code{OctavateEight}-Layout-Objekts nicht auch noch +des @code{ClefModifier}-Layout-Objekts nicht auch noch für unsichtbare Schlüssel zusätzlich vorgenommen werden müssen. Bei expliziten Schlüsseländerungn kontrolliert die diff --git a/Documentation/de/notation/pitches.itely b/Documentation/de/notation/pitches.itely index 5c59324229..70129c81c7 100644 --- a/Documentation/de/notation/pitches.itely +++ b/Documentation/de/notation/pitches.itely @@ -7,7 +7,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.17.6" +@c \version "2.17.18" @c Translators: Till Paala @@ -1230,7 +1230,7 @@ Schnipsel: Referenz der Interna: @rinternals{Clef_engraver}, @rinternals{Clef}, -@rinternals{OctavateEight}, +@rinternals{ClefModifier}, @rinternals{clef-interface}. diff --git a/Documentation/de/notation/vocal.itely b/Documentation/de/notation/vocal.itely index 8c42e5b442..2a9bf9157a 100644 --- a/Documentation/de/notation/vocal.itely +++ b/Documentation/de/notation/vocal.itely @@ -7,7 +7,7 @@ Guide, node Updating translation committishes. @end ignore -@c \version "2.17.11" +@c \version "2.17.18" @c Translators: Till Paala @@ -2559,7 +2559,7 @@ der Figur angezeigt werden kann. #`((instrumentTransposition . ,(ly:make-pitch -1 0 0)) (shortInstrumentName . "Kas.") (clefGlyph . "clefs.G") - (clefOctavation . -7) + (clefTransposition . -7) (middleCPosition . 1) (clefPosition . -2) (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Kaspar")) @@ -2569,7 +2569,7 @@ der Figur angezeigt werden kann. #`((instrumentTransposition . ,(ly:make-pitch 0 0 0)) (shortInstrumentName . "Mel.") (clefGlyph . "clefs.F") - (clefOctavation . 0) + (clefTransposition . 0) (middleCPosition . 6) (clefPosition . 2) (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Melchior")) diff --git a/Documentation/de/texidocs/tweaking-clef-properties.texidoc b/Documentation/de/texidocs/tweaking-clef-properties.texidoc index 70ec26012b..c2ea8011be 100644 --- a/Documentation/de/texidocs/tweaking-clef-properties.texidoc +++ b/Documentation/de/texidocs/tweaking-clef-properties.texidoc @@ -4,7 +4,7 @@ Der Befehl @code{\\clef \"treble_8\"} ist gleichbedeutend mit einem expliziten Setzen der Eigenschaften von @code{clefGlyph}, @code{clefPosition} (welche die vertikale Position des Schlüssels bestimmt), -@code{middleCPosition} und @code{clefOctavation}. Ein Schlüssel wird +@code{middleCPosition} und @code{clefTransposition}. Ein Schlüssel wird ausgegeben, wenn eine der Eigenschaften außer @code{middleCPosition} sich ändert. @@ -14,7 +14,7 @@ auf dem System: das geschieht nur, wenn auch die Position des eingestrichenen@tie{}C (middleCPosition) angegeben wird. Die Positionsparameter sind relativ zur Mittellinie des Systems, dabei versetzen positive Zahlen die Position nach oben, jeweils eine Zahl für jede Linie -plus Zwischenraum. Der @code{clefOctavation}-Wert ist normalerweise auf 7, +plus Zwischenraum. Der @code{clefTransposition}-Wert ist normalerweise auf 7, -7, 15 oder -15 gesetzt, aber auch andere Werte sind gültig. Wenn ein Schlüsselwechsel an einem Zeilenwechsel geschieht, wird das neue diff --git a/Documentation/es/learning/fundamental.itely b/Documentation/es/learning/fundamental.itely index 36315c2966..260a294cc8 100644 --- a/Documentation/es/learning/fundamental.itely +++ b/Documentation/es/learning/fundamental.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.17.11" +@c \version "2.17.18" @node Conceptos fundamentales @@ -1880,7 +1880,7 @@ y esto los desactivará en todos los pentagramas: >> @end lilypond -Como un ejemplo más, si se establece @code{clefOctavation} dentro del +Como un ejemplo más, si se establece @code{clefTransposition} dentro del contexto de @code{Score}, éste cambia inmediatamente el valor de la octavación en todos los pentagramas en curso y establece un nuevo valor predeterminado que se aplicará a todos los pentagramas. diff --git a/Documentation/es/notation/changing-defaults.itely b/Documentation/es/notation/changing-defaults.itely index 466ee24080..7ec80fbc1e 100644 --- a/Documentation/es/notation/changing-defaults.itely +++ b/Documentation/es/notation/changing-defaults.itely @@ -8,7 +8,7 @@ Translation of GIT committish: 91aeca2562af49ff24110e923d5196bebd95f372 Guide, node Updating translation committishes.. @end ignore -@c \version "2.17.6" +@c \version "2.17.18" @node Cambiar los valores por omisión @chapter Cambiar los valores por omisión @@ -3324,7 +3324,7 @@ de presentación de interés que resultan afectados por @item @code{KeySignature} @tab @code{Staff} @tab @code{begin-of-line-visible} @c omit LeftEdge until it can be explained -td @c @item @code{LeftEdge} @tab @code{Score} @tab @code{center-invisible} -@item @code{OctavateEight} @tab @code{Staff} @tab @code{begin-of-line-visible} +@item @code{ClefModifier} @tab @code{Staff} @tab @code{begin-of-line-visible} @item @code{RehearsalMark} @tab @code{Score} @tab @code{end-of-line-invisible} @item @code{TimeSignature} @tab @code{Staff} @tab @code{all-visible} @@ -3357,7 +3357,7 @@ línea a no ser que su valor establecido sea distinto de 1. se suprimen por completo. Utilice begin-of line-invisible para imprimirlas y all-invisible para suprimirlas. @item Armadura: véase más abajo -@item OctavateEight: véase más abajo +@item ClefModifier: véase más abajo @end itemize @@ -3499,11 +3499,11 @@ explícitas. @cindex claves, visibilidad de la octavación El pequeño símbolo de octava sobre las claves en octava alta o baja se -produce por parte del objeto @code{OctavateEight}. Su visibilidad se +produce por parte del objeto @code{ClefModifier}. Su visibilidad se hereda automáticamente de la del objeto @code{Clef}, así que no es necesario aplicar las sobreescrituras correspondientes @code{break-visibility} a los objetos -@code{OctavateEight} para suprimir los símbolos de octavación +@code{ClefModifier} para suprimir los símbolos de octavación para las claves invisibles. Para los cambios de clave explícitos, la propiedad diff --git a/Documentation/es/notation/pitches.itely b/Documentation/es/notation/pitches.itely index 6c2513ed7a..14fb61f468 100644 --- a/Documentation/es/notation/pitches.itely +++ b/Documentation/es/notation/pitches.itely @@ -7,7 +7,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.17.6" +@c \version "2.17.18" @node Alturas @@ -1209,19 +1209,19 @@ Fragmentos de código: Referencia de funcionamiento interno: @rinternals{Clef_engraver}, @rinternals{Clef}, -@rinternals{OctavateEight}, +@rinternals{ClefModifier}, @rinternals{clef-interface}. @knownissues Los números de octavación adjuntos a las claves se tratan como grobs distintos. Así pues, cualquier @code{\override} (sobreescritura) efectuada al objeto @var{Clef} deberá aplicarse -también al grob @var{OctavateEight} como un @code{\override} +también al grob @var{ClefModifier} como un @code{\override} diferente. @lilypond[fragment,quote,relative=1] \new Staff \with { - \override OctavateEight.color = #red + \override ClefModifier.color = #red \override Clef.color = #blue } diff --git a/Documentation/es/notation/vocal.itely b/Documentation/es/notation/vocal.itely index e617026ace..12b63fd7b0 100644 --- a/Documentation/es/notation/vocal.itely +++ b/Documentation/es/notation/vocal.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.17.11" +@c \version "2.17.18" @node Música vocal @section Música vocal @@ -2566,7 +2566,7 @@ usar @code{\instrumentSwitch} para indicar cada uno de los cambios. #`((instrumentTransposition . ,(ly:make-pitch -1 0 0)) (shortInstrumentName . "Kas.") (clefGlyph . "clefs.G") - (clefOctavation . -7) + (clefTransposition . -7) (middleCPosition . 1) (clefPosition . -2) (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Kaspar")) @@ -2576,7 +2576,7 @@ usar @code{\instrumentSwitch} para indicar cada uno de los cambios. #`((instrumentTransposition . ,(ly:make-pitch 0 0 0)) (shortInstrumentName . "Mel.") (clefGlyph . "clefs.F") - (clefOctavation . 0) + (clefTransposition . 0) (middleCPosition . 6) (clefPosition . 2) (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Melchior")) diff --git a/Documentation/es/texidocs/tweaking-clef-properties.texidoc b/Documentation/es/texidocs/tweaking-clef-properties.texidoc index 1cf4720d0f..50124fbbb4 100644 --- a/Documentation/es/texidocs/tweaking-clef-properties.texidoc +++ b/Documentation/es/texidocs/tweaking-clef-properties.texidoc @@ -4,7 +4,7 @@ La instrucción @code{\\clef \"treble_8\"} equivale a un ajuste de @code{clefGlyph}, @code{clefPosition} (que controla la posición vertical de la clave), @code{middleCPosition} y -@code{clefOctavation}. Se imprime una clave cada vez que se +@code{clefTransposition}. Se imprime una clave cada vez que se modifica cualquiera de las propiedades excepto @code{middleCPosition}. @@ -14,7 +14,7 @@ notas del pentagrama: para hacer esto también se debe especificar la posición del Do central. Los parámetros posicionales están en relación con la tercera línea del pentagrama, los números positivos desplazan hacia arriba, contando una unidad por cada -línea y espacio. El valor de @code{clefOctavation} se +línea y espacio. El valor de @code{clefTransposition} se establecería normalmente a 7, -7, 15 or -15, pero son válidos otros valores. diff --git a/Documentation/extending/programming-interface.itely b/Documentation/extending/programming-interface.itely index 438c406932..b1611e0fa4 100644 --- a/Documentation/extending/programming-interface.itely +++ b/Documentation/extending/programming-interface.itely @@ -427,6 +427,55 @@ manualBeam = } @end lilypond +@funindex \temporary +@cindex temporary overrides +@cindex overrides, temporary +@cindex properties, popping previous value + +Properties are maintained conceptually using one stack per property +per grob per context. Music functions may need to override one or +several properties for the duration of the function, restoring them +to their previous value before exiting. However, normal overrides +pop and discard the top of the current property stack before +pushing to it, so the previous value of the property is lost when it +is overridden. When the previous value must be preserved, prefix the +@code{\override} command with @code{\temporary}, like this: + +@example +\temporary \override @dots{} +@end example + +The use of @code{\temporary} causes the (usually set) @code{pop-first} +property in the override to be cleared, so the previous value is not +popped off the property stack before pushing the new value onto it. +When a subsequent @code{\revert} pops off the temporarily overriden +value, the previous value will re-emerge. + +In other words, calling @code{\temporary \override} and @code{\revert} +in succession on the same property will have a net effect of zero. +Similarly, pairing @code{\temporary} and @code{\undo} on the same +music containing overrides will have a net effect of zero. + +Here is an example of a music function which makes use of this. +The use of @code{\temporary} ensures the values of the +@code{cross-staff} and @code{style} properties are restored on exit +to whatever values they had when the @code{cross-staff} function was +called. Without @code{\temporary} the default values would have been +set on exit. + +@example +crossStaff = +#(define-music-function (parser location notes) (ly:music?) + (_i "Create cross-staff stems") + #@{ + \temporary \override Stem.cross-staff = #cross-staff-connect + \temporary \override Flag.style = #'no-flag + #notes + \revert Stem.cross-staff + \revert Flag.style +#@}) +@end example + @node Mathematics in functions @subsection Mathematics in functions diff --git a/Documentation/fr/learning/fundamental.itely b/Documentation/fr/learning/fundamental.itely index ba05c0bd2c..2c1fd083e4 100644 --- a/Documentation/fr/learning/fundamental.itely +++ b/Documentation/fr/learning/fundamental.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.17.11" +@c \version "2.17.18" @c Translators: Valentin Villenave, Jean-Charles Malahieude @c Translation checkers: John Mandereau @@ -1851,7 +1851,7 @@ et pour toutes les portées : >> @end lilypond -Autre exemple, si la propriété @code{clefOctavation} est déterminée au +Autre exemple, si la propriété @code{clefTransposition} est déterminée au niveau du contexte @code{Score}, elle modifiera la valeur de l'octave en cours pour toutes les portées actives ; cette valeur sera considérée comme étant la nouvelle valeur par défaut pour toutes les portées à diff --git a/Documentation/fr/notation/changing-defaults.itely b/Documentation/fr/notation/changing-defaults.itely index da4850f5ed..338983f6bc 100644 --- a/Documentation/fr/notation/changing-defaults.itely +++ b/Documentation/fr/notation/changing-defaults.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.17.6" +@c \version "2.17.18" @c Translators: Valentin Villenave, Jean-Charles Malahieude @c Translation checkers: Gilles Thibault @@ -3506,7 +3506,7 @@ ces réglages par défaut. @item @code{KeySignature} @tab @code{Staff} @tab @code{begin-of-line-visible} @c omit LeftEdge until it can be explained -td @c @item @code{LeftEdge} @tab @code{Score} @tab @code{center-invisible} -@item @code{OctavateEight} @tab @code{Staff} @tab @code{begin-of-line-visible} +@item @code{ClefModifier} @tab @code{Staff} @tab @code{begin-of-line-visible} @item @code{RehearsalMark} @tab @code{Score} @tab @code{end-of-line-invisible} @item @code{TimeSignature} @tab @code{Staff} @tab @code{all-visible} @@ -3648,9 +3648,9 @@ intervenir qu'à l'occasion d'un @code{\bar} explicite. @cindex clef, visibilité de l'octaviation L'indication d'octaviation d'une clef est produite par l'objet de rendu -@code{OctavateEight}. Sa visibilité étant gérée par héritage direct de +@code{ClefModifier}. Sa visibilité étant gérée par héritage direct de l'objet @code{Clef}, nul n'est besoin de forcer un quelconque -@code{break-visibility} au niveau des objets @code{OctavateEight} pour +@code{break-visibility} au niveau des objets @code{ClefModifier} pour éliminer une indication d'octaviation lorsque la clef est invisible. Lors d'un changement explicite de clef, la propriété diff --git a/Documentation/fr/notation/pitches.itely b/Documentation/fr/notation/pitches.itely index e309cdbf2c..ba4b82f436 100644 --- a/Documentation/fr/notation/pitches.itely +++ b/Documentation/fr/notation/pitches.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.17.6" +@c \version "2.17.18" @c Translators: Frédéric Chiasson @c Translation checkers: Valentin Villenave, Jean-Charles Malahieude @@ -1178,18 +1178,18 @@ Morceaux choisis: Référence des propriétés internes : @rinternals{Clef_engraver}, @rinternals{Clef}, -@rinternals{OctavateEight}, +@rinternals{ClefModifier}, @rinternals{clef-interface}. @knownissues L'indicateur d'octaviation attaché à la clef est un objet graphique en lui même. Par voie de conséquence, tout @code{\override} affectant l'objet @code{Clef} devra être manuellement répercuté sur l'objet -@code{OctavateEight}. +@code{ClefModifier}. @lilypond[fragment,quote,relative=1] \new Staff \with { - \override OctavateEight.color = #red + \override ClefModifier.color = #red \override Clef.color = #blue } diff --git a/Documentation/fr/notation/vocal.itely b/Documentation/fr/notation/vocal.itely index 8ff1d5998e..1bea70ebdd 100644 --- a/Documentation/fr/notation/vocal.itely +++ b/Documentation/fr/notation/vocal.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.17.11" +@c \version "2.17.18" @c Translators: Valentin Villenave, Jean-Charles Malahieude @c Translation checkers: Jean-Jacques Gerbaud @@ -2587,7 +2587,7 @@ définition d'un @qq{instrument} pour chacun des rôles en question : #`((instrumentTransposition . ,(ly:make-pitch -1 0 0)) (shortInstrumentName . "Kas.") (clefGlyph . "clefs.G") - (clefOctavation . -7) + (clefTransposition . -7) (middleCPosition . 1) (clefPosition . -2) (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Kaspar")) @@ -2597,7 +2597,7 @@ définition d'un @qq{instrument} pour chacun des rôles en question : #`((instrumentTransposition . ,(ly:make-pitch 0 0 0)) (shortInstrumentName . "Mel.") (clefGlyph . "clefs.F") - (clefOctavation . 0) + (clefTransposition . 0) (middleCPosition . 6) (clefPosition . 2) (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Melchior")) diff --git a/Documentation/fr/texidocs/tweaking-clef-properties.texidoc b/Documentation/fr/texidocs/tweaking-clef-properties.texidoc index f77d013490..ec5b16bfd0 100644 --- a/Documentation/fr/texidocs/tweaking-clef-properties.texidoc +++ b/Documentation/fr/texidocs/tweaking-clef-properties.texidoc @@ -2,7 +2,7 @@ texidocfr = " La commande @code{\\clef \"treble_8\"} équivaut à définir @code{clefGlyph}, @code{clefPosition} -- qui contrôle la position verticale de la clef -- -@code{middleCPosition} et @code{clefOctavation}. Une clef est imprimée +@code{middleCPosition} et @code{clefTransposition}. Une clef est imprimée lorsque l'une de ces propriétés, hormis @code{middleCPosition}, est modifiée. Les exemples suivant font apparaître des possibilités de réglage manuel de ces propriétés. @@ -11,7 +11,7 @@ Modifier le glyphe, la position de la clef ou son octaviation ne changera pas la position des notes ; il faut pour y parvenir modifier aussi la position du do médium. Le positionnement est relatif à la ligne médiane, un nombre positif faisant monter, chaque ligne ou -interligne comptant pour 1. La valeur de @code{clefOctavation} +interligne comptant pour 1. La valeur de @code{clefTransposition} devrait être de 7, -7, 15 ou -15, bien que rien n'empêche de lui affecter une autre valeur. diff --git a/Documentation/hu/learning/fundamental.itely b/Documentation/hu/learning/fundamental.itely index eac8db8e06..39a50e5f6e 100644 --- a/Documentation/hu/learning/fundamental.itely +++ b/Documentation/hu/learning/fundamental.itely @@ -10,7 +10,7 @@ @c -*- coding: utf-8; mode: texinfo; -*- -@c \version "2.17.11" +@c \version "2.17.18" @node Alapfogalmak @chapter Alapfogalmak @translationof Fundamental concepts @@ -1939,7 +1939,7 @@ and this turns them off in all staves: >> @end lilypond -As another example, if @code{clefOctavation} is set in +As another example, if @code{clefTransposition} is set in the @code{Score} context this immediately changes the value of the octavation in all current staves and sets a new default value which will be applied to all staves. diff --git a/Documentation/it/learning/fundamental.itely b/Documentation/it/learning/fundamental.itely index fba872ecbc..5d8feca337 100644 --- a/Documentation/it/learning/fundamental.itely +++ b/Documentation/it/learning/fundamental.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.17.11" +@c \version "2.17.18" @node Concetti fondamentali @chapter Concetti fondamentali @@ -1799,7 +1799,7 @@ e in questo modo si disattiva in tutti i righi: >> @end lilypond -Un altro esempio: se la proprietà @code{clefOctavation} viene posta +Un altro esempio: se la proprietà @code{clefTransposition} viene posta nel contesto @code{Score}, cambia immediatamente il valore dell'ottavazione in tutti i righi presenti e imposta un nuovo valore predefinito che sarà applicato a tutti i righi. diff --git a/Documentation/it/notation/pitches.itely b/Documentation/it/notation/pitches.itely index b3dd3c025b..68cc589f9f 100644 --- a/Documentation/it/notation/pitches.itely +++ b/Documentation/it/notation/pitches.itely @@ -7,7 +7,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.17.6" +@c \version "2.17.18" @node Altezze @@ -1201,17 +1201,17 @@ Frammenti di codice: Guida al funzionamento interno: @rinternals{Clef_engraver}, @rinternals{Clef}, -@rinternals{OctavateEight}, +@rinternals{ClefModifier}, @rinternals{clef-interface}. @knownissues I numeri di ottavazione assegnati alle chiavi sono trattati come oggetti grafici separati. Quindi qualsiasi @code{\override} all'oggetto @var{Clef} dovrà essere -applicato, con un altro @code{\override}, all'oggetto @var{OctavateEight}. +applicato, con un altro @code{\override}, all'oggetto @var{ClefModifier}. @lilypond[fragment,quote,relative=1] \new Staff \with { - \override OctavateEight.color = #red + \override ClefModifier.color = #red \override Clef.color = #blue } diff --git a/Documentation/it/texidocs/tweaking-clef-properties.texidoc b/Documentation/it/texidocs/tweaking-clef-properties.texidoc index e5576b0d06..c914cd6cc7 100644 --- a/Documentation/it/texidocs/tweaking-clef-properties.texidoc +++ b/Documentation/it/texidocs/tweaking-clef-properties.texidoc @@ -3,7 +3,7 @@ Il comando @code{\\clef \"treble_8\"} equivale a impostare @code{clefGlyph}, @code{clefPosition} (che regola la posizione verticale della chiave), @code{middleCPosition} e -@code{clefOctavation}. Viene stampata una chiave quando cambia una +@code{clefTransposition}. Viene stampata una chiave quando cambia una di queste proprietà, eccetto @code{middleCPosition}. @@ -13,7 +13,7 @@ note che seguono sul rigo: bisogna anche specificare la posizione del Do centrale (middle C). I parametri di posizione sono relativi alla linea centrale del rigo, con i numeri positivi che indicano la parte superiore: ogni linea e spazio valgono uno. Il valore -@code{clefOctavation} di norma è impostato su 7, -7, 15 +@code{clefTransposition} di norma è impostato su 7, -7, 15 o -15, ma altri valori sono considerati validi. diff --git a/Documentation/ja/learning/fundamental.itely b/Documentation/ja/learning/fundamental.itely index 0bf2b28094..8072307308 100644 --- a/Documentation/ja/learning/fundamental.itely +++ b/Documentation/ja/learning/fundamental.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.17.11" +@c \version "2.17.18" @c Translators: Yoshiki Sawada @c Translation status: post-GDP @@ -1873,7 +1873,7 @@ LilyPond 入力ファイルに対する特別なサポートを持つ@c >> @end lilypond -他の例としては、@code{clefOctavation} が @code{Score} コンテキストに@c +他の例としては、@code{clefTransposition} が @code{Score} コンテキストに@c セットされた場合、直ちにすべての譜でのオクターブの値を変更し、すべての譜に@c 適用される新しいデフォルト値をセットします。 diff --git a/Documentation/ja/notation/changing-defaults.itely b/Documentation/ja/notation/changing-defaults.itely index d698a9d526..41441866bb 100644 --- a/Documentation/ja/notation/changing-defaults.itely +++ b/Documentation/ja/notation/changing-defaults.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.17.6" +@c \version "2.17.18" @c Translators: Yoshiki Sawada @c Translation status: post-GDP @@ -3445,7 +3445,7 @@ a1 @item @code{KeySignature} @tab @code{Staff} @tab @code{begin-of-line-visible} @c omit LeftEdge until it can be explained -td @c @item @code{LeftEdge} @tab @code{Score} @tab @code{center-invisible} -@item @code{OctavateEight} @tab @code{Staff} @tab @code{begin-of-line-visible} +@item @code{ClefModifier} @tab @code{Staff} @tab @code{begin-of-line-visible} @item @code{RehearsalMark} @tab @code{Score} @tab @code{end-of-line-invisible} @item @code{TimeSignature} @tab @code{Staff} @tab @code{all-visible} @@ -3480,7 +3480,7 @@ f4 g a b 描画するには @code{begin-of-line-invisible} を用い、@c 描画しないのなら @code{all-invisible} を用います。 @item Key signature -- 以下を参照してください -@item OctavateEight -- 以下を参照してください +@item ClefModifier -- 以下を参照してください @end itemize @node 特別な考慮を必要とするもの @@ -3615,16 +3615,16 @@ f4 g a b @subsubsubheading オクターブ移調付きの音部記号 -@cindex octavated clefs, visibility of (オクターブ移調付きの音部記号の可視性) -@cindex visibility of octavated clefs (オクターブ移調付きの音部記号の可視性) -@cindex clefs, visibility of octavation (オクターブ移調付きの音部記号の可視性) +@cindex transposed clefs, visibility of (オクターブ移調付きの音部記号の可視性) +@cindex visibility of transposed clefs (オクターブ移調付きの音部記号の可視性) +@cindex clefs, visibility of transposition (オクターブ移調付きの音部記号の可視性) オクターブ移調付きの音部記号上の小さなオクターブ記号は -@code{OctavateEight} レイアウト オブジェクトによって作り出されます。@c +@code{ClefModifier} レイアウト オブジェクトによって作り出されます。@c このオブジェクトの可視性は @code{Clef} オブジェクトの可視性とは独立して制御されます。@c そのため、各行の先頭においてそのような音部記号を完全に消そうとするなら、@c -@code{Clef} オブジェクトと @code{OctavateEight} オブジェクトの両方に対して@c +@code{Clef} オブジェクトと @code{ClefModifier} オブジェクトの両方に対して@c 必要な @code{break-visibility} のオーバライドを行う必要があります。 明示的な音部記号の変更では、@c diff --git a/Documentation/ja/notation/pitches.itely b/Documentation/ja/notation/pitches.itely index 967daa2a1a..eb6713859b 100644 --- a/Documentation/ja/notation/pitches.itely +++ b/Documentation/ja/notation/pitches.itely @@ -6,7 +6,7 @@ version that you are working on. See TRANSLATION for details. @end ignore -@c \version "2.17.6" +@c \version "2.17.18" @c Translators: Yoshiki Sawada @c Translation status: post-GDP @@ -1213,19 +1213,19 @@ c2 c 内部リファレンス: @rinternals{Clef_engraver}, @rinternals{Clef}, -@rinternals{OctavateEight}, +@rinternals{ClefModifier}, @rinternals{clef-interface} @knownissues 音部記号に付けるオクターブ移動の数字は、個別のグラフィカル オブジェクト@c として扱われます。@c このため、@var{Clef} に適用される @code{\override} は、@c -別の @code{\override} で @var{OctavateEight} グラフィカル オブジェクトに@c +別の @code{\override} で @var{ClefModifier} グラフィカル オブジェクトに@c 適用する必要があります。 @lilypond[fragment,quote,relative=1] \new Staff \with { - \override OctavateEight.color = #red + \override ClefModifier.color = #red \override Clef.color = #blue } diff --git a/Documentation/ja/notation/vocal.itely b/Documentation/ja/notation/vocal.itely index ab1ee2d41e..884b10e50f 100644 --- a/Documentation/ja/notation/vocal.itely +++ b/Documentation/ja/notation/vocal.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.17.11" +@c \version "2.17.18" @c Translators: Yoshiki Sawada @c Translation status: post-GDP @@ -2523,7 +2523,7 @@ c c c #`((instrumentTransposition . ,(ly:make-pitch -1 0 0)) (shortInstrumentName . "Kas.") (clefGlyph . "clefs.G") - (clefOctavation . -7) + (clefTransposition . -7) (middleCPosition . 1) (clefPosition . -2) (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Kaspar")) @@ -2533,7 +2533,7 @@ c c c #`((instrumentTransposition . ,(ly:make-pitch 0 0 0)) (shortInstrumentName . "Mel.") (clefGlyph . "clefs.F") - (clefOctavation . 0) + (clefTransposition . 0) (middleCPosition . 6) (clefPosition . 2) (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Melchior")) diff --git a/Documentation/learning/fundamental.itely b/Documentation/learning/fundamental.itely index 7e9e60821b..380bc500de 100644 --- a/Documentation/learning/fundamental.itely +++ b/Documentation/learning/fundamental.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.17.11" +@c \version "2.17.18" @node Fundamental concepts @chapter Fundamental concepts @@ -1792,9 +1792,9 @@ and this turns them off in all staves: >> @end lilypond -As another example, if @code{clefOctavation} is set in +As another example, if @code{clefTransposition} is set in the @code{Score} context this immediately changes the value -of the octavation in all current staves and sets a new default +of the transposition in all current staves and sets a new default value which will be applied to all staves. The opposite command, @code{\unset}, effectively removes the diff --git a/Documentation/nl/learning/fundamental.itely b/Documentation/nl/learning/fundamental.itely index 967bd3c862..8532ee4dcb 100644 --- a/Documentation/nl/learning/fundamental.itely +++ b/Documentation/nl/learning/fundamental.itely @@ -12,7 +12,7 @@ @c Translation checker: @c Translation checker committish: -@c \version "2.17.11" +@c \version "2.17.18" @node Fundamentele concepten @translationof Fundamental concepts @@ -1817,9 +1817,9 @@ and this turns them off in all staves: >> @end lilypond -As another example, if @code{clefOctavation} is set in +As another example, if @code{clefTransposition} is set in the @code{Score} context this immediately changes the value -of the octavation in all current staves and sets a new default +of the transposition in all current staves and sets a new default value which will be applied to all staves. The opposite command, @code{\unset}, effectively removes the diff --git a/Documentation/notation/changing-defaults.itely b/Documentation/notation/changing-defaults.itely index 03727fedd6..5a364f134d 100644 --- a/Documentation/notation/changing-defaults.itely +++ b/Documentation/notation/changing-defaults.itely @@ -8,7 +8,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.17.6" +@c \version "2.17.18" @node Changing defaults @chapter Changing defaults @@ -3283,7 +3283,7 @@ default setting of this property: @item @code{KeySignature} @tab @code{Staff} @tab @code{begin-of-line-visible} @c omit LeftEdge until it can be explained -td @c @item @code{LeftEdge} @tab @code{Score} @tab @code{center-invisible} -@item @code{OctavateEight} @tab @code{Staff} @tab @code{begin-of-line-visible} +@item @code{ClefModifier} @tab @code{Staff} @tab @code{begin-of-line-visible} @item @code{RehearsalMark} @tab @code{Score} @tab @code{end-of-line-invisible} @item @code{TimeSignature} @tab @code{Staff} @tab @code{all-visible} @@ -3316,7 +3316,7 @@ line unless it is set to be different from 1. suppressed. Use begin-of line-invisible to print and all-invisible to suppress. @item Key signature -- see below -@item OctavateEight -- see below +@item ClefModifier -- see below @end itemize @node Special considerations @@ -3445,20 +3445,20 @@ occur only at explicit @code{\bar} commands. @c TODO Add example -@subsubsubheading Octavated clefs +@subsubsubheading Transposed clefs -@cindex octavated clefs, visibility of -@cindex visibility of octavated clefs -@cindex clefs, visibility of octavation +@cindex transposed clefs, visibility of +@cindex visibility of transposed clefs +@cindex clefs, visibility of transposition -The small octavation symbol on octavated clefs is produced by the -@code{OctavateEight} layout object. Its visibility is automatically +The small transposition symbol on transposed clefs is produced by the +@code{ClefModifier} layout object. Its visibility is automatically inherited from the @code{Clef} object, so it is not necessary to apply -any required @code{break-visibility} overrides to the @code{OctavateEight} -layout objects to suppress octavation symbols for invisible clefs. +any required @code{break-visibility} overrides to the @code{ClefModifier} +layout objects to suppress transposition symbols for invisible clefs. For explicit clef changes, the @code{explicitClefVisibility} -property controls both the clef symbol and any octavation symbol +property controls both the clef symbol and any transposition symbol associated with it. @seealso diff --git a/Documentation/notation/expressive.itely b/Documentation/notation/expressive.itely index f327ad2c24..7a9867dc6f 100644 --- a/Documentation/notation/expressive.itely +++ b/Documentation/notation/expressive.itely @@ -472,6 +472,16 @@ items such as text scripts, text spanners, and piano pedal marks. @lilypondfile[verbatim,quote,texidoc,doctitle] {printing-hairpins-using-al-niente-notation.ly} +@cindex Ferneyhough hairpins +@cindex hairpins, Ferneyhough +@cindex flared hairpins +@cindex hairpins, flared +@cindex constante hairpins +@cindex hairpins, constante + +@lilypondfile[verbatim,quote,texidoc,doctitle] +{printing-hairpins-in-various-styles.ly} + @lilypondfile[verbatim,quote,texidoc,doctitle] {vertically-aligned-dynamics-and-textscripts.ly} diff --git a/Documentation/notation/input.itely b/Documentation/notation/input.itely index 651a8267fd..8c16fd32d7 100644 --- a/Documentation/notation/input.itely +++ b/Documentation/notation/input.itely @@ -2601,11 +2601,11 @@ Here are a few sample bars of music set in Gonville: @c NOTE: these images are a bit big, but that's important @c for the font comparison. -gp -@sourceimage{Gonville_after,,,} +@sourceimage{Gonville_after,15cm,,} Here are a few sample bars of music set in LilyPond's Feta font: -@sourceimage{Gonville_before,,,} +@sourceimage{Gonville_before,15cm,,} @subsubheading Installation Instructions for MacOS @@ -3040,11 +3040,10 @@ The final example in this section shows how this might be done. The minimum and maximum overall volume of MIDI dynamic markings is controlled by setting the properties @code{midiMinimumVolume} and -@code{midiMaximumVolume} at the @code{Score} level. These -properties have an effect only on dynamic marks, so if they -are to apply from the start of the score a dynamic mark must be -placed there. The fraction corresponding to each dynamic mark is -modified with this formula +@code{midiMaximumVolume} at the @code{Score} level. These properties +have an effect only at the start of a voice and on dynamic marks. The +fraction corresponding to each dynamic mark is modified with this +formula @example midiMinimumVolume + (midiMaximumVolume - midiMinimumVolume) * fraction @@ -3098,9 +3097,7 @@ equalizer, which can enhance the quality of the MIDI output remarkably. In this example the volume of the clarinet is reduced relative -to the volume of the flute. There must be a dynamic -mark on the first note of each instrument for this to work -correctly. +to the volume of the flute. @lilypond[verbatim,quote] \score { diff --git a/Documentation/notation/pitches.itely b/Documentation/notation/pitches.itely index fd58a607dd..f892637b17 100644 --- a/Documentation/notation/pitches.itely +++ b/Documentation/notation/pitches.itely @@ -7,7 +7,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.17.6" +@c \version "2.17.18" @node Pitches @@ -87,6 +87,18 @@ octave. } @end lilypond +@funindex absolute +@funindex \absolute +Music can be marked explicitly as being in absolute octave +notation by preceding it with @code{\absolute}: + +@example +\absolute @var{musicexpr} +@end example + +will be interpreted in absolute octave entry mode regardless of +the context it appears in. + @seealso Music Glossary: @rglos{Pitch names}. @@ -107,13 +119,13 @@ Snippets: @funindex relative @funindex \relative -When octaves are specified in absolute mode it is easy to -accidentally put a pitch in the wrong octave. Relative octave -mode reduces these errors since most of the time it is not -necessary to indicate any octaves at all. Furthermore, in -absolute mode a single mistake may be difficult to spot, while in -relative mode a single error puts the rest of the piece off by one -octave. +Absolute octave entry requires specifying the octave for every +single note. Relative octave entry, in contrast, specifies each +octave in relation to the last note: changing one note's octave +will affect all of the following notes. + +Relative note mode has to be entered explicitly using the +@code{\relative} command: @example \relative @var{startpitch} @var{musicexpr} @@ -1210,18 +1222,18 @@ Snippets: Internals Reference: @rinternals{Clef_engraver}, @rinternals{Clef}, -@rinternals{OctavateEight}, +@rinternals{ClefModifier}, @rinternals{clef-interface}. @knownissues Ottavation numbers attached to clefs are treated as separate grobs. So any @code{\override} done to the @var{Clef} will also need to be -applied, as a separate @code{\override}, to the @var{OctavateEight} +applied, as a separate @code{\override}, to the @var{ClefModifier} grob. @lilypond[fragment,quote,relative=1] \new Staff \with { - \override OctavateEight.color = #red + \override ClefModifier.color = #red \override Clef.color = #blue } @@ -1394,6 +1406,9 @@ a2 b @lilypondfile[verbatim,quote,texidoc,doctitle] {ottava-text.ly} +@lilypondfile[verbatim,quote,texidoc,doctitle] +{adding-an-ottava-marking-to-a-single-voice.ly} + @seealso Music Glossary: @rglos{octavation}. diff --git a/Documentation/notation/rhythms.itely b/Documentation/notation/rhythms.itely index 9250fd1968..50e298dde1 100644 --- a/Documentation/notation/rhythms.itely +++ b/Documentation/notation/rhythms.itely @@ -1338,14 +1338,16 @@ d4 g e c @funindex \markLengthOff @funindex markLengthOff -When tempo indications follow each other closely in the music, -such as in a part for an instrument with long periods of rests, -the measures are stretched horizontally so that the tempo indications -do not overlap. The commands @code{\markLengthOn} and -@code{\markLengthOff} control this behavior. +In a part for an instrument with long periods of rests, +tempo indications sometimes follow each other closely. +The command @code{\markLengthOn} provides extra horizontal space +to prevent tempo indications from overlapping, and @code{\markLengthOff} +restores the default behavior of ignoring tempo marks +for horizontal spacing. @lilypond[quote,relative=0] \compressFullBarRests +\markLengthOn \tempo "Molto vivace" R1*12 \tempo "Meno mosso" @@ -2130,7 +2132,8 @@ enclosing context will apply. @lilypond[quote, verbatim,relative=1] \new Staff { \time 7/8 - % No need to disable beamExceptions as they are not defined for 7/8 time + % No need to disable beamExceptions + % as they are not defined for 7/8 time \set Staff.beatStructure = #'(2 3 2) << \new Voice = one { @@ -2174,7 +2177,8 @@ compatible with the new value of @code{baseMoment}. @lilypond[quote,verbatim,relative=2] \time 5/8 -% No need to disable beamExceptions as they are not defined for 5/8 time +% No need to disable beamExceptions +% as they are not defined for 5/8 time \set Timing.baseMoment = #(ly:make-moment 1/16) \set Timing.beatStructure = #'(7 3) \repeat unfold 10 { a16 } diff --git a/Documentation/notation/vocal.itely b/Documentation/notation/vocal.itely index 3e4d3fd11e..54a6569591 100644 --- a/Documentation/notation/vocal.itely +++ b/Documentation/notation/vocal.itely @@ -7,7 +7,7 @@ Guide, node Updating translation committishes.. @end ignore -@c \version "2.17.11" +@c \version "2.17.18" @node Vocal music @section Vocal music @@ -2497,7 +2497,7 @@ indicate each change. #`((instrumentTransposition . ,(ly:make-pitch -1 0 0)) (shortInstrumentName . "Kas.") (clefGlyph . "clefs.G") - (clefOctavation . -7) + (clefTransposition . -7) (middleCPosition . 1) (clefPosition . -2) (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Kaspar")) @@ -2507,7 +2507,7 @@ indicate each change. #`((instrumentTransposition . ,(ly:make-pitch 0 0 0)) (shortInstrumentName . "Mel.") (clefGlyph . "clefs.F") - (clefOctavation . 0) + (clefTransposition . 0) (middleCPosition . 6) (clefPosition . 2) (instrumentCueName . ,(markup #:fontsize 1 #:smallCaps "Melchior")) diff --git a/Documentation/snippets/new/printing-hairpins-in-various-styles.ly b/Documentation/snippets/new/printing-hairpins-in-various-styles.ly new file mode 100644 index 0000000000..b6a18ecc7d --- /dev/null +++ b/Documentation/snippets/new/printing-hairpins-in-various-styles.ly @@ -0,0 +1,30 @@ +\version "2.17.14" + +\header { + lsrtags = "expressive-marks" + + texidoc = " +Hairpin dynamics may be created in a variety of styles + +" + doctitle = "Printing hairpins in various styles" +} + +\relative c'' { + \override Hairpin.stencil = #flared-hairpin + a4\< a a a\f + a4\p\< a a a\ff + a4\sfz\< a a a\! + \override Hairpin.stencil = #constante-hairpin + a4\< a a a\f + a4\p\< a a a\ff + a4\sfz\< a a a\! + \override Hairpin.stencil = #flared-hairpin + a4\> a a a\f + a4\p\> a a a\ff + a4\sfz\> a a a\! + \override Hairpin.stencil = #constante-hairpin + a4\> a a a\f + a4\p\> a a a\ff + a4\sfz\> a a a\! +} diff --git a/Documentation/snippets/printing-hairpins-in-various-styles.ly b/Documentation/snippets/printing-hairpins-in-various-styles.ly new file mode 100644 index 0000000000..8b8aae09c1 --- /dev/null +++ b/Documentation/snippets/printing-hairpins-in-various-styles.ly @@ -0,0 +1,38 @@ +% DO NOT EDIT this file manually; it is automatically +% generated from Documentation\snippets\new +% Make any changes in Documentation/snippets/new/ +% and then run scripts/auxiliar/makelsr.py +% +% This file is in the public domain. +%% Note: this file works from version 2.17.14 +\version "2.17.14" + +\header { + lsrtags = "expressive-marks" + + texidoc = " +Hairpin dynamics may be created in a variety of styles + +" + doctitle = "Printing hairpins in various styles" +} % begin verbatim + + +\relative c'' { + \override Hairpin.stencil = #flared-hairpin + a4\< a a a\f + a4\p\< a a a\ff + a4\sfz\< a a a\! + \override Hairpin.stencil = #constante-hairpin + a4\< a a a\f + a4\p\< a a a\ff + a4\sfz\< a a a\! + \override Hairpin.stencil = #flared-hairpin + a4\> a a a\f + a4\p\> a a a\ff + a4\sfz\> a a a\! + \override Hairpin.stencil = #constante-hairpin + a4\> a a a\f + a4\p\> a a a\ff + a4\sfz\> a a a\! +} diff --git a/Documentation/snippets/tweaking-clef-properties.ly b/Documentation/snippets/tweaking-clef-properties.ly index d4adb18f97..0526c67876 100644 --- a/Documentation/snippets/tweaking-clef-properties.ly +++ b/Documentation/snippets/tweaking-clef-properties.ly @@ -4,7 +4,7 @@ %% and then run scripts/auxiliar/makelsr.py %% %% This file is in the public domain. -\version "2.16.0" +\version "2.17.18" \header { lsrtags = "pitches, staff-notation, tweaks-and-overrides" @@ -13,7 +13,7 @@ The command @code{\\clef \"treble_8\"} is equivalent to setting @code{clefGlyph}, @code{clefPosition} (which controls the vertical position of the clef), @code{middleCPosition} and -@code{clefOctavation}. A clef is printed when any of the properties +@code{clefTransposition}. A clef is printed when any of the properties except @code{middleCPosition} are changed. @@ -22,7 +22,7 @@ octavation does not in itself change the position of subsequent notes on the staff: the position of middle C must also be specified to do this. The positional parameters are relative to the staff center line, positive numbers displacing upwards, counting one for each line and -space. The @code{clefOctavation} value would normally be set to 7, -7, +space. The @code{clefTransposition} value would normally be set to 7, -7, 15 or -15, but other values are valid. @@ -62,12 +62,12 @@ line, they do not. % The standard choral tenor clef \set Staff.clefGlyph = #"clefs.G" \set Staff.clefPosition = #-2 - \set Staff.clefOctavation = #-7 + \set Staff.clefTransposition = #-7 \set Staff.middleCPosition = #1 c'1 % A non-standard clef \set Staff.clefPosition = #0 - \set Staff.clefOctavation = #0 + \set Staff.clefTransposition = #0 \set Staff.middleCPosition = #-4 c'1 \break @@ -81,9 +81,9 @@ line, they do not. c'1 \set Staff.clefGlyph = #"clefs.C" c'1 - \set Staff.clefOctavation = #7 + \set Staff.clefTransposition = #7 c'1 - \set Staff.clefOctavation = #0 + \set Staff.clefTransposition = #0 \set Staff.clefPosition = #0 c'1 diff --git a/Documentation/usage/external.itely b/Documentation/usage/external.itely index 2eda953374..136b7a2f31 100644 --- a/Documentation/usage/external.itely +++ b/Documentation/usage/external.itely @@ -26,40 +26,30 @@ LilyPond can interact with other programs in various ways. @node Point and click @section Point and click +@cindex point and click -Point and click adds links to pdf documents for certain music -elements. +Point and click lets you find notes in the input by clicking on them +in the PDF viewer. This makes it easier to find input that causes +some error in the sheet music. @menu +* Configuring the system for point and click:: * Enabling point and click:: * Selective point-and-click:: @end menu -@node Enabling point and click -@unnumberedsubsec Enabling point and click - -@cindex point and click - -Point and click lets you find notes in the input by clicking on them -in the PDF viewer. This makes it easier to find input that causes -some error in the sheet music. +@node Configuring the system for point and click +@subsection Configuring the system -When this functionality is active, LilyPond adds hyperlinks to the PDF -file. These hyperlinks are sent to the web-browser, which opens a -text-editor with the cursor in the right place. +When this functionality is active, LilyPond adds hyperlinks to the +PDF file. These hyperlinks are sent to a @q{URI helper} or a +web-browser, which opens a text-editor with the cursor in the +right place. To make this chain work, you should configure your PDF viewer to follow hyperlinks using the @file{lilypond-invoke-editor} script supplied with LilyPond. -For Xpdf on UNIX, the following should be present in -@file{xpdfrc}. On UNIX, this file is found either in -@file{/etc/xpdfrc} or as @file{$HOME/.xpdfrc}. - -@example -urlCommand "lilypond-invoke-editor %s" -@end example - The program @file{lilypond-invoke-editor} is a small helper program. It will invoke an editor for the special @code{textedit} URIs, and run a web browser for others. It tests the environment @@ -98,8 +88,125 @@ for @code{LYEDITOR} is equivalent to the standard emacsclient invocation. +@menu +* Using Xpdf for point and click:: +* Using GNOME 2 for point and click:: +* Using GNOME 3 for point and click:: +* Extra configuration for Evince:: +@end menu + +@node Using Xpdf for point and click +@unnumberedsubsubsec Using Xpdf +@cindex Xpdf + +For Xpdf on UNIX, the following should be present in +@file{xpdfrc}. On UNIX, this file is found either in +@file{/etc/xpdfrc} or as @file{$HOME/.xpdfrc}. + +@example +urlCommand "lilypond-invoke-editor %s" +@end example + +If you are using Ubuntu, it is likely that the version of Xpdf +installed with your system crashes on every PDF file: this state +has been persisting for several years and is due to library +mismatches. Your best bet is to install a current @samp{xpdf} +package and the corresponding @samp{libpoppler} package from +Debian instead. Once you have tested that this works, you might +want to use +@example +sudo apt-mark hold xpdf +@end example +@noindent +in order to keep Ubuntu from overwriting it with the next +@q{update} of its crashing package. + +@node Using GNOME 2 for point and click +@unnumberedsubsubsec Using GNOME 2 + +For using GNOME 2 (and PDF viewers integrated with it), the magic +invocation for telling the system about the @samp{textedit:} URI +is +@example +gconftool-2 -t string -s /desktop/gnome/url-handlers/textedit/command "lilypond-invoke-editor %s" +gconftool-2 -s /desktop/gnome/url-handlers/textedit/needs_terminal false -t bool +gconftool-2 -t bool -s /desktop/gnome/url-handlers/textedit/enabled true +@end example + +After that invocation, +@example +gnome-open textedit:///etc/issue:1:0:0 +@end example +@noindent +should call @file{lilypond-invoke-editor} for opening files. + +@node Using GNOME 3 for point and click +@unnumberedsubsubsec Using GNOME 3 + +In GNOME 3, URIs are handled by the @q{gvfs} layer rather than by +@q{gconf}. Create a file in a local directory such as @file{/tmp} +that is called @file{lilypond-invoke-editor.desktop} and has the contents +@example +[Desktop Entry] +Version=1.0 +Name=lilypond-invoke-editor +GenericName=Textedit URI handler +Comment=URI handler for textedit: +Exec=lilypond-invoke-editor %u +Terminal=false +Type=Application +MimeType=x-scheme-handler/textedit; +Categories=Editor +NoDisplay=true +@end example +and then execute the commands +@example +xdg-desktop-menu install ./lilypond-invoke-editor.desktop +xdg-mime default lilypond-invoke-editor.desktop x-scheme-handler/textedit +@end example + +After that invocation, +@example +gnome-open textedit:///etc/issue:1:0:0 +@end example +@noindent +should call @file{lilypond-invoke-editor} for opening files. + +@node Extra configuration for Evince +@unnumberedsubsubsec Extra configuration for Evince +@cindex Evince + +If @code{gnome-open} works, but Evince still refuses to open point +and click links due to denied permissions, you might need to +change the Apparmor profile of Evince which controls the kind of +actions Evince is allowed to perform. + +For Ubuntu, the process is to edit the file +@file{/etc/apparmor.d/local/usr.bin.evince} and append the +following lines: +@example +# For Textedit links +/usr/local/bin/lilypond-invoke-editor Cx -> sanitized_helper, +@end example +@noindent + +After adding these lines, call + +@example +sudo apparmor_parser -r -T -W /etc/apparmor.d/usr.bin.evince +@end example + +@noindent +Now Evince should be able to open point and click links. It is +likely that similar configurations will work for other viewers. + +@node Enabling point and click +@unnumberedsubsec Enabling point and click @cindex file size, output +Point and click functionality is enabled by default when creating +PDF files. + The point and click links enlarge the output files significantly. For reducing the size of PDF and PS files, point and click may be switched off by issuing diff --git a/Documentation/web/news-front.itexi b/Documentation/web/news-front.itexi index b5bdb65eb0..13ab4b6137 100644 --- a/Documentation/web/news-front.itexi +++ b/Documentation/web/news-front.itexi @@ -9,9 +9,9 @@ @c used for news about the upcoming release; see CG 10.2 @newsItem -@subsubheading LilyPond 2.17.16 released! @emph{April 13, 2013} +@subsubheading LilyPond 2.17.18 released! @emph{May 11, 2013} -We are happy to announce the release of LilyPond 2.17.16. This +We are happy to announce the release of LilyPond 2.17.18. This release contains the usual number of bugfixes and enhancements, and contains some work in progress. You will have access to the very latest features, but some may be incomplete, and you may encounter bugs and crashes. If you require diff --git a/Documentation/web/news.itexi b/Documentation/web/news.itexi index 7d706417be..c829ebf738 100644 --- a/Documentation/web/news.itexi +++ b/Documentation/web/news.itexi @@ -26,6 +26,28 @@ NOTE: * don't duplicate entries from news-front.itexi @end ignore +@newsItem +@subsubheading LilyPond 2.17.17 released! @emph{April 27, 2013} + +We are happy to announce the release of LilyPond 2.17.17. This +release contains the usual number of bugfixes and enhancements, and contains +some work in progress. You will have access to the very latest features, but +some may be incomplete, and you may encounter bugs and crashes. If you require +a stable version of Lilypond, we recommend using the 2.16 version. + +@newsEnd + +@newsItem +@subsubheading LilyPond 2.17.16 released! @emph{April 13, 2013} + +We are happy to announce the release of LilyPond 2.17.16. This +release contains the usual number of bugfixes and enhancements, and contains +some work in progress. You will have access to the very latest features, but +some may be incomplete, and you may encounter bugs and crashes. If you require +a stable version of Lilypond, we recommend using the 2.16 version. + +@newsEnd + @newsItem @subsubheading LilyPond 2.17.15 released! @emph{March 30, 2013} diff --git a/VERSION b/VERSION index 5bd8186cd7..e144b38584 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=17 -PATCH_LEVEL=17 +PATCH_LEVEL=19 MY_PATCH_LEVEL= VERSION_STABLE=2.16.2 -VERSION_DEVEL=2.17.16 +VERSION_DEVEL=2.17.18 diff --git a/input/regression/clef-oct-visibility.ly b/input/regression/clef-oct-visibility.ly deleted file mode 100644 index c4cfe40992..0000000000 --- a/input/regression/clef-oct-visibility.ly +++ /dev/null @@ -1,28 +0,0 @@ -\version "2.17.6" - -\header { - - texidoc = "Octavation signs may be added to clefs. By default, -their break-visibility is derived from the associated clef, but it may -be overridden explicitly. The initial treble_8 clef should not have an -8, while the treble_8 clef after the tenor clef should. -These settings also need to apply to clefs on new lines." - -} -\layout { ragged-right = ##t } - - -\relative c' { - \override Staff.OctavateEight.break-visibility = #all-invisible - - \clef "treble_8" - c2 c | - c c | \break - c \clef "tenor" c | - \revert Staff.OctavateEight.break-visibility - \clef "treble_8" - c2 c | - c c | \break - c c -} - diff --git a/input/regression/clef-oct.ly b/input/regression/clef-oct.ly deleted file mode 100644 index f34eae1228..0000000000 --- a/input/regression/clef-oct.ly +++ /dev/null @@ -1,29 +0,0 @@ - -\version "2.16.0" \header { - - texidoc = "Octavation signs may be added to clefs. These -octavation signs may be placed below or above (meaning an octave -higher or lower), and can take any value, including 15 for two octaves." - -} -\layout { ragged-right = ##t } - - -\relative c'' { - - \clef "G_8" - c4 - \clef "G_15" - c4 - \clef "G_7" - c4 - \clef "G_6" - c4 - \clef "G^8" - c4 - \clef "G^15" - c4 - \clef "G^9" - c4 -} - diff --git a/input/regression/clef-octavation.ly b/input/regression/clef-octavation.ly deleted file mode 100644 index c89a547979..0000000000 --- a/input/regression/clef-octavation.ly +++ /dev/null @@ -1,18 +0,0 @@ -\version "2.16.0" - -\header { - - texidoc="Octavate symbols should be correctly positioned close to -the parent clef." - -} -\score { - << - \new Staff { \clef "G^8" g''1 } - \new Staff { \clef "F^8" c'1 } - \new Staff { \clef "C^8" c''1 } - \new Staff { \clef "G_8" g1 } - \new Staff { \clef "F_8" c,1 } - \new Staff { \clef "C_8" c1 } - >> -} diff --git a/input/regression/clef-optional-octavation.ly b/input/regression/clef-optional-octavation.ly deleted file mode 100644 index 93d60db8f4..0000000000 --- a/input/regression/clef-optional-octavation.ly +++ /dev/null @@ -1,15 +0,0 @@ -\version "2.17.7" - -\header { - - texidoc="Octavate symbols may be parenthesized or bracketed by using -parentheses or brackets in the command string." - -} -\score { - \new Staff { - \clef "G^(8)" g''1 | - \clef "bass_[15]" c,,1 | - \clef "C^(8)" c''1 - } -} diff --git a/input/regression/clef-transposition-optional.ly b/input/regression/clef-transposition-optional.ly new file mode 100644 index 0000000000..c7bc4f0d74 --- /dev/null +++ b/input/regression/clef-transposition-optional.ly @@ -0,0 +1,15 @@ +\version "2.17.7" + +\header { + + texidoc="Clef transposition symbols may be parenthesized or +bracketed by using parentheses or brackets in the command string." + +} +\score { + \new Staff { + \clef "G^(8)" g''1 | + \clef "bass_[15]" c,,1 | + \clef "C^(8)" c''1 + } +} diff --git a/input/regression/clef-transposition-placement.ly b/input/regression/clef-transposition-placement.ly new file mode 100644 index 0000000000..119e00a903 --- /dev/null +++ b/input/regression/clef-transposition-placement.ly @@ -0,0 +1,18 @@ +\version "2.16.0" + +\header { + + texidoc="Transposition symbols should be correctly positioned +close to the parent clef." + +} +\score { + << + \new Staff { \clef "G^8" g''1 } + \new Staff { \clef "F^8" c'1 } + \new Staff { \clef "C^8" c''1 } + \new Staff { \clef "G_8" g1 } + \new Staff { \clef "F_8" c,1 } + \new Staff { \clef "C_8" c1 } + >> +} diff --git a/input/regression/clef-transposition-visibility.ly b/input/regression/clef-transposition-visibility.ly new file mode 100644 index 0000000000..ab82c493b1 --- /dev/null +++ b/input/regression/clef-transposition-visibility.ly @@ -0,0 +1,28 @@ +\version "2.17.18" + +\header { + + texidoc = "Clefs may be transposed. By default, break-visibility +of ClefModifiers is derived from the associated clef, but it may +be overridden explicitly. The initial treble_8 clef should not have an +8, while the treble_8 clef after the tenor clef should. +These settings also need to apply to clefs on new lines." + +} +\layout { ragged-right = ##t } + + +\relative c' { + \override Staff.ClefModifier.break-visibility = #all-invisible + + \clef "treble_8" + c2 c | + c c | \break + c \clef "tenor" c | + \revert Staff.ClefModifier.break-visibility + \clef "treble_8" + c2 c | + c c | \break + c c +} + diff --git a/input/regression/clef-transposition.ly b/input/regression/clef-transposition.ly new file mode 100644 index 0000000000..d2ff5730aa --- /dev/null +++ b/input/regression/clef-transposition.ly @@ -0,0 +1,28 @@ + +\version "2.16.0" \header { + + texidoc = "Clefs may be transposed up or down +by arbitrary amount, including 15 for two octaves." + +} +\layout { ragged-right = ##t } + + +\relative c'' { + + \clef "G_8" + c4 + \clef "G_15" + c4 + \clef "G_7" + c4 + \clef "G_6" + c4 + \clef "G^8" + c4 + \clef "G^15" + c4 + \clef "G^9" + c4 +} + diff --git a/input/regression/cue-clef-octavation.ly b/input/regression/cue-clef-octavation.ly deleted file mode 100644 index 73e3302572..0000000000 --- a/input/regression/cue-clef-octavation.ly +++ /dev/null @@ -1,26 +0,0 @@ -\version "2.16.0" - -\header { - texidoc = "Octavation for clefs for cue notes." -} - -vI = \relative c'' { \clef "treble" \repeat unfold 40 g4 } -\addQuote vIQuote { \vI } - -Solo = \relative c' { - \clef "treble_8" c1 | - \cueDuringWithClef #"vIQuote" #UP #"bass^8" { R1 } | - c1 | \break - c c - \clef "bass^8" c1 | - \cueDuringWithClef #"vIQuote" #UP #"treble_8" { R1 R1 } | - c - \cueDuringWithClef #"vIQuote" #UP #"treble_8" { R1 \break R } | - c -} - -\score { - << - \new Staff \new Voice \Solo - >> -} diff --git a/input/regression/cue-clef-optional-octavation.ly b/input/regression/cue-clef-optional-octavation.ly deleted file mode 100644 index cdc6206d49..0000000000 --- a/input/regression/cue-clef-optional-octavation.ly +++ /dev/null @@ -1,27 +0,0 @@ -\version "2.17.7" - -\header { - texidoc = "Optional octavation for clefs for cue notes is -supported by using parentheses or brackets around the octavation number." -} - -vI = \relative c'' { \clef "treble" \repeat unfold 40 g4 } -\addQuote vIQuote { \vI } - -Solo = \relative c' { - \clef "treble_8" c1 | - \cueDuringWithClef #"vIQuote" #UP #"bass^(15)" { R1 } | - c1 | \break - c c - \clef "bass^8" c1 | - \cueDuringWithClef #"vIQuote" #UP #"G_[8]" { R1 R1 } | - c - \cueDuringWithClef #"vIQuote" #UP #"treble_(8)" { R1 \break R } | - c -} - -\score { - << - \new Staff \new Voice \Solo - >> -} diff --git a/input/regression/cue-clef-transposition-optional.ly b/input/regression/cue-clef-transposition-optional.ly new file mode 100644 index 0000000000..caeaf13193 --- /dev/null +++ b/input/regression/cue-clef-transposition-optional.ly @@ -0,0 +1,27 @@ +\version "2.17.7" + +\header { + texidoc = "Optional transposition for clefs for cue notes is supported +by using parentheses or brackets around the transposition number." +} + +vI = \relative c'' { \clef "treble" \repeat unfold 40 g4 } +\addQuote vIQuote { \vI } + +Solo = \relative c' { + \clef "treble_8" c1 | + \cueDuringWithClef #"vIQuote" #UP #"bass^(15)" { R1 } | + c1 | \break + c c + \clef "bass^8" c1 | + \cueDuringWithClef #"vIQuote" #UP #"G_[8]" { R1 R1 } | + c + \cueDuringWithClef #"vIQuote" #UP #"treble_(8)" { R1 \break R } | + c +} + +\score { + << + \new Staff \new Voice \Solo + >> +} diff --git a/input/regression/cue-clef-transposition.ly b/input/regression/cue-clef-transposition.ly new file mode 100644 index 0000000000..dd26c9f25d --- /dev/null +++ b/input/regression/cue-clef-transposition.ly @@ -0,0 +1,26 @@ +\version "2.16.0" + +\header { + texidoc = "Transposition for clefs for cue notes." +} + +vI = \relative c'' { \clef "treble" \repeat unfold 40 g4 } +\addQuote vIQuote { \vI } + +Solo = \relative c' { + \clef "treble_8" c1 | + \cueDuringWithClef #"vIQuote" #UP #"bass^8" { R1 } | + c1 | \break + c c + \clef "bass^8" c1 | + \cueDuringWithClef #"vIQuote" #UP #"treble_8" { R1 R1 } | + c + \cueDuringWithClef #"vIQuote" #UP #"treble_8" { R1 \break R } | + c +} + +\score { + << + \new Staff \new Voice \Solo + >> +} diff --git a/input/regression/display-lily-tests.ly b/input/regression/display-lily-tests.ly index 9d4306a2ac..65aa7703be 100644 --- a/input/regression/display-lily-tests.ly +++ b/input/regression/display-lily-tests.ly @@ -180,8 +180,8 @@ stderr of this run." %% Tuplets \test ##[ \tuplet 3/2 { c8 d e } #] % TimeScaledMusic \test ##[ \tuplet 6/4 { c16 d e f g a } #] -\test ##[ \tuplet 3/2 { c d e \tuplet 5/2 { f e d2 d4 } c } #] -\test ##[ \tuplet 3/2 2 { c d e \tuplet 5/2 2 { f e d2 d4 } c } #] +\test ##[ \tuplet 3/2 { c4 d e \tuplet 5/2 { f4 e d2 d4 } c4 } #] +\test ##[ \tuplet 3/2 2 { c4 d e \tuplet 5/2 2 { f4 e d2 d4 } c4 } #] %% \relative and \tranpose \test #"NOT A BUG" ##[ \relative c' { c b } #] % RelativeOctaveMusic diff --git a/input/regression/dynamics-avoid-cross-staff-stem-3.ly b/input/regression/dynamics-avoid-cross-staff-stem-3.ly new file mode 100644 index 0000000000..0b0b7b6247 --- /dev/null +++ b/input/regression/dynamics-avoid-cross-staff-stem-3.ly @@ -0,0 +1,19 @@ +\version "2.17.17" + +\header { + texidoc = "Cross-staff @code{Dynamic} does not trigger a cyclic +dependency for direction look-up. +" +} + +<< + \new Staff = "up" + \relative c' { + f8 + \change Staff = "down" + c e\f %should not trigger cyclic dependency + \change Staff = "up" + f + } + \new Staff = "down" { \clef bass s2 } +>> diff --git a/input/regression/dynamics-empty.ly b/input/regression/dynamics-empty.ly new file mode 100644 index 0000000000..4b06d96fae --- /dev/null +++ b/input/regression/dynamics-empty.ly @@ -0,0 +1,26 @@ +\version "2.17.18" + +\header { + texidoc = "An empty Dynamics context does not confuse the spacing." +} + +\score { + \new PianoStaff << + \new Dynamics { s1} + \new Dynamics { s2\f\> s4 s\!\p } + \new Staff {d'2 g''} + \new Dynamics { s1 } + \new Dynamics { s2\f\> s4 s\!\p } + \new Dynamics { s1 } + \new Staff {d'2 g''} + \new Dynamics { s1 } + \new Dynamics { s2\sustainOn s4 s\sustainOff } + >> + \layout { + \context { + \Dynamics + \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing + = #'((minimum-distance . 5)) + } + } +} diff --git a/input/regression/lyrics-tenor-clef.ly b/input/regression/lyrics-tenor-clef.ly index 66acd5b324..acea89d45b 100644 --- a/input/regression/lyrics-tenor-clef.ly +++ b/input/regression/lyrics-tenor-clef.ly @@ -1,5 +1,6 @@ \header { - texidoc = "Lyrics are not lowered despite the presence of an octavation 8." + texidoc = "Lyrics are not lowered despite the presence of +a clef transposition (8 below the clef)." } \version "2.16.0" diff --git a/input/regression/metronome-marking.ly b/input/regression/metronome-marking.ly index ac115273c3..6fd2ed2441 100644 --- a/input/regression/metronome-marking.ly +++ b/input/regression/metronome-marking.ly @@ -14,10 +14,12 @@ The marking is left aligned with the time signature, if there is one. \layout { ragged-right = ##t } -\version "2.17.17" +\version "2.16.0" \relative c'' { - \tempo \breve = 100 c1 c1 \tempo "Allegro" 8.. = 50 c1 \tempo "Adagio" c2 c' + \tempo \breve = 100 c1 c1 + \markLengthOn + \tempo "Allegro" 8.. = 50 c1 \tempo "Adagio" c2 c' } diff --git a/input/regression/morgenlied.ly b/input/regression/morgenlied.ly index 9b5003e3f0..2a2e93dca3 100644 --- a/input/regression/morgenlied.ly +++ b/input/regression/morgenlied.ly @@ -52,7 +52,7 @@ modernAccidentals = { melody = \relative c'' \repeat volta 2 \new Voice = "singer" { \time 6/8 \autoBeamOff - << s2.^\markup { \bold \large\larger\larger { \hspace #-3.0 Lieblich, etwas geschwind } } + << s2.^\markup { \bold \large\larger\larger \line { \hspace #-3.2 Lieblich, etwas geschwind } } R2. >> r4 r8 c4 g8 | diff --git a/input/regression/multi-measure-rest-text.ly b/input/regression/multi-measure-rest-text.ly index ad3d6ccf69..575b62d774 100644 --- a/input/regression/multi-measure-rest-text.ly +++ b/input/regression/multi-measure-rest-text.ly @@ -13,8 +13,7 @@ measures stretch to accommodate wide texts. } -\layout { ragged-right = ##t } -{ +\book { \score { { \time 3/4 \set Score.skipBars = ##t R2._\markup { \center-column { \musicglyph #"scripts.dfermata" \roman "Ad lib" } } @@ -28,3 +27,5 @@ measures stretch to accommodate wide texts. R2.^"very very very very very very long text" c'2. } + \layout { ragged-right = ##t } +}} diff --git a/input/regression/musicxml/12a-Clefs.xml b/input/regression/musicxml/12a-Clefs.xml index 85be49ec1a..4e03079069 100644 --- a/input/regression/musicxml/12a-Clefs.xml +++ b/input/regression/musicxml/12a-Clefs.xml @@ -5,8 +5,8 @@ Various clefs: G, C, F, percussion, - TAB and none; some are also possible with octavation and on other - staff lines than their default (e.g. soprano/alto/tenor/bariton C + TAB and none; some are also possible with transposition and on other + staff lines than their default (e.g. soprano/alto/tenor/baritone C clefs); Each measure shows a different clef (measure 17 has the "none" clef), only measure 18 has the same treble clef as measure 1. diff --git a/input/regression/outside-staff-placement-directive.ly b/input/regression/outside-staff-placement-directive.ly index 81fad0a825..9bc9fdd0c3 100644 --- a/input/regression/outside-staff-placement-directive.ly +++ b/input/regression/outside-staff-placement-directive.ly @@ -1,106 +1,25 @@ \version "2.17.6" \header { - texidoc = "@code{VerticalAxisGroup} grobs can place outside staff objects -using one of the four directives shown below. -" + texidoc = "The @code{outside-staff-placement-directive} adjusts + the order in which objects are placed outside the staff." } - -\layout { - ragged-right = ##t - indent = 0.0 - \context { - \Voice - \remove "Ligature_bracket_engraver" - \consists "Mensural_ligature_engraver" - } - \context { - \Score - \override SpacingSpanner.packed-spacing = ##t - \override PaperColumn.keep-inside-line = ##f - } -} - -music = \context Voice { - \clef "petrucci-c4" - \set Staff.printKeyCancellation = ##f - \cadenzaOn % turn off bar lines - \accidentalStyle forget - \textLengthOn - -% ligaturae binaria - - \[ - b\breve^\markup { \column { { \bold "ligaturae binaria" } "BL" } } - g\longa - \] - - \[ - g\breve^\markup { "BL" } - b\longa - \] - - \[ - b\longa^\markup { "LL" } - g - \] - - \[ - g\longa^\markup { "LL" } - b - \] - - \[ - b\breve^\markup { "BB" } - g - \] - - \[ - g\breve^\markup { "BB" } - b - \] - - \[ - b\longa^\markup { "LB" } - g\breve - \] - - \[ - g\longa^\markup { "LB" } - b\breve - \] - - \[ - b1^\markup { "SS" } - g - \] - - \[ - g1^\markup { "SS" } - b - \] - - \bar "|" -} +music = \transpose c c' { f2^"some" f^"words" f^"that" f^"overlap" } { \override Staff.VerticalAxisGroup.outside-staff-placement-directive = #'left-to-right-polite - \music -} + \tempo left-to-right-polite \music } { \override Staff.VerticalAxisGroup.outside-staff-placement-directive = #'left-to-right-greedy - \music -} + \tempo left-to-right-greedy \music } { \override Staff.VerticalAxisGroup.outside-staff-placement-directive = #'right-to-left-polite - \music -} + \tempo right-to-left-polite \music } { \override Staff.VerticalAxisGroup.outside-staff-placement-directive = #'right-to-left-greedy - \music -} + \tempo right-to-left-greedy \music } diff --git a/input/regression/rest-positioning.ly b/input/regression/rest-positioning.ly new file mode 100644 index 0000000000..a34b773586 --- /dev/null +++ b/input/regression/rest-positioning.ly @@ -0,0 +1,36 @@ +\version "2.17.16" + +\header { + texidoc = "This shows the single and multi voice rest positions for +various standard and tab staffs." +} + + +\layout { + ragged-right = ##t +} + +mus = { \mark "R1*7" R1*7 \mark "R1" R1 \mark "r1" r1 \mark "r2" r2 \mark "r4" r4*2 } + +\score { + { + \compressFullBarRests + \new StaffGroup << + $@(map + (lambda (n) + #{ + \new Staff \with { \override StaffSymbol.line-count = $n } + { \mus << \mus \\ \mus >> } + #}) + (iota 8)) + $@(map + (lambda (x) + #{ + \new TabStaff \with { stringTunings = #x } + { \mus << \mus \\ \mus >> } + #}) + (list mandolin-tuning banjo-c-tuning guitar-tuning)) + >> + } + \layout { \tabFullNotation } +} diff --git a/input/regression/semi-tie-cross-staff.ly b/input/regression/semi-tie-cross-staff.ly new file mode 100644 index 0000000000..68d72f5852 --- /dev/null +++ b/input/regression/semi-tie-cross-staff.ly @@ -0,0 +1,23 @@ +\version "2.17.18" + +\header { + texidoc = "Cross-staff @code{RepeatTie} and @code{LaissezVibrerTie} +do not trigger programming errors for circular dependencies in direction. +" +} + +<< + \new Staff = "up" \relative c' { + f8 + \change Staff = "down" + c\laissezVibrer eeses + \change Staff = "up" + f + f8 + \change Staff = "down" + c eeses!\repeatTie + \change Staff = "up" + f + } + \new Staff = "down" { \clef bass s1 } +>> diff --git a/input/regression/slur-cross-staff-beam.ly b/input/regression/slur-cross-staff-beam.ly index 12c9c1f7a9..7d34fbbf04 100644 --- a/input/regression/slur-cross-staff-beam.ly +++ b/input/regression/slur-cross-staff-beam.ly @@ -1,13 +1,15 @@ \version "2.16.0" \header { - texidoc = "Slurs that depend on a cross-staff beam are not calculated until after line-breaking." + texidoc = "Slurs that depend on a cross-staff beam are not calculated until +after line-breaking and after inside-going articulations have been placed." } \paper { ragged-right=##t } \score { \new PianoStaff << - \context Staff = rh \relative c'' { c8([ d) \change Staff = lh c,] } - \context Staff = lh { s4. } + \context Staff = rh \relative c'' { c8([ d) \change Staff = lh c,] r + \stemDown c'8 \change Staff = rh c_( \change Staff = lh c_\marcato c)} + \context Staff = lh { s1 } >> } diff --git a/input/regression/stencil-hacking.ly b/input/regression/stencil-hacking.ly index 1e31345993..41192b986a 100644 --- a/input/regression/stencil-hacking.ly +++ b/input/regression/stencil-hacking.ly @@ -1,4 +1,3 @@ - \version "2.17.6" \header { texidoc=" You can write stencil callbacks in Scheme, thus @@ -16,16 +15,13 @@ parens are also not seen by accidentals. "Construct a function that will do CALLBACK and add parentheses. Example usage: - \\property NoteHead \\override #'print-function - = - #(parenthesize-callback ly:note-head::print) - -" - + \\override NoteHead.stencil + = + #(parenthesize-callback ly:note-head::print)" (define (parenthesize-stencil grob) "This function adds parentheses to the original callback for -GROB. The dimensions of the stencil is not affected. +GROB. It does not affect the dimensions of the stencil. " (let* ((fn (ly:grob-default-font grob)) @@ -34,14 +30,14 @@ GROB. The dimensions of the stencil is not affected. (subject (callback grob)) ; remember old size - (subject-dim-x (ly:stencil-extent subject 0)) - (subject-dim-y (ly:stencil-extent subject 1))) + (subject-dim-x (ly:stencil-extent subject X)) + (subject-dim-y (ly:stencil-extent subject Y))) ;; add parens (set! subject (ly:stencil-combine-at-edge - (ly:stencil-combine-at-edge subject 0 1 pclose 0.2) - 0 -1 popen 0.2)) + (ly:stencil-combine-at-edge subject X RIGHT pclose 0.2) + X LEFT popen 0.2)) ; revert old size. (ly:make-stencil diff --git a/input/regression/typography-demo.ly b/input/regression/typography-demo.ly index a28429b9db..92bab85643 100644 --- a/input/regression/typography-demo.ly +++ b/input/regression/typography-demo.ly @@ -10,7 +10,6 @@ heavily mutilated Edition Peters Morgenlied by Schubert" \version "2.17.6" #(ly:expect-warning (_ "(De)crescendo with unspecified starting volume in MIDI.")) -#(ly:expect-warning (_ "(De)crescendo with unspecified starting volume in MIDI.")) ignoreMelisma = \set ignoreMelismata = ##t ignoreMelismaOff = \unset ignoreMelismata @@ -35,7 +34,7 @@ modernAccidentals = { melody = \relative c'' \repeat volta 2 \context Voice = "singer" { \time 6/8 \autoBeamOff - << s2.^\markup { \larger { \hspace #-3.0 Lieblich, etwas geschwind } } + << s2.^\markup { \larger \line { \hspace #-3.1 Lieblich, etwas geschwind } } R2. >> r4 r8 c4 g8 | diff --git a/lily/accidental-placement.cc b/lily/accidental-placement.cc index 1f2a943045..b7a41c0266 100644 --- a/lily/accidental-placement.cc +++ b/lily/accidental-placement.cc @@ -342,9 +342,8 @@ extract_heads_and_stems (vector const &apes) for (vsize i = ret.size (); i--;) if (Grob *s = Rhythmic_head::get_stem (ret[i])) ret.push_back (s); - - vector_sort (ret, less ()); - uniq (ret); + + uniquify (ret); return ret; } diff --git a/lily/align-interface.cc b/lily/align-interface.cc index 986599e3f9..aee6dad705 100644 --- a/lily/align-interface.cc +++ b/lily/align-interface.cc @@ -61,84 +61,73 @@ Align_interface::align_to_ideal_distances (SCM smob) return SCM_BOOL_T; } -/* for each grob, find its upper and lower skylines. If the extent is - non-empty but there is no skyline available (or pure is true), just +/* Return upper and lower skylines for VerticalAxisGroup g. If the extent + is non-empty but there is no skyline available (or pure is true), just create a flat skyline from the bounding box */ // TODO(jneem): the pure and non-pure parts seem to share very little // code. Split them into 2 functions, perhaps? -static void -get_skylines (Grob *me, - vector const &elements, +static Skyline_pair +get_skylines (Grob *g, Axis a, - bool pure, int start, int end, - vector *ret, - vector const *skip_elt) + Grob *other_common, + bool pure, int start, int end) { - Grob *other_common = common_refpoint_of_array (elements, me, other_axis (a)); + Skyline_pair skylines; - for (vsize i = elements.size (); i--;) + if (!pure) { - Grob *g = elements[i]; - Skyline_pair skylines; - - if (!pure) - { - Skyline_pair *skys = Skyline_pair::unsmob (g->get_property (a == Y_AXIS - ? "vertical-skylines" - : "horizontal-skylines")); - if (skys) - skylines = *skys; - - /* This skyline was calculated relative to the grob g. In order to compare it to - skylines belonging to other grobs, we need to shift it so that it is relative - to the common reference. */ - Real offset = g->relative_coordinate (other_common, other_axis (a)); - skylines.shift (offset); - } - else if (!(*skip_elt)[i]) + Skyline_pair *skys = Skyline_pair::unsmob (g->get_property (a == Y_AXIS + ? "vertical-skylines" + : "horizontal-skylines")); + if (skys) + skylines = *skys; + + /* This skyline was calculated relative to the grob g. In order to compare it to + skylines belonging to other grobs, we need to shift it so that it is relative + to the common reference. */ + Real offset = g->relative_coordinate (other_common, other_axis (a)); + skylines.shift (offset); + } + else if (Hara_kiri_group_spanner::request_suicide (g, start, end)) + return skylines; + else + { + assert (a == Y_AXIS); + Interval extent = g->pure_height (g, start, end); + + // This is a hack to get better accuracy on the pure-height of VerticalAlignment. + // It's quite common for a treble clef to be the highest element of one system + // and for a low note (or lyrics) to be the lowest note on another. The two will + // never collide, but the pure-height stuff only works with bounding boxes, so it + // doesn't know that. The result is a significant over-estimation of the pure-height, + // especially on systems with many staves. To correct for this, we build a skyline + // in two parts: the part we did above contains most of the grobs (note-heads, etc.) + // while the bit we're about to do only contains the breakable grobs at the beginning + // of the system. This way, the tall treble clefs are only compared with the treble + // clefs of the other staff and they will be ignored if the staff above is, for example, + // lyrics. + if (Axis_group_interface::has_interface (g)) { - assert (a == Y_AXIS); - Interval extent = g->pure_height (g, start, end); - - // This is a hack to get better accuracy on the pure-height of VerticalAlignment. - // It's quite common for a treble clef to be the highest element of one system - // and for a low note (or lyrics) to be the lowest note on another. The two will - // never collide, but the pure-height stuff only works with bounding boxes, so it - // doesn't know that. The result is a significant over-estimation of the pure-height, - // especially on systems with many staves. To correct for this, we build a skyline - // in two parts: the part we did above contains most of the grobs (note-heads, etc.) - // while the bit we're about to do only contains the breakable grobs at the beginning - // of the system. This way, the tall treble clefs are only compared with the treble - // clefs of the other staff and they will be ignored if the staff above is, for example, - // lyrics. - if (Axis_group_interface::has_interface (g)) - { - extent = Axis_group_interface::rest_of_line_pure_height (g, start, end); - Interval begin_of_line_extent = Axis_group_interface::begin_of_line_pure_height (g, start); - if (!begin_of_line_extent.is_empty ()) - { - Box b; - b[a] = begin_of_line_extent; - b[other_axis (a)] = Interval (-infinity_f, -1); - skylines.insert (b, other_axis (a)); - } - } - - if (!extent.is_empty ()) + extent = Axis_group_interface::rest_of_line_pure_height (g, start, end); + Interval begin_of_line_extent = Axis_group_interface::begin_of_line_pure_height (g, start); + if (!begin_of_line_extent.is_empty ()) { Box b; - b[a] = extent; - b[other_axis (a)] = Interval (0, infinity_f); + b[a] = begin_of_line_extent; + b[other_axis (a)] = Interval (-infinity_f, -1); skylines.insert (b, other_axis (a)); } } - // even if the skyline is empty, we want to push it back - // the heap because we will use things like system-system-distance - // to account for its presence - ret->push_back (skylines); + if (!extent.is_empty ()) + { + Box b; + b[a] = extent; + b[other_axis (a)] = Interval (0, infinity_f); + skylines.insert (b, other_axis (a)); + } } - reverse (*ret); + return skylines; } vector @@ -203,45 +192,35 @@ Align_interface::internal_get_minimum_translations (Grob *me, Direction stacking_dir = robust_scm2dir (me->get_property ("stacking-dir"), DOWN); - vector skylines; - vector skip_elt; - // only add to skip elt if pure - // if not pure, no dead element should be in the list - for (vsize i = 0; i < elems.size (); i++) - { - if (!pure && !elems[i]->is_live ()) - elems[i]->programming_error ("I should be dead by now..."); - skip_elt.push_back (pure && Hara_kiri_group_spanner::request_suicide (elems[i], start, end)); - } - get_skylines (me, elems, a, pure, start, end, &skylines, &skip_elt); + Grob *other_common = common_refpoint_of_array (elems, me, other_axis (a)); Real where = 0; Real default_padding = robust_scm2double (me->get_property ("padding"), 0.0); vector translates; Skyline down_skyline (stacking_dir); + Grob *last_nonempty_element = 0; Real last_spaceable_element_pos = 0; Grob *last_spaceable_element = 0; Skyline last_spaceable_skyline (stacking_dir); int spaceable_count = 0; for (vsize j = 0; j < elems.size (); j++) { - // This means that it will be suicided later downstream, so we - // skip it so that its padding is not added in. - if (pure && skip_elt[j]) - continue; - Real dy = 0; Real padding = default_padding; - if (j == 0) - dy = skylines[j][-stacking_dir].max_height () + padding; + Skyline_pair skyline = get_skylines (elems[j], a, other_common, pure, start, end); + + if (skyline.is_empty ()) + dy = 0.0; + else if (!last_nonempty_element) + dy = skyline[-stacking_dir].max_height () + padding; else { - SCM spec = Page_layout_problem::get_spacing_spec (elems[j - 1], elems[j], pure, start, end); + SCM spec = Page_layout_problem::get_spacing_spec (last_nonempty_element, elems[j], pure, start, end); Page_layout_problem::read_spacing_spec (spec, &padding, ly_symbol2scm ("padding")); - dy = down_skyline.distance (skylines[j][-stacking_dir]) + padding; + dy = down_skyline.distance (skyline[-stacking_dir]) + padding; Real spec_distance = 0; if (Page_layout_problem::read_spacing_spec (spec, &spec_distance, ly_symbol2scm ("minimum-distance"))) @@ -261,7 +240,7 @@ Align_interface::internal_get_minimum_translations (Grob *me, Page_layout_problem::read_spacing_spec (spec, &spaceable_padding, ly_symbol2scm ("padding")); - dy = max (dy, (last_spaceable_skyline.distance (skylines[j][-stacking_dir]) + dy = max (dy, (last_spaceable_skyline.distance (skyline[-stacking_dir]) + stacking_dir * (last_spaceable_element_pos - where) + spaceable_padding)); Real spaceable_min_distance = 0; @@ -275,12 +254,9 @@ Align_interface::internal_get_minimum_translations (Grob *me, } } - if (isinf (dy)) /* if the skyline is empty, maybe max_height is infinity_f */ - dy = 0.0; - dy = max (0.0, dy); down_skyline.raise (-stacking_dir * dy); - down_skyline.merge (skylines[j][stacking_dir]); + down_skyline.merge (skyline[stacking_dir]); where += stacking_dir * dy; translates.push_back (where); @@ -291,37 +267,19 @@ Align_interface::internal_get_minimum_translations (Grob *me, last_spaceable_element_pos = where; last_spaceable_skyline = down_skyline; } - } - - // So far, we've computed the translates for all the non-empty elements. - // Here, we set the translates for the empty elements: an empty element - // gets the same translation as the last non-empty element before it. - vector non_empty_elems; - for (vsize i = 0; i < elems.size (); i++) - if (!skip_elt[i]) - non_empty_elems.push_back (elems[i]); - - vector all_translates; - if (!translates.empty ()) - { - Real w = translates[0]; - for (vsize i = 0, j = 0; j < elems.size (); j++) - { - if (i < non_empty_elems.size () && elems[j] == non_empty_elems[i]) - w = translates[i++]; - all_translates.push_back (w); - } + if (!skyline.is_empty ()) + last_nonempty_element = elems[j]; } if (pure) { SCM mta = me->get_property ("minimum-translations-alist"); mta = scm_cons (scm_cons (scm_cons (scm_from_int (start), scm_from_int (end)), - ly_floatvector2scm (all_translates)), + ly_floatvector2scm (translates)), mta); me->set_property ("minimum-translations-alist", mta); } - return all_translates; + return translates; } void diff --git a/lily/arpeggio.cc b/lily/arpeggio.cc index 96b6bbd3d5..fa53ff2611 100644 --- a/lily/arpeggio.cc +++ b/lily/arpeggio.cc @@ -169,7 +169,7 @@ Arpeggio::brew_chord_bracket (SCM smob) Real lt = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness")); Real sp = 1.5 * Staff_symbol_referencer::staff_space (me); Real dy = heads.length () + sp; - Real x = 0.7; + Real x = robust_scm2double (me->get_property ("protrusion"), 0.4); Stencil mol (Lookup::bracket (Y_AXIS, Interval (0, dy), lt, x, lt)); mol.translate_axis (heads[LEFT] - sp / 2.0, Y_AXIS); @@ -227,9 +227,10 @@ ADD_INTERFACE (Arpeggio, /* properties */ "arpeggio-direction " + "dash-definition " // TODO: make apply to non-slur arpeggios "positions " + "protrusion " "script-priority " // TODO: make around-note-interface "stems " - "dash-definition " // TODO: make apply to non-slur arpeggios ); diff --git a/lily/beam-collision-engraver.cc b/lily/beam-collision-engraver.cc index 364d725c9a..9771799c18 100644 --- a/lily/beam-collision-engraver.cc +++ b/lily/beam-collision-engraver.cc @@ -34,7 +34,7 @@ protected: DECLARE_ACKNOWLEDGER (stem); DECLARE_ACKNOWLEDGER (accidental); DECLARE_ACKNOWLEDGER (clef); - DECLARE_ACKNOWLEDGER (octavate_eight); + DECLARE_ACKNOWLEDGER (clef_modifier); DECLARE_ACKNOWLEDGER (key_signature); DECLARE_ACKNOWLEDGER (time_signature); DECLARE_ACKNOWLEDGER (beam); @@ -167,7 +167,7 @@ Beam_collision_engraver::acknowledge_key_signature (Grob_info i) } void -Beam_collision_engraver::acknowledge_octavate_eight (Grob_info i) +Beam_collision_engraver::acknowledge_clef_modifier (Grob_info i) { covered_grobs_.push_back (i); } @@ -199,7 +199,7 @@ ADD_ACKNOWLEDGER (Beam_collision_engraver, accidental); ADD_ACKNOWLEDGER (Beam_collision_engraver, clef); ADD_ACKNOWLEDGER (Beam_collision_engraver, key_signature); ADD_ACKNOWLEDGER (Beam_collision_engraver, time_signature); -ADD_ACKNOWLEDGER (Beam_collision_engraver, octavate_eight); +ADD_ACKNOWLEDGER (Beam_collision_engraver, clef_modifier); ADD_ACKNOWLEDGER (Beam_collision_engraver, flag); ADD_ACKNOWLEDGER (Beam_collision_engraver, beam); diff --git a/lily/clef-engraver.cc b/lily/clef-engraver.cc index 1471c481b2..9e2a3eaa7f 100644 --- a/lily/clef-engraver.cc +++ b/lily/clef-engraver.cc @@ -43,11 +43,11 @@ protected: virtual void derived_mark () const; private: Item *clef_; - Item *octavate_; + Item *modifier_; SCM prev_glyph_; SCM prev_cpos_; - SCM prev_octavation_; + SCM prev_transposition_; void create_clef (); void set_glyph (); void inspect_clef_properties (); @@ -56,7 +56,7 @@ private: void Clef_engraver::derived_mark () const { - scm_gc_mark (prev_octavation_); + scm_gc_mark (prev_transposition_); scm_gc_mark (prev_cpos_); scm_gc_mark (prev_glyph_); } @@ -64,12 +64,12 @@ Clef_engraver::derived_mark () const Clef_engraver::Clef_engraver () { clef_ = 0; - octavate_ = 0; + modifier_ = 0; /* will trigger a clef at the start since #f != ' () */ - prev_octavation_ = prev_cpos_ = prev_glyph_ = SCM_BOOL_F; + prev_transposition_ = prev_cpos_ = prev_glyph_ = SCM_BOOL_F; } void @@ -107,21 +107,21 @@ Clef_engraver::create_clef () if (scm_is_number (cpos)) clef_->set_property ("staff-position", cpos); - SCM oct = get_property ("clefOctavation"); - if (scm_is_number (oct) && scm_to_int (oct)) + SCM transp = get_property ("clefTransposition"); + if (scm_is_number (transp) && scm_to_int (transp)) { - Item *g = make_item ("OctavateEight", SCM_EOL); + Item *g = make_item ("ClefModifier", SCM_EOL); - int abs_oct = scm_to_int (oct); - int dir = sign (abs_oct); - abs_oct = abs (abs_oct) + 1; + int abs_transp = scm_to_int (transp); + int dir = sign (abs_transp); + abs_transp = abs (abs_transp) + 1; - SCM txt = scm_number_to_string (scm_from_int (abs_oct), + SCM txt = scm_number_to_string (scm_from_int (abs_transp), scm_from_int (10)); - SCM style = get_property ("clefOctavationStyle"); + SCM style = get_property ("clefTranspositionStyle"); - SCM formatter = get_property ("clefOctavationFormatter"); + SCM formatter = get_property ("clefTranspositionFormatter"); if (ly_is_procedure (formatter)) g->set_property ("text", scm_call_2 (formatter, txt, style)); @@ -130,7 +130,7 @@ Clef_engraver::create_clef () g->set_parent (clef_, Y_AXIS); g->set_parent (clef_, X_AXIS); g->set_property ("direction", scm_from_int (dir)); - octavate_ = g; + modifier_ = g; } } } @@ -153,13 +153,13 @@ Clef_engraver::inspect_clef_properties () { SCM glyph = get_property ("clefGlyph"); SCM clefpos = get_property ("clefPosition"); - SCM octavation = get_property ("clefOctavation"); + SCM transposition = get_property ("clefTransposition"); SCM force_clef = get_property ("forceClef"); if (clefpos == SCM_EOL || scm_equal_p (glyph, prev_glyph_) == SCM_BOOL_F || scm_equal_p (clefpos, prev_cpos_) == SCM_BOOL_F - || scm_equal_p (octavation, prev_octavation_) == SCM_BOOL_F + || scm_equal_p (transposition, prev_transposition_) == SCM_BOOL_F || to_boolean (force_clef)) { apply_on_children (context (), @@ -174,7 +174,7 @@ Clef_engraver::inspect_clef_properties () prev_cpos_ = clefpos; prev_glyph_ = glyph; - prev_octavation_ = octavation; + prev_transposition_ = transposition; } if (to_boolean (force_clef)) @@ -199,7 +199,7 @@ Clef_engraver::stop_translation_timestep () clef_ = 0; - octavate_ = 0; + modifier_ = 0; } } @@ -210,12 +210,12 @@ ADD_TRANSLATOR (Clef_engraver, /* create */ "Clef " - "OctavateEight ", + "ClefModifier ", /* read */ "clefGlyph " - "clefOctavation " - "clefOctavationStyle " + "clefTransposition " + "clefTranspositionStyle " "clefPosition " "explicitClefVisibility " "forceClef ", diff --git a/lily/constrained-breaking.cc b/lily/constrained-breaking.cc index ee8b28906c..8d3b6967e4 100644 --- a/lily/constrained-breaking.cc +++ b/lily/constrained-breaking.cc @@ -571,7 +571,9 @@ Line_details::Line_details (Prob *pb, Output_def *paper) last_column_ = 0; force_ = 0; - Interval stencil_extent = unsmob_stencil (pb->get_property ("stencil"))->extent (Y_AXIS); + Stencil *st = unsmob_stencil (pb->get_property ("stencil")); + Interval stencil_extent = st->is_empty () ? Interval (0, 0) + : st->extent (Y_AXIS); shape_ = Line_shape (stencil_extent, stencil_extent); // pretend it goes all the way across tallness_ = 0; bottom_padding_ = 0; diff --git a/lily/cue-clef-engraver.cc b/lily/cue-clef-engraver.cc index 1723964266..aebf071b9e 100644 --- a/lily/cue-clef-engraver.cc +++ b/lily/cue-clef-engraver.cc @@ -46,22 +46,22 @@ protected: virtual void derived_mark () const; private: Item *clef_; - Item *octavate_; + Item *modifier_; SCM prev_glyph_; SCM prev_cpos_; - SCM prev_octavation_; + SCM prev_transposition_; void create_clef (); void create_end_clef (); void set_glyph (); void inspect_clef_properties (); - void create_octavate_eight (SCM oct); + void create_clef_modifier (SCM oct); }; void Cue_clef_engraver::derived_mark () const { - scm_gc_mark (prev_octavation_); + scm_gc_mark (prev_transposition_); scm_gc_mark (prev_cpos_); scm_gc_mark (prev_glyph_); } @@ -69,9 +69,9 @@ Cue_clef_engraver::derived_mark () const Cue_clef_engraver::Cue_clef_engraver () { clef_ = 0; - octavate_ = 0; + modifier_ = 0; - prev_octavation_ = prev_cpos_ = prev_glyph_ = SCM_EOL; + prev_transposition_ = prev_cpos_ = prev_glyph_ = SCM_EOL; } void @@ -100,22 +100,22 @@ Cue_clef_engraver::acknowledge_bar_line (Grob_info info) } void -Cue_clef_engraver::create_octavate_eight (SCM oct) +Cue_clef_engraver::create_clef_modifier (SCM transp) { - if (scm_is_number (oct) && scm_to_int (oct)) + if (scm_is_number (transp) && scm_to_int (transp)) { - Item *g = make_item ("OctavateEight", SCM_EOL); + Item *g = make_item ("ClefModifier", SCM_EOL); - int abs_oct = scm_to_int (oct); - int dir = sign (abs_oct); - abs_oct = abs (abs_oct) + 1; + int abs_transp = scm_to_int (transp); + int dir = sign (abs_transp); + abs_transp = abs (abs_transp) + 1; - SCM txt = scm_number_to_string (scm_from_int (abs_oct), + SCM txt = scm_number_to_string (scm_from_int (abs_transp), scm_from_int (10)); - SCM style = get_property ("cueClefOctavationStyle"); + SCM style = get_property ("cueClefTranspositionStyle"); - SCM formatter = get_property ("cueClefOctavationFormatter"); + SCM formatter = get_property ("cueClefTranspositionFormatter"); if (ly_is_procedure (formatter)) g->set_property ("text", scm_call_2 (formatter, txt, style)); @@ -124,7 +124,7 @@ Cue_clef_engraver::create_octavate_eight (SCM oct) g->set_parent (clef_, Y_AXIS); g->set_parent (clef_, X_AXIS); g->set_property ("direction", scm_from_int (dir)); - octavate_ = g; + modifier_ = g; } } @@ -140,7 +140,7 @@ Cue_clef_engraver::create_clef () if (scm_is_number (cpos)) clef_->set_property ("staff-position", cpos); - create_octavate_eight (get_property ("cueClefOctavation")); + create_clef_modifier (get_property ("cueClefTransposition")); } } @@ -154,7 +154,7 @@ Cue_clef_engraver::create_end_clef () if (scm_is_number (cpos)) clef_->set_property ("staff-position", cpos); - create_octavate_eight (get_property ("clefOctavation")); + create_clef_modifier (get_property ("clefTransposition")); } } @@ -169,11 +169,11 @@ Cue_clef_engraver::inspect_clef_properties () { SCM glyph = get_property ("cueClefGlyph"); SCM clefpos = get_property ("cueClefPosition"); - SCM octavation = get_property ("cueClefOctavation"); + SCM transposition = get_property ("cueClefTransposition"); if (scm_equal_p (glyph, prev_glyph_) == SCM_BOOL_F || scm_equal_p (clefpos, prev_cpos_) == SCM_BOOL_F - || scm_equal_p (octavation, prev_octavation_) == SCM_BOOL_F) + || scm_equal_p (transposition, prev_transposition_) == SCM_BOOL_F) { set_glyph (); if (scm_is_string (glyph)) @@ -187,7 +187,7 @@ Cue_clef_engraver::inspect_clef_properties () prev_cpos_ = clefpos; prev_glyph_ = glyph; - prev_octavation_ = octavation; + prev_transposition_ = transposition; } } @@ -205,7 +205,7 @@ Cue_clef_engraver::stop_translation_timestep () clef_->set_property ("break-visibility", vis); clef_ = 0; - octavate_ = 0; + modifier_ = 0; } } @@ -217,16 +217,16 @@ ADD_TRANSLATOR (Cue_clef_engraver, /* create */ "CueClef " "CueEndClef " - "OctavateEight ", + "ClefModifier ", /* read */ "cueClefGlyph " - "cueClefOctavation " - "cueClefOctavationStyle " + "cueClefTransposition " + "cueClefTranspositionStyle " "cueClefPosition " "explicitCueClefVisibility " "middleCCuePosition " - "clefOctavation ", + "clefTransposition ", /* write */ "" diff --git a/lily/grob-array.cc b/lily/grob-array.cc index 62d071cee1..d0cf111068 100644 --- a/lily/grob-array.cc +++ b/lily/grob-array.cc @@ -98,8 +98,7 @@ Grob_array::remove_duplicates () { assert (!ordered_); - vector_sort (grobs_, less ()); - ::uniq (grobs_); + uniquify (grobs_); } bool diff --git a/lily/grob.cc b/lily/grob.cc index a6b862e04e..43828310a7 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -972,3 +972,50 @@ Grob::check_cross_staff (Grob *commony) return false; } +static +bool +indirect_less (Grob **a, Grob **b) +{ + // Use original order as tie breaker. That gives us a stable sort + // at the lower price tag of an unstable one, and we want a stable + // sort in order to reliably retain the first instance of a grob + // pointer. + return *a < *b || (*a == *b && a < b); +} + +static +bool +indirect_eq (Grob **a, Grob **b) +{ + return *a == *b; +} + +static +bool +direct_less (Grob **a, Grob **b) +{ + return a < b; +} + +// uniquify uniquifies on the memory addresses of the Grobs, but then +// uses the original order. This makes results independent from the +// memory allocation of Grobs. + +void +uniquify (vector & grobs) +{ + vector vec (grobs.size ()); + for (vsize i = 0; i < grobs.size (); i++) + vec[i] = &grobs[i]; + vector_sort (vec, indirect_less); + vec.erase (unique (vec.begin (), vec.end (), indirect_eq), vec.end ()); + vector_sort (vec, direct_less); + + // Since the output is a sorted copy of the input with some elements + // removed, we can fill in the vector in-place if we do it starting + // from the front. + for (vsize i = 0; i < vec.size (); i++) + grobs[i] = *vec[i]; + grobs.erase (grobs.begin () + vec.size (), grobs.end ()); + return; +} diff --git a/lily/include/grob.hh b/lily/include/grob.hh index 70c9c0a94e..bc4071eb04 100644 --- a/lily/include/grob.hh +++ b/lily/include/grob.hh @@ -176,6 +176,9 @@ DECLARE_UNSMOB (Grob, grob); Spanner *unsmob_spanner (SCM); Item *unsmob_item (SCM); +/* unification */ +void uniquify (vector &); + /* refpoints */ Grob *common_refpoint_of_list (SCM elt_list, Grob *, Axis a); Grob *common_refpoint_of_array (vector const &, Grob *, Axis a); diff --git a/lily/include/rest.hh b/lily/include/rest.hh index 208da0499a..9a0b811ed7 100644 --- a/lily/include/rest.hh +++ b/lily/include/rest.hh @@ -30,7 +30,9 @@ public: DECLARE_SCHEME_CALLBACK (y_offset_callback, (SCM)); DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM)); DECLARE_GROB_INTERFACE (); - static string glyph_name (Grob *, int, string, bool); + static string glyph_name (Grob *, int, string, bool, Real); + static Real staff_position_internal (Grob *, int /* duration_log */, + int /* dir */); static SCM brew_internal_stencil (Grob *, bool); static SCM generic_extent_callback (Grob *, Axis); static void translate (Grob *me, int dy); diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index 36e4626532..e823c298e3 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -19,6 +19,7 @@ #include "multi-measure-rest.hh" +#include "directional-element-interface.hh" #include "duration.hh" #include "font-interface.hh" #include "international.hh" @@ -32,6 +33,7 @@ #include "separation-item.hh" #include "spacing-options.hh" #include "spanner.hh" +#include "staff-symbol.hh" #include "staff-symbol-referencer.hh" #include "system.hh" #include "text-interface.hh" @@ -223,15 +225,14 @@ Multi_measure_rest::symbol_stencil (Grob *me, Real space) if (measure_count == 1) { - if (mdl == 0 && me->get_property ("staff-position") == SCM_EOL) + if (me->get_property ("staff-position") == SCM_EOL) { - if (Staff_symbol_referencer::on_staff_line (me, 2)) - me->set_property ("staff-position", scm_from_int (2)); - else if (Staff_symbol_referencer::on_staff_line (me, 3)) - me->set_property ("staff-position", scm_from_int (3)); + int dir = get_grob_direction (me); + Real pos = Rest::staff_position_internal (me, mdl, dir); + me->set_property ("staff-position", scm_from_double (pos)); } - - Stencil s = musfont->find_by_name (Rest::glyph_name (me, mdl, "", true)); + + Stencil s = musfont->find_by_name (Rest::glyph_name (me, mdl, "", true, 0.0)); s.translate_axis ((space - s.extent (X_AXIS).length ()) / 2, X_AXIS); return s; @@ -280,6 +281,22 @@ Multi_measure_rest::church_rest (Grob *me, Font_metric *musfont, int measure_cou Real symbols_width = 0.0; double total_duration = measure_count * pow (2.0, -calc_measure_duration_log (me, true)); + SCM staff_position = me->get_property ("staff-position"); + + if (!scm_is_number (staff_position)) + { + // Staff position is somewhat icky regarding its definition for + // compatibility reasons. It is intended to be the baseline of + // a breve rest. However, when the staff space is more than + // single space (like with tablature), it looks better if all + // rests are actually hanging. So staff position, in reality, + // is the semi-breve position - 2. Everything else is + // calculated from there. + int dir = get_grob_direction (me); + Real pos = Rest::staff_position_internal (me, 0, dir); + me->set_property ("staff-position", scm_from_double (pos - 2)); + } + while (total_duration > 0) { int dl = calc_closest_duration_log (me, total_duration, false, true); @@ -287,12 +304,17 @@ Multi_measure_rest::church_rest (Grob *me, Font_metric *musfont, int measure_cou total_duration -= duration; - Stencil r = musfont->find_by_name (Rest::glyph_name (me, dl, "", true)); + Stencil r = musfont->find_by_name (Rest::glyph_name (me, dl, "", true, 2)); + + Real staff_space = Staff_symbol_referencer::staff_space (me); if (dl == 0) { - Real staff_space = Staff_symbol_referencer::staff_space (me); r.translate_axis (staff_space, Y_AXIS); } + else + { + r.translate_axis (staff_space-r.extent (Y_AXIS).at (UP), Y_AXIS); + } symbols_width += r.extent (X_AXIS).length (); mols = scm_cons (r.smobbed_copy (), mols); symbol_count++; diff --git a/lily/page-layout-problem.cc b/lily/page-layout-problem.cc index 11177be03a..95635140bf 100644 --- a/lily/page-layout-problem.cc +++ b/lily/page-layout-problem.cc @@ -161,8 +161,10 @@ Page_layout_problem::add_footnotes_to_lines (SCM lines, int counter, Paper_book in duplicated work, either by making this process less complicated or (preferably) by passing its results downstream. */ - vector footnote_number_markups; // Holds the numbering markups. - vector footnote_number_stencils; // Holds translated versions of the stencilized numbering markups. + + // find the maximum X_AXIS length + Real max_length = -infinity_f; + for (vsize i = 0; i < fn_count; i++) { if (fn_grobs[i]) @@ -172,43 +174,40 @@ Page_layout_problem::add_footnotes_to_lines (SCM lines, int counter, Paper_book (void) scm_call_1 (assertion_function, scm_from_int (counter)); } SCM markup = scm_call_1 (numbering_function, scm_from_int (counter)); - Stencil *s = unsmob_stencil (Text_interface::interpret_markup (layout, props, markup)); - if (!s) + SCM stencil = Text_interface::interpret_markup (layout, props, markup); + Stencil *st = unsmob_stencil (stencil); + if (!st) { programming_error ("Your numbering function needs to return a stencil."); - footnote_number_markups.push_back (SCM_EOL); - footnote_number_stencils.push_back (Stencil (Box (Interval (0, 0), Interval (0, 0)), SCM_EOL)); - } - else - { - footnote_number_markups.push_back (markup); - footnote_number_stencils.push_back (*s); + markup = SCM_EOL; + stencil = Stencil (Box (Interval (0, 0), Interval (0, 0)), SCM_EOL).smobbed_copy (); + st = unsmob_stencil (stencil); } + in_text_numbers = scm_cons (markup, in_text_numbers); + numbers = scm_cons (stencil, numbers); + + if (!st->extent (X_AXIS).is_empty ()) + max_length = max (max_length, st->extent (X_AXIS)[RIGHT]); + counter++; } - // find the maximum X_AXIS length - Real max_length = -infinity_f; - for (vsize i = 0; i < fn_count; i++) - max_length = max (max_length, footnote_number_stencils[i].extent (X_AXIS).length ()); + in_text_numbers = scm_reverse_x (in_text_numbers, SCM_EOL); + numbers = scm_reverse_x (numbers, SCM_EOL); /* translate each stencil such that it attains the correct maximum length and bundle the footnotes into a scheme object. */ - for (vsize i = 0; i < fn_count; i++) + for (SCM p = numbers; scm_is_pair (p); p = scm_cdr (p)) { - in_text_numbers = scm_cons (footnote_number_markups[i], in_text_numbers); - footnote_number_stencils[i].translate_axis ((max_length - - footnote_number_stencils[i].extent (X_AXIS).length ()), - X_AXIS); - numbers = scm_cons (footnote_number_stencils[i].smobbed_copy (), numbers); + Stencil *st = unsmob_stencil (scm_car (p)); + if (!st->extent (X_AXIS).is_empty ()) + st->translate_axis ((max_length - st->extent (X_AXIS)[RIGHT]), + X_AXIS); } - in_text_numbers = scm_reverse_x (in_text_numbers, SCM_EOL); - numbers = scm_reverse_x (numbers, SCM_EOL); - // build the footnotes for (SCM s = lines; scm_is_pair (s); s = scm_cdr (s)) @@ -853,6 +852,9 @@ Page_layout_problem::find_system_offsets () } else // ! is_spaceable { + if (staff->extent (staff, Y_AXIS).is_empty ()) + continue; + if (loose_lines.empty ()) loose_lines.push_back (last_spaceable_line); diff --git a/lily/rest.cc b/lily/rest.cc index 8e45405de2..bf6f43758b 100644 --- a/lily/rest.cc +++ b/lily/rest.cc @@ -39,19 +39,28 @@ Rest::y_offset_callback (SCM smob) int duration_log = scm_to_int (me->get_property ("duration-log")); Real ss = Staff_symbol_referencer::staff_space (me); + return scm_from_double (ss * 0.5 * Rest::staff_position_internal (me, duration_log, get_grob_direction (me))); +} + +Real +Rest::staff_position_internal (Grob *me, int duration_log, int dir) +{ + if (!me) + return 0; + bool position_override = scm_is_number (me->get_property ("staff-position")); - Real amount; + Real pos; if (position_override) { - amount - = robust_scm2double (me->get_property ("staff-position"), 0) * 0.5 * ss; + pos + = robust_scm2double (me->get_property ("staff-position"), 0); /* semibreve rests are positioned one staff line off */ if (duration_log == 0) - amount += ss; + return pos + 2; /* trust the client on good positioning; @@ -59,37 +68,75 @@ Rest::y_offset_callback (SCM smob) to be properly aligned to staff lines, but custom rest shapes may not need that sort of care. */ + + return pos; } - else - { - int pos = 4 * get_grob_direction (me); + pos = 4 * dir; + + if (duration_log > 1) + /* Only half notes or longer want alignment with staff lines */ + return pos; + + /* + We need a staff symbol for actually aligning anything + */ + Grob *staff = Staff_symbol_referencer::get_staff_symbol (me); + if (!staff) + return pos; + + std::vector linepos = Staff_symbol::line_positions (staff); + + if (linepos.empty ()) + return pos; + + std::sort (linepos.begin (), linepos.end ()); + + if (duration_log == 0) + { /* - make a semibreve rest hang from the next line, - except for a single line staff + lower voice semibreve rests generally hang a line lower */ - if (duration_log == 0 && Staff_symbol_referencer::line_count (me) > 1) - pos += 2; + + if (dir < 0) + pos -= 2; /* - make sure rest is aligned to a staff line + make a semibreve rest hang from the next available line, + except when there is none. */ - if (Grob *staff = Staff_symbol_referencer::get_staff_symbol (me)) - { - std::vector linepos = Staff_symbol::line_positions (staff); - std::sort (linepos.begin (), linepos.end ()); - std::vector::const_iterator it - = std::lower_bound (linepos.begin (), linepos.end (), pos); - if (it != linepos.end ()) - { - pos = (int)ceil (*it); - } - } - - amount = ss * 0.5 * pos; + + std::vector::const_iterator it + = std::upper_bound (linepos.begin (), linepos.end (), pos); + if (it != linepos.end ()) + pos = *it; + else + pos = linepos.back (); } + else + { + std::vector::const_iterator it + = std::upper_bound (linepos.begin (), linepos.end (), pos); + if (it != linepos.begin ()) + --it; + pos = *it; + } + + /* Finished for neutral position */ + if (!dir) + return pos; - return scm_from_double (amount); + /* If we have a voiced position, make sure that it's on the + proper side of neutral before using it. If it isn't, we fall + back to a constant offset from neutral position. + */ + + Real neutral = staff_position_internal (me, duration_log, 0); + + if (dir * (pos - neutral) > 0) + return pos; + + return neutral + 4 * dir; } /* A rest might lie under a beam, in which case it should be cross-staff if @@ -112,13 +159,14 @@ Rest::calc_cross_staff (SCM smob) make this function easily usable in C++ */ string -Rest::glyph_name (Grob *me, int durlog, string style, bool try_ledgers) +Rest::glyph_name (Grob *me, int durlog, string style, bool try_ledgers, + Real offset) { bool is_ledgered = false; if (try_ledgers && (durlog == -1 || durlog == 0 || durlog == 1)) { - int const pos = int (Staff_symbol_referencer::get_position (me)); - + int const pos = int (Staff_symbol_referencer::get_position (me) + + offset); /* half rests need ledger if not lying on a staff line, whole rests need ledger if not hanging from a staff line, @@ -186,7 +234,7 @@ Rest::brew_internal_stencil (Grob *me, bool ledgered) string style = robust_symbol2string (me->get_property ("style"), "default"); Font_metric *fm = Font_interface::get_default_font (me); - string font_char = glyph_name (me, durlog, style, ledgered); + string font_char = glyph_name (me, durlog, style, ledgered, 0.0); Stencil out = fm->find_by_name (font_char); if (out.is_empty ()) me->warning (_f ("rest `%s' not found", font_char.c_str ())); diff --git a/lily/side-position-interface.cc b/lily/side-position-interface.cc index 026a3286c5..7b816ab0be 100644 --- a/lily/side-position-interface.cc +++ b/lily/side-position-interface.cc @@ -149,29 +149,32 @@ Side_position_interface::calc_cross_staff (SCM smob) { Grob *me = unsmob_grob (smob); extract_grob_set (me, "side-support-elements", elts); -// Commented out because of cross staff issues -// Direction for cross staff stems depends on the spacing of staves, -// which depends on the inclusion of cross-staff side position grobs, -// which need the direction for positioning. So the get_grob_direction call -// may lead to circular dependencies. -// #if 0 + Direction my_dir = get_grob_direction (me) ; - // if a cross-staff grob is pointing in a different direction than - // that of an aligning element, we assume that the alignment - // of said element will not be influenced the cross-staffitude - // of the grob and thus we do not mark the aligning element - // as cross-staff - for (vsize i = 0; i < elts.size (); i++) - if (to_boolean (elts[i]->get_property ("cross-staff")) - && my_dir == get_grob_direction (elts[i])) - return SCM_BOOL_T; -//#endif -#if 0 for (vsize i = 0; i < elts.size (); i++) - if (to_boolean (elts[i]->get_property ("cross-staff"))) - return SCM_BOOL_T; -#endif + { + /* + If 'me' is placed relative to any cross-staff element with a + 'direction callback defined, the placement of 'me' is likely + to depend on staff-spacing, thus 'me' should be considered + cross-staff. + */ + if (to_boolean (elts[i]->get_property ("cross-staff")) + && !is_direction (elts[i]->get_property_data ("direction"))) + return SCM_BOOL_T; + + /* + If elts[i] is cross-staff and is pointing in the same + direction as 'me', we assume that the alignment + of 'me' is influenced the cross-staffitude of elts[i] + and thus we mark 'me' as cross-staff. + */ + if (to_boolean (elts[i]->get_property ("cross-staff")) + && my_dir == get_grob_direction (elts[i])) + return SCM_BOOL_T; + } + Grob *myvag = Grob::get_vertical_axis_group (me); for (vsize i = 0; i < elts.size (); i++) if (myvag != Grob::get_vertical_axis_group (elts[i])) @@ -256,6 +259,18 @@ Side_position_interface::aligned_side (Grob *me, Axis a, bool pure, int start, i // In the case of a stem, we will find a note head as well // ignoring the stem solves cyclic dependencies if the stem is // attached to a cross-staff beam. + bool cross_staff = to_boolean (e->get_property ("cross-staff")); + + // avoid cyclic dependency for direction + if (a == Y_AXIS + && pure + && Stem::has_interface (e) + && cross_staff + && !is_direction (e->get_property_data ("direction"))) + continue; + + // avoid unnecessary stem look up (if pointing away, it is not + // supporting anything) if (a == Y_AXIS && Stem::has_interface (e) && dir == - get_grob_direction (e)) @@ -264,13 +279,12 @@ Side_position_interface::aligned_side (Grob *me, Axis a, bool pure, int start, i if (e) { - bool cross_staff = to_boolean (e->get_property ("cross-staff")); Skyline_pair *sp = Skyline_pair::unsmob (e->get_maybe_pure_property (a == X_AXIS ? "horizontal-skylines" : "vertical-skylines", - pure || cross_staff, + pure, start, end)); diff --git a/lily/stencil-integral.cc b/lily/stencil-integral.cc index 0f1f14ff50..654ecdd5ab 100644 --- a/lily/stencil-integral.cc +++ b/lily/stencil-integral.cc @@ -289,7 +289,7 @@ make_partial_ellipse_boxes (vector &boxes, vector > &bui int quantization = max (1, (int) (((x_rad * trans.xx) + (y_rad * trans.yy)) * M_PI / QUANTIZATION_UNIT)); do { - for (vsize i = 0; i < 1 + quantization; i++) + for (vsize i = 0; i < 1 + (vsize) quantization; i++) { Real ang = linear_map (start, end, 0, quantization, i); complex coord = polar (1.0, ang); @@ -452,7 +452,7 @@ make_draw_bezier_boxes (vector &boxes, vector > &buildin Offset first = get_point_in_y_direction (curve.control_[0], perpendicular_slope (curve.slope_at_point (0.0)), th / 2, d); pango_matrix_transform_point (&trans, &first[X_AXIS], &first[Y_AXIS]); points[d].push_back (first); - for (vsize i = 1; i < quantization; i++) + for (vsize i = 1; i < (vsize) quantization; i++) { Real pt = (i * 1.0) / quantization; Offset inter = get_point_in_y_direction (curve.curve_point (pt), perpendicular_slope (curve.slope_at_point (pt)), th / 2, d); @@ -947,7 +947,8 @@ stencil_traverser (PangoMatrix trans, SCM expr) return stencil_traverser (trans, scm_caddr (expr)); } else if (scm_car (expr) == ly_symbol2scm ("delay-stencil-evaluation")) - return stencil_traverser (trans, scm_force (scm_cadr (expr))); + // should not use the place-holder text, but no need for the warning below + return vector (); else if (scm_car (expr) == ly_symbol2scm ("grob-cause")) return stencil_traverser (trans, scm_caddr (expr)); else if (scm_car (expr) == ly_symbol2scm ("color")) diff --git a/lily/stencil-scheme.cc b/lily/stencil-scheme.cc index 7791f02d5a..37203f4eda 100644 --- a/lily/stencil-scheme.cc +++ b/lily/stencil-scheme.cc @@ -139,7 +139,8 @@ LY_DEFINE (ly_stencil_add, "ly:stencil-add", SCM_VALIDATE_REST_ARGUMENT (args); SCM expr = SCM_EOL; - SCM *tail = &expr; + SCM cs = ly_symbol2scm ("combine-stencil"); + Box extent; extent.set_empty (); @@ -150,12 +151,18 @@ LY_DEFINE (ly_stencil_add, "ly:stencil-add", SCM_ASSERT_TYPE (s, scm_car (args), SCM_ARGn, __FUNCTION__, "Stencil"); extent.unite (s->extent_box ()); - *tail = scm_cons (s->expr (), SCM_EOL); - tail = SCM_CDRLOC (*tail); + if (scm_is_pair (s->expr ()) && scm_is_eq (cs, s->expr ())) + { + expr = scm_reverse_x (scm_list_copy (scm_cdr (s->expr ())), + expr); + } + else + expr = scm_cons (s->expr (), expr); + args = scm_cdr (args); } - expr = scm_cons (ly_symbol2scm ("combine-stencil"), expr); + expr = scm_cons (cs, scm_reverse_x (expr, SCM_EOL)); return Stencil (extent, expr).smobbed_copy (); } diff --git a/lily/stencil.cc b/lily/stencil.cc index eb3420d072..0a7f40205d 100644 --- a/lily/stencil.cc +++ b/lily/stencil.cc @@ -205,7 +205,24 @@ Stencil::scale (Real x, Real y) void Stencil::add_stencil (Stencil const &s) { - expr_ = scm_list_3 (ly_symbol2scm ("combine-stencil"), s.expr_, expr_); + SCM cs = ly_symbol2scm ("combine-stencil"); + if (scm_is_pair (expr_) + && scm_is_eq (cs, scm_car (expr_))) + { + if (scm_is_pair (s.expr_) + && scm_is_eq (cs, scm_car (s.expr_))) + expr_ = scm_append (scm_list_2 (s.expr_, scm_cdr (expr_))); + else + expr_ = scm_cons2 (cs, s.expr_, scm_cdr (expr_)); + } + else + { + if (scm_is_pair (s.expr_) + && scm_is_eq (cs, scm_car (s.expr_))) + expr_ = scm_append (scm_list_2 (s.expr_, scm_list_1 (expr_))); + else + expr_ = scm_list_3 (cs, s.expr_, expr_); + } dim_.unite (s.dim_); } diff --git a/lily/system.cc b/lily/system.cc index b2e0d53a88..1ec46fbaf6 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -548,8 +548,7 @@ System::post_processing () anyway. */ vector all_elts_sorted (all_elements_->array ()); - vector_sort (all_elts_sorted, std::less ()); - uniq (all_elts_sorted); + uniquify (all_elts_sorted); this->get_stencil (); for (vsize i = all_elts_sorted.size (); i--;) { diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index d6036bc4ef..12ba88284f 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -90,7 +90,6 @@ localKeySignature = #'() createSpacing = ##t ignoreFiguredBassRest = ##f - \markLengthOff %% explicitly set instrument, so we don't get %% weird effects when doing instrument names for @@ -173,7 +172,6 @@ contained staves are not connected vertically." \override BarLine.bar-extent = #'(-2 . 2) \override VoltaBracket.staff-padding = #3 \override StaffSymbol.line-count = #1 - \markLengthOff \override Stem.neutral-direction = #UP \override Beam.neutral-direction = #UP @@ -613,8 +611,8 @@ automatically when an output definition (a @code{\\score} or endRepeatType = #":|." barNumberVisibility = #first-bar-number-invisible-and-no-parenthesized-bar-numbers barNumberFormatter = #robust-bar-number-function - clefOctavationFormatter = #clef-octavation-markup - cueClefOctavationFormatter = #clef-octavation-markup + clefTranspositionFormatter = #clef-transposition-markup + cueClefTranspositionFormatter = #clef-transposition-markup automaticBars = ##t explicitClefVisibility = #all-visible @@ -706,7 +704,6 @@ automatically when an output definition (a @code{\\score} or %% figuredBassFormatter = #format-bass-figure metronomeMarkFormatter = #format-metronome-markup - \markLengthOn %% See also make-voice-props-set @@ -970,7 +967,7 @@ of Editio Vaticana." middleCPosition = #1 middleCClefPosition = #1 clefPosition = #1 - clefOctavation = #0 + clefTransposition = #0 %% Select vaticana style font. \override KeySignature.glyph-name-alist = #alteration-vaticana-glyph-name-alist @@ -1063,7 +1060,7 @@ accommodated for typesetting a piece in mensural style." middleCClefPosition = #-6 middleCPosition = #-6 clefPosition = #-2 - clefOctavation = #0 + clefTransposition = #0 %% Select mensural style font. \override TimeSignature.style = #'mensural @@ -1122,7 +1119,7 @@ accommodated for typesetting a piece in Petrucci style." middleCClefPosition = #-6 middleCPosition = #-6 clefPosition = #-2 - clefOctavation = #0 + clefTransposition = #0 \override Custos.style = #'mensural \override Custos.neutral-position = #3 @@ -1181,7 +1178,7 @@ accommodated for typesetting a piece in Kievan style." middleCClefPosition = #0 middleCPosition = #0 clefPosition = #0 - clefOctavation = #0 + clefTransposition = #0 %% Accidentals are valid only once (if the following note is different) extraNatural = ##f diff --git a/ly/property-init.ly b/ly/property-init.ly index fc7c67179a..8ea9cdbead 100644 --- a/ly/property-init.ly +++ b/ly/property-init.ly @@ -263,16 +263,15 @@ hideNotes = { \override Dots.transparent = ##t \override NoteHead.transparent = ##t \override NoteHead.no-ledgers = ##t + % assume that any Beam inherits transparency from its parent Stem \override Stem.transparent = ##t \override Flag.transparent = ##t - \override Beam.transparent = ##t \override Accidental.transparent = ##t \override Rest.transparent = ##t \override TabNoteHead.transparent = ##t } unHideNotes = { \revert Accidental.transparent - \revert Beam.transparent \revert Stem.transparent \revert Flag.transparent \revert NoteHead.transparent @@ -553,25 +552,29 @@ showSplitTiedTabNotes = { %% text length textLengthOn = { - \override TextScript.extra-spacing-width = #'(0 . 0) + % 0.4 staff-space between adjacent texts + \override TextScript.extra-spacing-width = #'(-0.0 . 0.4) \override TextScript.extra-spacing-height = #'(-inf.0 . +inf.0) - \override TextScript.outside-staff-horizontal-padding = #0 } textLengthOff = { \override TextScript.extra-spacing-width = #'(+inf.0 . -inf.0) \override TextScript.extra-spacing-height = #'(0 . 0) - \revert TextScript.outside-staff-horizontal-padding } markLengthOn = { - \override Score.MetronomeMark.extra-spacing-width = #'(-0.5 . 0.5) + \override Score.MetronomeMark.extra-spacing-width = #'(0 . 1.0) \override Score.RehearsalMark.extra-spacing-width = #'(-0.5 . 0.5) + % Raise as much as four staff-spaces before pushing notecolumns right + \override Score.MetronomeMark.extra-spacing-height = #'(4 . 4) + \override Score.RehearsalMark.extra-spacing-height = #'(4 . 4) } markLengthOff = { \override Score.MetronomeMark.extra-spacing-width = #'(+inf.0 . -inf.0) \override Score.RehearsalMark.extra-spacing-width = #'(+inf.0 . -inf.0) + \revert Score.MetronomeMark.extra-spacing-height + \revert Score.RehearsalMark.extra-spacing-height } %% text spanners diff --git a/po/lilypond.pot b/po/lilypond.pot index f6c850f261..b5e6e5b259 100644 --- a/po/lilypond.pot +++ b/po/lilypond.pot @@ -6,10 +6,10 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: lilypond 2.17.16\n" +"Project-Id-Version: lilypond 2.17.18\n" "Report-Msgid-Bugs-To: http://post.gmane.org/post.php?group=gmane.comp.gnu." "lilypond.bugs\n" -"POT-Creation-Date: 2013-04-13 14:20+0100\n" +"POT-Creation-Date: 2013-05-11 16:02+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -27,26 +27,30 @@ msgstr "" msgid "Output function not implemented" msgstr "" -#: book_latex.py:170 +#: book_latex.py:174 msgid "cannot find \\begin{document} in LaTeX document" msgstr "" -#: book_latex.py:188 +#: book_latex.py:190 #, python-format msgid "Running `%s' on file `%s' to detect default page settings.\n" msgstr "" -#: book_latex.py:209 book_texinfo.py:228 +#: book_latex.py:212 book_texinfo.py:228 msgid "Unable to auto-detect default settings:\n" msgstr "" -#: book_latex.py:221 book_texinfo.py:240 +#: book_latex.py:224 book_texinfo.py:240 #, python-format msgid "" "Unable to auto-detect default settings:\n" "%s" msgstr "" +#: book_latex.py:247 +msgid "cannot detect textwidth from LaTeX" +msgstr "" + #: book_snippets.py:406 #, python-format msgid "deprecated ly-option used: %s=%s" @@ -1215,47 +1219,47 @@ msgstr "" msgid "Writing `%s'..." msgstr "" -#: lilypond-book.py:570 +#: lilypond-book.py:572 msgid "Output would overwrite input file; use --output." msgstr "" -#: lilypond-book.py:574 +#: lilypond-book.py:576 #, python-format msgid "Reading %s..." msgstr "" -#: lilypond-book.py:581 +#: lilypond-book.py:583 msgid "Dissecting..." msgstr "" -#: lilypond-book.py:592 +#: lilypond-book.py:594 #, python-format msgid "Compiling %s..." msgstr "" -#: lilypond-book.py:600 +#: lilypond-book.py:602 #, python-format msgid "Processing include: %s" msgstr "" -#: lilypond-book.py:611 +#: lilypond-book.py:613 #, python-format msgid "Removing `%s'" msgstr "" -#: lilypond-book.py:704 +#: lilypond-book.py:706 #, python-format msgid "Setting LilyPond's loglevel to %s" msgstr "" -#: lilypond-book.py:708 +#: lilypond-book.py:710 #, python-format msgid "" "Setting LilyPond's loglevel to %s (from environment variable " "LILYPOND_LOGLEVEL)" msgstr "" -#: lilypond-book.py:711 +#: lilypond-book.py:713 msgid "" "Setting LilyPond's output to --verbose, implied by lilypond-book's setting" msgstr "" @@ -2436,12 +2440,12 @@ msgstr "" msgid "Calculating page breaks..." msgstr "" -#: multi-measure-rest.cc:152 +#: multi-measure-rest.cc:154 msgid "" "usable-duration-logs must be a non-empty list. Falling back to whole rests." msgstr "" -#: multi-measure-rest.cc:342 +#: multi-measure-rest.cc:364 msgid "Using naive multi measure rest spacing." msgstr "" @@ -2466,7 +2470,7 @@ msgid "" "defaulting to hairpin." msgstr "" -#: new-dynamic-engraver.cc:233 slur-proto-engraver.cc:135 +#: new-dynamic-engraver.cc:233 slur-proto-engraver.cc:119 #, c-format msgid "unterminated %s" msgstr "" @@ -2693,7 +2697,7 @@ msgstr "" msgid "program option -dpreview not supported by backend `%s'" msgstr "" -#: paper-column-engraver.cc:261 +#: paper-column-engraver.cc:263 msgid "" "forced break was overridden by some other event, should you be using bar " "checks?" @@ -2855,7 +2859,7 @@ msgstr "" msgid "too many colliding rests" msgstr "" -#: rest.cc:192 +#: rest.cc:240 #, c-format msgid "rest `%s' not found" msgstr "" @@ -2908,28 +2912,24 @@ msgstr "" msgid "direction of %s invalid: %d" msgstr "" -#: slur-proto-engraver.cc:67 -msgid "cannot set break slur with two directions" -msgstr "" - #. We already have an old slur, so give a warning #. and completely ignore the new slur. -#: slur-proto-engraver.cc:186 +#: slur-proto-engraver.cc:166 #, c-format msgid "already have %s" msgstr "" -#: slur-proto-engraver.cc:203 +#: slur-proto-engraver.cc:183 #, c-format msgid "%s without a cause" msgstr "" -#: slur-proto-engraver.cc:299 +#: slur-proto-engraver.cc:244 #, c-format msgid "cannot end %s" msgstr "" -#: slur.cc:441 +#: slur.cc:434 #, c-format msgid "Ignoring grob for slur: %s. avoid-slur not set?" msgstr "" @@ -3362,7 +3362,7 @@ msgstr "" msgid "symbol ~S redefined" msgstr "" -#: define-event-classes.scm:70 +#: define-event-classes.scm:69 #, scheme-format msgid "unknown parent class `~a'" msgstr "" @@ -3396,22 +3396,22 @@ msgstr "" msgid "not a valid duration string: ~a - ignoring" msgstr "" -#: define-music-types.scm:788 +#: define-music-types.scm:778 #, scheme-format msgid "symbol expected: ~S" msgstr "" -#: define-music-types.scm:791 +#: define-music-types.scm:781 #, scheme-format msgid "cannot find music object: ~S" msgstr "" -#: define-music-types.scm:810 +#: define-music-types.scm:800 #, scheme-format msgid "unknown repeat type `~S'" msgstr "" -#: define-music-types.scm:811 +#: define-music-types.scm:801 msgid "See define-music-types.scm for supported repeats" msgstr "" @@ -3684,63 +3684,58 @@ msgstr "" msgid "bad grob property path ~a" msgstr "" -#: music-functions.scm:765 +#: music-functions.scm:766 msgid "Bad chord repetition" msgstr "" -#: music-functions.scm:800 +#: music-functions.scm:801 #, scheme-format msgid "music expected: ~S" msgstr "" -#: music-functions.scm:1138 +#: music-functions.scm:1139 #, scheme-format msgid "cannot find quoted music: `~S'" msgstr "" -#: music-functions.scm:1276 +#: music-functions.scm:1277 msgid "Add @var{octave-shift} to the octave of @var{pitch}." msgstr "" -#: music-functions.scm:1336 +#: music-functions.scm:1337 #, scheme-format msgid "Unknown octaveness type: ~S " msgstr "" -#: music-functions.scm:1337 +#: music-functions.scm:1338 msgid "Defaulting to 'any-octave." msgstr "" -#: music-functions.scm:1682 +#: music-functions.scm:1683 #, scheme-format msgid "unknown accidental style: ~S" msgstr "" -#: output-ps.scm:278 output-svg.scm:524 +#: output-ps.scm:278 output-svg.scm:514 #, scheme-format msgid "unknown line-cap-style: ~S" msgstr "" -#: output-ps.scm:283 output-svg.scm:530 +#: output-ps.scm:283 output-svg.scm:520 #, scheme-format msgid "unknown line-join-style: ~S" msgstr "" -#: output-svg.scm:47 -#, scheme-format -msgid "undefined: ~S" -msgstr "" - -#: output-svg.scm:157 +#: output-svg.scm:148 #, scheme-format msgid "cannot decypher Pango description: ~a" msgstr "" -#: output-svg.scm:237 +#: output-svg.scm:228 msgid "Glyph must have a unicode value" msgstr "" -#: output-svg.scm:289 output-svg.scm:299 +#: output-svg.scm:280 output-svg.scm:290 #, scheme-format msgid "cannot find SVG font ~S" msgstr "" diff --git a/python/convertrules.py b/python/convertrules.py index b0a46ebac8..11cd1729fd 100644 --- a/python/convertrules.py +++ b/python/convertrules.py @@ -3175,7 +3175,7 @@ def conv (str): def conv (str): str = re.sub (r"Stem\s+#'flag-style", r"Flag #'style", str) str = re.sub (r"Stem\s+#'stroke-style", r"Flag #'stroke-style", str) - str = re.sub (r"Stem\s+#'flag", r"Flag #'print", str) + str = re.sub (r"Stem\s+#'flag", r"Flag #'stencil", str) str = re.sub (r"(\s+(?:\\once\s*)?)\\override\s+Stem\s+#'transparent\s*=\s*##t", r"\g<1>\\override Stem #'transparent = ##t\g<1>\\override Flag #'transparent = ##t", str) str = re.sub (r"(\s+(?:\\once\s*)?)\\revert\s*Stem\s+#'transparent", r"\g<1>\\revert Stem #'transparent\g<1>\\revert Flag #'transparent", str) str = re.sub (r"(\s+(?:\\once\s*)?)\\override\s+Stem\s+#'stencil\s*=\s*##f", r"\g<1>\\override Stem #'stencil = ##f\g<1>\\override Flag #'stencil = ##f", str) @@ -3547,6 +3547,19 @@ def conv(str): r"\1 " + do + r"\2", str) return str +@rule ((2, 17, 18), + "Rename OctavateEight to ClefModifier, rename related properties.") +def conv(str): + str = re.sub ('OctavateEight', 'ClefModifier', str) + str = re.sub ('octavate-eight-interface', 'clef-modifier-interface', str) + str = re.sub ('clefOctavation', 'clefTransposition', str) + str = re.sub ('clefOctavationFormatter', 'clefTranspositionFormatter', str) + str = re.sub ('clefOctavationStyle', 'clefTranspositionStyle', str) + str = re.sub ('cueClefOctavation', 'cueClefTransposition', str) + str = re.sub ('cueClefOctavationFormatter', 'cueClefTranspositionFormatter', str) + str = re.sub ('cueClefOctavationStyle', 'cueClefTranspositionStyle', str) + return str + # Guidelines to write rules (please keep this at the end of this file) # # - keep at most one rule per version; if several conversions should be done, diff --git a/scm/define-context-properties.scm b/scm/define-context-properties.scm index 98f52aaa09..eed64e6342 100644 --- a/scm/define-context-properties.scm +++ b/scm/define-context-properties.scm @@ -132,7 +132,38 @@ number, measure position, and alternative number and returns a markup of the bar number to print.") (barNumberVisibility ,procedure? "A procedure that takes a bar number and a measure position and returns whether the corresponding -bar number should be printed.") +bar number should be printed. Note that the actual print-out of +bar numbers is controlled with the @code{break-visibility} property. + +The following procedures are predefined: + +@table @code +@item all-bar-numbers-visible +Enable bar numbers for all bars, including the first one and broken +bars (which get bar numbers in parentheses). + +@item first-bar-number-invisible +Enable bar numbers for all bars (including broken bars) except the +first one. If the first bar is broken, it doesn't get a bar number +either. + +@item first-bar-number-invisible-save-broken-bars +Enable bar numbers for all bars (including broken bars) except the +first one. A broken first bar gets a bar number. + +@item first-bar-number-invisible-and-no-parenthesized-bar-numbers +Enable bar numbers for all bars except the first bar and broken bars. +This is the default. + +@item (every-nth-bar-number-visible @var{n}) +Assuming @var{n} is value@tie{}2, for example, this enables bar numbers +for bars 2, 4, 6, etc. + +@item (modulo-bar-number-visible @var{n} @var{m}) +If bar numbers 1, 4, 7, etc., should be enabled, @var{n}@tie{}(the modulo) +must be set to@tie{}3 and @var{m}@tie{}(the division remainder) to@tie{}1. +@end table") + (baseMoment ,ly:moment? "Smallest unit of time that will stand on its own as a subdivided section.") (bassFigureFormatFunction ,procedure? "A procedure that is @@ -172,11 +203,12 @@ symbol and the prefix of a chord name.") (chordRootNamer ,procedure? "A function that converts from a pitch object to a text markup. Used for chords.") (clefGlyph ,string? "Name of the symbol within the music font.") - (clefOctavation ,integer? "Add this much extra octavation. + (clefTransposition ,integer? "Add this much extra transposition. Values of 7 and -7 are common.") - (clefOctavationFormatter ,procedure? "A procedure that takes the -Octavation number as a string and the style as a symbol and returns a markup.") - (clefOctavationStyle ,symbol? "Determines the way the octavateEight + (clefTranspositionFormatter ,procedure? "A procedure that takes the +Transposition number as a string and the style as a symbol and returns a +markup.") + (clefTranspositionStyle ,symbol? "Determines the way the ClefModifier grob is displayed. Possible values are @samp{default}, @samp{parenthesized} and @samp{bracketed}.") (clefPosition ,number? "Where should the center of the clef @@ -198,11 +230,12 @@ a hairpin crescendo is used.") (crescendoText ,markup? "The text to print at start of non-hairpin crescendo, i.e., @samp{cresc.}.") (cueClefGlyph ,string? "Name of the symbol within the music font.") - (cueClefOctavation ,integer? "Add this much extra octavation. + (cueClefTransposition ,integer? "Add this much extra transposition. Values of 7 and -7 are common.") - (cueClefOctavationFormatter ,procedure? "A procedure that takes the -Octavation number as a string and the style as a symbol and returns a markup.") - (cueClefOctavationStyle ,symbol? "Determines the way the octavateEight + (cueClefTranspositionFormatter ,procedure? "A procedure that +takes the Transposition number as a string and the style as a symbol +and returns a markup.") + (cueClefTranspositionStyle ,symbol? "Determines the way the ClefModifier grob is displayed. Possible values are @samp{default}, @samp{parenthesized} and @samp{bracketed}.") (cueClefPosition ,number? "Where should the center of the clef diff --git a/scm/define-grob-interfaces.scm b/scm/define-grob-interfaces.scm index 6068579995..d34f026497 100644 --- a/scm/define-grob-interfaces.scm +++ b/scm/define-grob-interfaces.scm @@ -64,6 +64,13 @@ found in @file{scm/bar-line.scm}. "A doit or drop." '(thickness delta-position)) +(ly:add-interface + 'clef-modifier-interface + "The number describing transposition of the clef, placed below +or above clef sign. Usually this is 8 (octave transposition) +or 15 (two octaves), but LilyPond allows any integer here." + '()) + (ly:add-interface 'dynamic-interface "Any kind of loudness sign." @@ -189,14 +196,6 @@ accidentals)." "Note names." '()) -(ly:add-interface - 'octavate-eight-interface - "Interface that permits the nominal identification of the octavian -annotation that multiplies by two the freqency of the pitches present -in a given staff were they played on a clef that lacked said octavian -annotation." - '()) - (ly:add-interface 'only-prebreak-interface "Kill this grob after the line breaking process." diff --git a/scm/define-grob-properties.scm b/scm/define-grob-properties.scm index b4861729b7..6434c15c46 100644 --- a/scm/define-grob-properties.scm +++ b/scm/define-grob-properties.scm @@ -734,6 +734,8 @@ positions are requested, the closest one is taken.") (prefer-dotted-right ,boolean? "For note collisions, prefer to shift dotted up-note to the right, rather than shifting just the dot.") + (protrusion ,number? "In an arpeggio bracket, the length of the +horizontal edges.") ;; ;; r diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 1b834a2e2d..6f169978a4 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -169,6 +169,7 @@ (direction . ,LEFT) (padding . 0.5) (positions . ,ly:arpeggio::calc-positions) + (protrusion . 0.4) (script-priority . 0) (side-axis . ,X) (staff-position . 0.0) @@ -373,11 +374,11 @@ (clip-edges . #t) (collision-interfaces . (beam-interface clef-interface + clef-modifier-interface flag-interface inline-accidental-interface key-signature-interface note-head-interface - octavate-eight-interface stem-interface time-signature-interface)) (cross-staff . ,ly:beam::calc-cross-staff) @@ -408,6 +409,8 @@ (positions . ,beam::place-broken-parts-individually) (springs-and-rods . ,ly:beam::calc-springs-and-rods) (X-positions . ,ly:beam::calc-x-positions) + (transparent . ,(grob::inherit-parent-property + X 'transparent)) ;; this is a hack to set stem lengths, if positions is set. (quantized-positions . ,ly:beam::set-stem-lengths) @@ -566,6 +569,31 @@ pure-from-neighbor-interface staff-symbol-referencer-interface)))))) + (ClefModifier + . ( + (break-visibility . ,(grob::inherit-parent-property + X 'break-visibility)) + (font-shape . italic) + (font-size . -4) + (self-alignment-X . ,CENTER) + (staff-padding . 0.2) + (stencil . ,ly:text-interface::print) + (X-offset . ,(ly:make-simple-closure + `(,+ + ,(ly:make-simple-closure + (list ly:self-alignment-interface::x-aligned-on-self)) + ,(ly:make-simple-closure + (list ly:self-alignment-interface::centered-on-x-parent))))) + (Y-offset . ,side-position-interface::y-aligned-side) + (vertical-skylines . ,grob::always-vertical-skylines-from-stencil) + (Y-extent . ,grob::always-Y-extent-from-stencil) + (meta . ((class . Item) + (interfaces . (clef-modifier-interface + font-interface + self-alignment-interface + side-position-interface + text-interface)))))) + (ClusterSpanner . ( (cross-staff . ,ly:cluster::calc-cross-staff) @@ -778,6 +806,7 @@ (direction . ,DOWN) (minimum-space . 1.2) (outside-staff-priority . 250) + (outside-staff-padding . 0.6) (padding . 0.6) (side-axis . ,Y) (slur-padding . 0.3) @@ -859,6 +888,7 @@ (minimum-Y-extent . (-1 . 1)) (right-bound-info . ,ly:line-spanner::calc-right-bound-info) + (skyline-horizontal-padding . 0.2) (springs-and-rods . ,ly:spanner::set-spacing-rods) (stencil . ,ly:line-spanner::print) (style . dashed-line) @@ -1221,6 +1251,7 @@ (LaissezVibrerTie . ( (control-points . ,ly:semi-tie::calc-control-points) + (cross-staff . ,semi-tie::calc-cross-staff) (details . ((ratio . 0.333) (height-limit . 1.0))) (direction . ,ly:tie::calc-direction) @@ -1418,16 +1449,14 @@ (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff) (break-visibility . ,end-of-line-invisible) (direction . ,UP) - (outside-staff-horizontal-padding . 0.12) + (extra-spacing-width . (+inf.0 . -inf.0)) + (outside-staff-horizontal-padding . 0.2) (outside-staff-priority . 1000) - (outside-staff-padding . 0.5) + (padding . 0.8) (side-axis . ,Y) - (skyline-horizontal-padding . 0.2) (stencil . ,ly:text-interface::print) (vertical-skylines . ,grob::always-vertical-skylines-from-stencil) - (Y-offset . ,(ly:make-unpure-pure-container - side-position-interface::y-aligned-side - outside-staff::pure-Y-offset)) + (Y-offset . ,side-position-interface::y-aligned-side) (X-offset . ,(ly:make-simple-closure `(,+ ,(ly:make-simple-closure @@ -1500,6 +1529,7 @@ (outside-staff-priority . 450) (padding . 0.2) (self-alignment-X . ,CENTER) + (skyline-horizontal-padding . 0.2) (staff-padding . 0.25) (stencil . ,ly:text-interface::print) (X-offset . ,(ly:make-simple-closure @@ -1621,32 +1651,6 @@ (interfaces . (note-spacing-interface spacing-interface)))))) - - (OctavateEight - . ( - (break-visibility . ,(grob::inherit-parent-property - X 'break-visibility)) - (font-shape . italic) - (font-size . -4) - (self-alignment-X . ,CENTER) - (staff-padding . 0.2) - (stencil . ,ly:text-interface::print) - (X-offset . ,(ly:make-simple-closure - `(,+ - ,(ly:make-simple-closure - (list ly:self-alignment-interface::x-aligned-on-self)) - ,(ly:make-simple-closure - (list ly:self-alignment-interface::centered-on-x-parent))))) - (Y-offset . ,side-position-interface::y-aligned-side) - (vertical-skylines . ,grob::always-vertical-skylines-from-stencil) - (Y-extent . ,grob::always-Y-extent-from-stencil) - (meta . ((class . Item) - (interfaces . (font-interface - octavate-eight-interface - self-alignment-interface - side-position-interface - text-interface)))))) - (OttavaBracket . ( (dash-fraction . 0.3) @@ -1787,11 +1791,12 @@ (break-align-symbols . (staff-bar key-signature clef)) (break-visibility . ,end-of-line-invisible) (direction . ,UP) + (extra-spacing-width . (+inf.0 . -inf.0)) (font-size . 2) (non-musical . #t) (outside-staff-horizontal-padding . 0.12) (outside-staff-priority . 1500) - (outside-staff-padding . 0.5) + (padding . 0.8) (self-alignment-X . ,CENTER) (stencil . ,ly:text-interface::print) (vertical-skylines . ,grob::always-vertical-skylines-from-stencil) @@ -1801,9 +1806,7 @@ (list ly:break-alignable-interface::self-align-callback)) ,(ly:make-simple-closure (list ly:self-alignment-interface::x-aligned-on-self))))) - (Y-offset . ,(ly:make-unpure-pure-container - side-position-interface::y-aligned-side - outside-staff::pure-Y-offset)) + (Y-offset . ,side-position-interface::y-aligned-side) (Y-extent . ,grob::always-Y-extent-from-stencil) (meta . ((class . Item) (interfaces . (break-alignable-interface @@ -1827,6 +1830,7 @@ (RepeatTie . ( + (cross-staff . ,semi-tie::calc-cross-staff) (control-points . ,ly:semi-tie::calc-control-points) (details . ((ratio . 0.333) (height-limit . 1.0))) diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index ff977b2bfb..96236f1769 100755 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -4080,7 +4080,7 @@ when @var{label} is not found." (gap (- (interval-length x-ext) (interval-length (ly:stencil-extent page-stencil X))))) (interpret-markup layout props - (markup #:concat (#:hspace gap page-markup))))))) + (markup #:hspace gap page-markup)))))) x-ext y-ext))) diff --git a/scm/define-music-display-methods.scm b/scm/define-music-display-methods.scm index dc10fa265f..82e227c8f5 100644 --- a/scm/define-music-display-methods.scm +++ b/scm/define-music-display-methods.scm @@ -666,21 +666,18 @@ Otherwise, return #f." (formatted-span (and span (duration->lily-string span #:force-duration #t))) (scale (/ num den)) - (dur (*previous-duration*)) (time-scale (*time-scale*))) - - (parameterize ((*force-line-break* #f) - (*previous-duration* - (ly:make-duration (ly:duration-log dur) - (ly:duration-dot-count dur) - (* (ly:duration-scale dur) - scale))) - (*time-scale* (* time-scale scale))) - (format #f "\\tuplet ~a/~a ~@[~a ~]~a" - den - num - formatted-span - (music->lily-string (ly:music-property times 'element) parser))))) + (*previous-duration* #f) + (let ((result + (parameterize ((*force-line-break* #f) + (*time-scale* (* time-scale scale))) + (format #f "\\tuplet ~a/~a ~@[~a ~]~a" + den + num + formatted-span + (music->lily-string (ly:music-property times 'element) parser))))) + (*previous-duration* #f) + result))) (define-display-method RelativeOctaveMusic (m parser) (music->lily-string (ly:music-property m 'element) parser)) @@ -956,8 +953,8 @@ Otherwise, return @code{#f}." value ?clef-position symbol 'clefPosition) (music 'PropertySet - value ?clef-octavation - symbol 'clefOctavation) + value ?clef-transposition + symbol 'clefTransposition) (music 'ApplyContext procedure ly:set-middle-C!))))) (let ((clef-name (assoc-get (list ?clef-glyph ?clef-position 0) @@ -965,12 +962,12 @@ Otherwise, return @code{#f}." (if clef-name (format #f "\\clef \"~a~{~a~a~}\"~a" clef-name - (cond ((= 0 ?clef-octavation) + (cond ((= 0 ?clef-transposition) (list "" "")) - ((> ?clef-octavation 0) - (list "^" (1+ ?clef-octavation))) + ((> ?clef-transposition 0) + (list "^" (1+ ?clef-transposition))) (else - (list "_" (- 1 ?clef-octavation)))) + (list "_" (- 1 ?clef-transposition)))) (new-line->lily-string)) #f)))) diff --git a/scm/lily-library.scm b/scm/lily-library.scm index d87bca208a..939e5caa88 100644 --- a/scm/lily-library.scm +++ b/scm/lily-library.scm @@ -932,13 +932,10 @@ in module @var{module}. In that case evaluate, otherwise print a warning and set an optional @var{default}." (let* ((unavailable? (lambda (sym) (not (module-defined? module sym)))) - (sym-unavailable (if (pair? symbol) - (filter - unavailable? - (filter symbol? (flatten-list symbol))) - (if (unavailable? symbol) - #t - '())))) + (sym-unavailable + (filter + unavailable? + (filter symbol? (flatten-list symbol))))) (if (null? sym-unavailable) (eval symbol module) (let* ((def (and (pair? default) (car default)))) diff --git a/scm/music-functions.scm b/scm/music-functions.scm index bb5bb9ab88..b08ecb7fab 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -491,6 +491,7 @@ in @var{grob}." Fingering LaissezVibrerTie LigatureBracket + MultiMeasureRest PhrasingSlur RepeatTie Rest @@ -526,8 +527,8 @@ in @var{grob}." (Voice Fingering font-size -8) (Voice StringNumber font-size -8))) - (make-grob-property-set 'NoteColumn 'horizontal-shift (quotient n 2)) - (make-grob-property-set 'MultiMeasureRest 'staff-position (if (odd? n) -4 4)))))) + (make-grob-property-set 'NoteColumn 'horizontal-shift (quotient n 2)))))) + (define-safe-public (make-voice-props-override n) (make-sequential-music @@ -1944,7 +1945,7 @@ base onto the following musical context." (blot (ly:output-def-lookup layout 'blot-diameter))) ; Hide spanned stems (map (lambda (st) - (set! (ly:grob-property st 'transparent) #t)) + (set! (ly:grob-property st 'stencil) #f)) stems) ; Draw a nice looking stem with rounded corners (ly:round-filled-box (ly:grob-extent root root X) yextent blot)) diff --git a/scm/output-lib.scm b/scm/output-lib.scm index caa7032c70..6e2d06a66a 100644 --- a/scm/output-lib.scm +++ b/scm/output-lib.scm @@ -854,14 +854,6 @@ and duration-log @var{log}." the previous calculated offset value." prev-offset) -(define-public (outside-staff::pure-Y-offset grob start end) - "Initial vertical placement of items such as tempo and - rehearsal marks, for use in note-spacing." - (* (+ (ly:staff-symbol-staff-radius grob) - (ly:grob-property grob 'outside-staff-padding 0.0) - 1.0) - (ly:grob-property grob 'direction CENTER))) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; @@ -1288,6 +1280,12 @@ parent or the parent has no setting." (define-public (laissez-vibrer::print grob) (ly:tie::print grob)) +(define-public (semi-tie::calc-cross-staff grob) + (let* ((note-head (ly:grob-object grob 'note-head)) + (stem (ly:grob-object note-head 'stem))) + (and (ly:grob? stem) + (ly:grob-property stem 'cross-staff #f)))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; volta-bracket diff --git a/scm/output-svg.scm b/scm/output-svg.scm index a15a9d8ad0..354bff4e05 100644 --- a/scm/output-svg.scm +++ b/scm/output-svg.scm @@ -17,7 +17,6 @@ ;;;; along with LilyPond. If not, see . (define-module (scm output-svg)) -(define this-module (current-module)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; globals @@ -39,14 +38,6 @@ (define lily-unit-length 1.7573) -(define (dispatch expr) - (let ((keyword (car expr))) - (cond ((eq? keyword 'some-func) "") - (else (if (module-defined? this-module keyword) - (apply (eval keyword this-module) (cdr expr)) - (begin (ly:warning (_ "undefined: ~S") keyword) - "")))))) - ;; Helper functions (define-public (attributes attributes-alist) (apply string-append @@ -330,8 +321,7 @@ ;;; (define (char font i) - (dispatch - `(fontify ,font ,(entity 'tspan (char->entity (integer->char i)))))) + (fontify font (entity 'tspan (char->entity (integer->char i))))) (define (circle radius thick is-filled) (entity @@ -486,7 +476,7 @@ "") (define (named-glyph font name) - (dispatch `(fontify ,font ,name))) + (fontify font name)) (define (no-origin) "") @@ -613,7 +603,7 @@ x y)) (define (text font string) - (dispatch `(fontify ,font ,(entity 'tspan (string->entities string))))) + (fontify font (entity 'tspan (string->entities string)))) (define (url-link url x y) (string-append @@ -632,5 +622,5 @@ (let ((escaped-string (string-regexp-substitute "<" "<" (string-regexp-substitute "&" "&" string)))) - (dispatch `(fontify ,pango-font-description - ,(entity 'tspan escaped-string))))) + (fontify pango-font-description + (entity 'tspan escaped-string)))) diff --git a/scm/parser-clef.scm b/scm/parser-clef.scm index 56284f9c4d..5dd09a059d 100644 --- a/scm/parser-clef.scm +++ b/scm/parser-clef.scm @@ -16,10 +16,10 @@ ;;;; along with LilyPond. If not, see . -;; (name . (glyph clef-position octavation)) +;; (name . (glyph clef-position transposition)) ;; -;; -- the name clefOctavation is misleading. The value 7 is 1 octave, -;; not 7 Octaves. +;; -- the name clefTransposition is a bit misleading. Value 7 means +;; a transposition of an octave, not a seventh. (define-public supported-clefs '(("treble" . ("clefs.G" -2 0)) ("violin" . ("clefs.G" -2 0)) @@ -144,14 +144,14 @@ (cadr e) (assoc-get (car e) c0-pitch-alist)))) ((symbol . clefPosition) (value . ,(cadr e))) - ((symbol . clefOctavation) (value . ,(- oct))))) - ;; the clefOctavationStyle property is set only when + ((symbol . clefTransposition) (value . ,(- oct))))) + ;; the clefTranspositionStyle property is set only when ;; not 'default to calm display-lily-tests.scm (prop-list (if (eq? style 'default) prop-list (append prop-list - `(((symbol . clefOctavationStyle) + `(((symbol . clefTranspositionStyle) (value . ,style)))))) (musics (map make-prop-set prop-list)) (recalc-mid-C (make-music 'ApplyContext)) @@ -174,8 +174,8 @@ '((clefGlyph . cueClefGlyph) (middleCClefPosition . middleCCuePosition) (clefPosition . cueClefPosition) - (clefOctavation . cueClefOctavation) - (clefOctavationStyle . cueClefOctavationStyle))) + (clefTransposition . cueClefTransposition) + (clefTranspositionStyle . cueClefTranspositionStyle))) (let ((clef (make-clef-set clef-name))) (for-each (lambda (m) @@ -196,10 +196,10 @@ (make-cue-clef-set "treble_(8)"))) ;; a function to add new clefs at runtime -(define-public (add-new-clef clef-name clef-glyph clef-position octavation c0-position) +(define-public (add-new-clef clef-name clef-glyph clef-position transposition c0-position) "Append the entries for a clef symbol to supported clefs and @code{c0-pitch-alist}." (set! supported-clefs - (acons clef-name (list clef-glyph clef-position octavation) supported-clefs)) + (acons clef-name (list clef-glyph clef-position transposition) supported-clefs)) (set! c0-pitch-alist (acons clef-glyph c0-position c0-pitch-alist))) diff --git a/scm/script.scm b/scm/script.scm index 125a2fee5d..b5e14bae56 100644 --- a/scm/script.scm +++ b/scm/script.scm @@ -62,6 +62,7 @@ . ( (script-stencil . (feta . ("downbow" . "downbow"))) (padding . 0.20) + (skyline-horizontal-padding . 0.20) (avoid-slur . around) (direction . ,UP) (script-priority . 150))) @@ -268,6 +269,7 @@ (quantize-position . #t) (script-stencil . (feta . ("dstaccatissimo" . "ustaccatissimo"))) (padding . 0.20) + (skyline-horizontal-padding . 0.10) (side-relative-direction . ,DOWN))) ("staccato" . ( @@ -277,6 +279,7 @@ (avoid-slur . inside) (toward-stem-shift . 0.5) (padding . 0.20) + (skyline-horizontal-padding . 0.10) (script-priority . -100))) ("stopped" . ( diff --git a/scm/translation-functions.scm b/scm/translation-functions.scm index 5877674d10..49d8768eb4 100644 --- a/scm/translation-functions.scm +++ b/scm/translation-functions.scm @@ -20,10 +20,10 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; clefs -(define-public (clef-octavation-markup oct style) - "The octavation sign formatting function. @var{oct} is supposed to be -a string holding the octavation number, @var{style} determines the -way the octavation number is displayed." +(define-public (clef-transposition-markup oct style) + "The transposition sign formatting function. @var{oct} is supposed to be +a string holding the transposition number, @var{style} determines the +way the transposition number is displayed." (let* ((delim (if (symbol? style) (case style ((parenthesized) (cons "(" ")")) diff --git a/scripts/auxiliar/NoTagline.ly b/scripts/auxiliar/NoTagline.ly index 4b1d0e8856..d806a89bdf 100644 --- a/scripts/auxiliar/NoTagline.ly +++ b/scripts/auxiliar/NoTagline.ly @@ -1,6 +1,6 @@ \version "2.16.0" \paper { - #(set-paper-size "A4") + #(set-paper-size "a4") } \header { tagline = ##f } diff --git a/scripts/auxiliar/make-regtest-pngs.sh b/scripts/auxiliar/make-regtest-pngs.sh index e770cc2a67..01610e8ac3 100755 --- a/scripts/auxiliar/make-regtest-pngs.sh +++ b/scripts/auxiliar/make-regtest-pngs.sh @@ -9,15 +9,21 @@ # # ./make-regtest-pngs.sh -j9 # +# -p uses GNU parallel with the given job count in order to also +# parallelize the conversion of PDF files to bitmaps when using -g +# or -d. No attempt is made to parallelize the bitmap comparisons +# since their memory requirements may be prohibitive. +# # -o means build an old regtest set - the PNGs go in the old-regtest-results # directory # # -n means build a new regtest set - the PNGs go in the new-regtest-results # directory # -# -p uses PDF and the poppler library via pdftocairo for generating bitmaps, -# simulating the output for Evince and other previewers using poppler. -# pdftocairo may be contained in the poppler-utils package. +# -c uses PDF and the poppler library via pdftocairo for generating +# bitmaps, simulating the output for Evince and other previewers +# using poppler. pdftocairo may be contained in the poppler-utils +# package. # # -r can be used for specifying a rendering resolution. This # defaults to 101 for poppler and 300 for Ghostscript from PDF. @@ -27,34 +33,29 @@ # use a resolution appropriate for print. Antialiasing is not enabled. # # -d changes the Ghostscript device used for creating PNG files -# (usually png16m, but with -g you might prefer fewer colors for size -# reasons, like png16). +# (usually png16m for direct PNG creation and pngmono for printer simulation) +# +# if any filenames follow, those are the tests to run. In absence +# of any filenames, the contents of input/regression are used. cpu_count=${CPU_COUNT:-1} backend_opt='--png ${resolution:+=-dresolution=$resolution} ${gsdevice:+=-dpixmap-format=$gsdevice}' resolution= gsdevice= +use_parallel=n -png_generate() -{ - : -} - -while getopts "j:onpr:g" opts; do +while getopts "j:oncr:gpd:" opts; do case $opts in j) cpu_count=$OPTARG;; o) file_loc="old-regtest-results";; - p) + c) backend_opt="--pdf" png_generate() { - for i - do pdftocairo -png -r ${resolution:-101} -q "$i" && - rm "$i" - done + $1 pdftocairo -png -r ${resolution:-101} -q "$2" };; n) @@ -67,18 +68,20 @@ while getopts "j:onpr:g" opts; do backend_opt="--pdf" png_generate() { - for i - do - gs -sDEVICE=${gsdevice:-png16m} -q -dNOPAUSE \ - -r${resolution:-300} -dNOPLATFONTS \ - -dTextAlphaBits=1 -dGraphicsAlphaBits=1 \ - -sOutputFile="${i%.pdf}-%d.png" "$i" -c quit && - rm "$i" - done + $1 gs -sDEVICE=${gsdevice:-pngmono} -q -dNOPAUSE \ + -r${resolution:-300} -dNOPLATFONTS \ + -dTextAlphaBits=1 -dGraphicsAlphaBits=1 \ + -sOutputFile="${2%.pdf}-%d.png" "$2" -c quit };; + p) + use_parallel=y;; + d) + gsdevice=$OPTARG;; esac done +shift $((OPTIND-1)) + if [ -z "$file_loc" ]; then echo "Must specify old (-o) or new (-n) regtest PNG creation on command line" exit 1 @@ -86,12 +89,42 @@ fi rm -rf $LILYPOND_BUILD_DIR/out-png-check/$file_loc mkdir -p $LILYPOND_BUILD_DIR/out-png-check/$file_loc +OLDPWD="$PWD" cd $LILYPOND_BUILD_DIR/out-png-check/$file_loc -ls $LILYPOND_GIT/input/regression/*.ly > dir.txt +if [ "$*" = "" ] +then + ls $LILYPOND_GIT/input/regression/*.ly > dir.txt +else + : > dir.txt + for i + do + case "$i" in /*) + echo "$i" >> dir.txt;; + *) + echo "$OLDPWD/$i" >> dir.txt + esac + done +fi + $LILYPOND_BUILD_DIR/out/bin/lilypond $(eval echo $backend_opt) --relocate \ -dinclude-settings=$LILYPOND_GIT/scripts/auxiliar/NoTagline.ly \ -djob-count=$cpu_count -dread-file-list "dir.txt" -png_generate *.pdf +if [ "$backend_opt" = "--pdf" ] +then + if [ $use_parallel = y ] + then + for i in *.pdf + do + png_generate echo $i + done | parallel -j $cpu_count + rm *.pdf + else + for i in *.pdf + do + png_generate "" $i && rm "$i" + done + fi +fi rm -rf dir.txt rm -rf *.log @@ -102,7 +135,7 @@ if [ -n "$do_compare" ]; then diff_count=0 for filename in new-regtest-results/*.png; do trimFile=$(basename $filename) - if [ -e old-regtest-results/$trimFile ]; then + if [ -e "old-regtest-results/$trimFile" ]; then convert new-regtest-results/$trimFile -level 50% NewTest.png convert old-regtest-results/$trimFile -level 50% OldTest.png difference=$(compare -metric AE NewTest.png OldTest.png null: 2>&1 ) diff --git a/scripts/lilypond-invoke-editor.scm b/scripts/lilypond-invoke-editor.scm index fe1227cc1b..49800c067f 100644 --- a/scripts/lilypond-invoke-editor.scm +++ b/scripts/lilypond-invoke-editor.scm @@ -89,7 +89,7 @@ Options: uri)) (define (is-textedit-uri? uri) - (string-match "^textedit://" uri)) + (string-match "^textedit:" uri)) (define (dissect-uri uri)