]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' into lilypond/translation
authorJohn Mandereau <john.mandereau@gmail.com>
Thu, 8 May 2008 08:24:53 +0000 (10:24 +0200)
committerJohn Mandereau <john.mandereau@gmail.com>
Thu, 8 May 2008 08:24:53 +0000 (10:24 +0200)
* master:
  Fix use of relative in docs and restore UTF-8 strings
  compile fix (apparently)
  Formatting nits.
  Remove stray letter.
  New dynamics engravers
  Small formatting cleanups.
  Add Drul_array<>::set() method.
  Add ly:prob-[im]mutable-properties Scheme bindings.
  Restore Tie direction default
  Add NEWS entry for arpeggio.
  Fix #455.
  Fix #521.
  Bump version.
  Make fast_substitute_grob_array() protected.
  Fix #434, #440
  Add Skyline_pair::print[_point](), add some minor cleanups.
  Move Skyline_pair and Paper_system bindings into their own files.
  code layout nits.
  Fix #578.

54 files changed:
Documentation/de/user/simultaneous.itely
Documentation/es/user/editorial.itely
Documentation/es/user/fundamental.itely
Documentation/es/user/simultaneous.itely
Documentation/es/user/vocal.itely
Documentation/fr/user/fundamental.itely
Documentation/fr/user/vocal.itely
Documentation/topdocs/NEWS.tely
Documentation/user/simultaneous.itely
Documentation/user/spacing.itely
Documentation/user/staff.itely
Documentation/user/vocal.itely
VERSION
flower/include/drul-array.hh
input/regression/arpeggio-parenthesis.ly [new file with mode: 0644]
input/regression/completion-heads-lyrics.ly [new file with mode: 0644]
input/regression/tie-direction-broken.ly [new file with mode: 0644]
lily/align-interface.cc
lily/arpeggio.cc
lily/axis-group-interface.cc
lily/completion-note-heads-engraver.cc
lily/dynamic-align-engraver.cc [new file with mode: 0644]
lily/dynamic-engraver.cc
lily/engraver.cc
lily/figured-bass-engraver.cc
lily/global-context-scheme.cc
lily/grob.cc
lily/hairpin.cc
lily/include/arpeggio.hh
lily/include/lily-proto.hh
lily/include/prob.hh
lily/include/skyline-pair.hh [new file with mode: 0644]
lily/include/skyline.hh
lily/include/spanner.hh
lily/include/tie-details.hh
lily/lyric-combine-music-iterator.cc
lily/new-dynamic-engraver.cc [new file with mode: 0644]
lily/paper-column.cc
lily/paper-system-scheme.cc [new file with mode: 0644]
lily/prob-scheme.cc
lily/separation-item.cc
lily/skyline-pair.cc [new file with mode: 0644]
lily/skyline.cc
lily/spacing-interface.cc
lily/spacing-spanner.cc
lily/system.cc
lily/tie-details.cc
lily/tie-formatting-problem.cc
lily/tie.cc
ly/engraver-init.ly
ly/spanners-init.ly
scm/define-context-properties.scm
scm/define-grobs.scm
scm/music-functions.scm

index c444bbafe522defadd6aaaa3afa2be9d86af7503..5dc94d016e29754b482dfc99526aabcc5651fab9 100644 (file)
@@ -265,7 +265,7 @@ mehr Stimmen benötigt werden, um Zusammenstöße zwischen Noten zu
 vermeiden. Zusätzliche Stimmen werden durch einen neuen Bezeichner 
 erstellt, wie das nächste Beispiel zeigt.
 
-@lilypond[quote,verbatim,ragged-right,relative=2]
+@lilypond[quote,verbatim,ragged-right]
 voiceFive = #(context-spec-music (make-voice-props-set 4) 'Voice)
 
 \relative c''' <<
index 9dd00e441d227c67ee79433e62f3ef6bb766dc98..ea3c74b523fff41782be1530f732ad979c2919c1 100644 (file)
@@ -500,7 +500,7 @@ sincronizadas con las notas.
 @snippets
 
 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
-{grid-lines-changing-their-appearance.ly}
+{grid-lines--changing-their-appearance.ly}
 
 
 @seealso
index e7f3b05ca9cd1548ed304542e660a6407ac83a51..bea56c9c9b7a535de8a07e9fad19170b92dc7a86 100644 (file)
@@ -1894,8 +1894,7 @@ Esto parece un poco enrevesado; los márgenes están descuadrados.  Esto
 tiene fácil solución.  Presentamos aquí la plantilla completa para
 soprano y cello.
 
-@lilypond[quote,verbatim,ragged-right]
-\version "2.11.38"
+@lilypond[quote,verbatim,ragged-right,addversion]
 sopranoMusic = \relative c' {
   \clef treble
   \key c \major
@@ -2115,8 +2114,7 @@ Los grupos ChoirStaff y PianoStaff se deben combinar utilizando
 Al combinar todo esto junto y escribir la música de los tres compases
 del ejemplo anterior, obtenemos:
 
-@lilypond[quote,verbatim,ragged-right]
-\version "2.11.38"
+@lilypond[quote,verbatim,ragged-right,addversion]
 global = { \key d \major \time 4/4 }
 sopMusic = \relative c'' {
   \clef "treble"
@@ -2320,8 +2318,7 @@ pentagramas tendrá una estructura similar, aunque el número de voces
 puede variar.  Todo lo que nos queda es añadir la música, y combinar
 todas las partes.
 
-@lilypond[quote,verbatim,ragged-right]
-\version "2.11.38"
+@lilypond[quote,verbatim,ragged-right,addversion]
 \header {
   title = "Jesu, meine Freude"
   composer = "J S Bach"
index 65fa855ea7f9baba9c64fd4eae3690ad42f6ab35..e980e73cfabfd15249abeac0538e41c52886b7db 100644 (file)
@@ -202,7 +202,7 @@ adicionales para evitar colisiones entre las notas.  Las voces
 adicionales se añaden definiendo una variable, como se muestra a
 continuación:
 
-@lilypond[quote,verbatim,ragged-right,relative=2]
+@lilypond[quote,verbatim,ragged-right]
 voiceFive = #(context-spec-music (make-voice-props-set 4) 'Voice)
 
 \relative c''' <<
@@ -341,7 +341,7 @@ Si queremos sólo las partes mezcladas y no las marcas textuales,
 podemos establecer la propiedad @code{printPartCombineTexts} al valor
 false.
 
-@lilypond[quote,verbatim,ragged-right,fragment,relative=2]
+@lilypond[quote,verbatim,ragged-right,fragment]
 \new Staff <<
   \set Staff.printPartCombineTexts = ##f
   \partcombine
@@ -354,7 +354,7 @@ Para cambiar el texto que se imprime para los solos o la fusión,
 podemos establecer las propiedades @code{soloText}, @code{soloIIText}
 y @code{aDueText}.
 
-@lilypond[quote,verbatim,ragged-right,fragment,relative=2]
+@lilypond[quote,verbatim,ragged-right,fragment]
 \new Staff <<
   \set Score.soloText = #"ichi"
   \set Score.soloIIText = #"ni"
index 4dfc56bdd5892a005108de25a59c2bff63372410..f61af06b7e1b2b6fc601e680f73a9cc7737e4085 100644 (file)
@@ -100,7 +100,7 @@ a la melodía.  He aquí un ejemplo:
 
 @lilypond[ragged-right,verbatim,fragment,quote]
 \time 3/4
-\relative { c2 e4 g2. }
+\relative c' { c2 e4 g2. }
 \addlyrics { play the game }
 @end lilypond
 
@@ -109,7 +109,7 @@ Se pueden añadir más versos mediante la adición de más secciones
 
 @lilypond[ragged-right,verbatim,fragment,quote]
 \time 3/4
-\relative { c2 e4 g2. }
+\relative c' { c2 e4 g2. }
 \addlyrics { play the game }
 \addlyrics { speel het spel }
 \addlyrics { joue le jeu }
@@ -198,9 +198,9 @@ comillas o usar un carácter @code{_} (guión bajo), para obtener
 espacios entre las sílabas, o usar el símbolo de tilde curva
 (@code{~}) para obtener una ligadura entre sílabas de la letra.
 
-@lilypond[quote,relative=2,ragged-right,fragment,verbatim]
+@lilypond[quote,ragged-right,fragment,verbatim]
 \time 3/4
-\relative { c2 e4 g2 e4 }
+\relative c' { c2 e4 g2 e4 }
 \addlyrics { gran- de_a- mi- go }
 \addlyrics { pu- "ro y ho-" nes- to }
 \addlyrics { pu- ro~y~ho- nes- to }
@@ -220,7 +220,7 @@ utf-8.  Consulte @ref{Text encoding}, para ver más información.
 @c FIXME: quotes.
 
 @lilypond[quote,ragged-right,fragment,verbatim]
-\relative { e4 f e d e f e2 }
+\relative c' { e4 f e d e f e2 }
 \addlyrics { He said: “Let my peo ple go”. }
 @end lilypond
 
@@ -481,9 +481,9 @@ ligaduras de texto están hechas con el carácter de Unicode U+203F, por
 tanto debe asegurarse de tener instalada una tipografía (como
 DejaVuLGC) que incluya este glifo.}.
 
-@lilypond[quote,relative=2,ragged-right,fragment,verbatim]
+@lilypond[quote,ragged-right,fragment,verbatim]
 \time 3/4
-\relative { c2 e4 g2 e4 }
+\relative c' { c2 e4 g2 e4 }
 \addlyrics { gran- de_a- mi- go }
 \addlyrics { pu- "ro y ho-" nes- to }
 \addlyrics { pu- ro~y~ho- nes- to }
@@ -758,7 +758,7 @@ la propiedad minimum-distance de LyricSpace.
 Para que este cambio sea válido para la letra de la partitura
 completa, establezca la propiedad dentro del @q{layout} o disposición.
 
-@lilypond[relative,verbatim,quote,ragged-right]
+@lilypond[verbatim,quote,ragged-right]
 \score {
   \relative c' {
   c c c c
@@ -873,7 +873,7 @@ versión abreviada como @code{shortVocalName}.
   Hi, my name is Bert.
 } \addlyrics {
   \set vocalName = "Ernie "
-  Oh, che -- ri, je t'aime
+  Oh, ché -- ri, je t'aime
 }
 @end lilypond
 
@@ -896,7 +896,7 @@ texto, tal y como se muestra a continuación:
 @lilypond[verbatim,ragged-right,quote]
 %{
 <<
-  \relative \new Voice = "lahlah" {
+  \relative c' \new Voice = "lahlah" {
     \set Staff.autoBeaming = ##f
     c4
     \slurDotted
@@ -926,7 +926,7 @@ lenta que la normal.  Esto se puede conseguir insertando @code{\skip}s
 texto se retrasará una nota más.  Por ejemplo,
 
 @lilypond[verbatim,ragged-right,quote]
-\relative { c c g' }
+\relative c' { c c g' }
 \addlyrics {
   twin -- \skip 4
   kle
@@ -942,7 +942,7 @@ texto.  Esto se hace estableciendo la propiedad
 
 @lilypond[ragged-right,quote]
 <<
-  \relative \new Voice = "lahlah" {
+  \relative c' \new Voice = "lahlah" {
     \set Staff.autoBeaming = ##f
     c4
     <<
index d620bfc076d28f54daf1a64e215564d65f1f10be..7741a2d98da5cf8011c5672d295dc21d24fe1df5 100644 (file)
@@ -430,7 +430,7 @@ amené à recourir à des voix supplémentaires afin d'éviter des collisions
 de notes.  Ces voix additionnelles s'ajoutent en définissant un
 identificateur, comme le montre l'exemple suivant :
 
-@lilypond[quote,verbatim,ragged-right,relative=2]
+@lilypond[quote,verbatim,ragged-right]
 voiceFive = #(context-spec-music (make-voice-props-set 4) 'Voice)
 
 \relative c''' <<
@@ -845,8 +845,7 @@ C'est un peu le bazar dans tout ça ; mais il vous sera facile de
 mettre un peu d'ordre dans l'indentation.  Voici le modèle pour
 soprano et violoncelle au complet :
 
-@lilypond[quote,verbatim,ragged-right]
-\version "2.11.38"
+@lilypond[quote,verbatim,ragged-right,addversion]
 sopranoMusic = \relative c' {
   \clef treble
   \key c \major
index eb353dbdaee35febbabb0112bca84cc0ec8f2082..9ee15c039e35deb1e675872a9c229c3ff7a39e6c 100644 (file)
@@ -193,9 +193,9 @@ ces syllabes entre guillemets, ou bien remplacer l'espace par un
 caractère souligné (@code{_}), ou encore utiliser un tilde (@code{~})
 pour obtenir une liaison entre les syllabes.
 
-@lilypond[quote,relative=2,ragged-right,fragment,verbatim]
+@lilypond[quote,ragged-right,fragment,verbatim]
 \time 3/4
-\relative { c2 e4 g2 e4 }
+\relative c' { c2 e4 g2 e4 }
 \addlyrics { gran- de_a- mi- go }
 \addlyrics { pu- "ro y ho-" nes- to }
 \addlyrics { pu- ro~y~ho- nes- to }
@@ -209,10 +209,10 @@ incluant ce symbole (par exemple DejaVuLGC) installée sur le système.
 Pour utiliser des lettres accentuées ou des caractères spéciaux 
 --- cœurs ou guillemets inversés par exemple --- il suffit de les insérer
 dans le fichier et de veiller à sauvegarder ce dernier avec le codage
-utf-8.  Voir à ce sujet @ref{Text encoding} pour plus de détails.
+UTF-8.  Voir à ce sujet @ref{Text encoding} pour plus de détails.
 
 @lilypond[quote,ragged-right,fragment,verbatim]
-\relative { e4 f e d e f e2 }
+\relative c' { e4 f e d e f e2 }
 \addlyrics { He said: “Let my peo ple go”. }
 @end lilypond
 
@@ -471,9 +471,9 @@ liaison adaptée aux paroles correspond au caractère Unicode U+203F, et
 n'apparaîtra dans la partition que si le système dispose d'une police
 installée qui contient ce symbole(par exemple DejaVuLGC).}.
 
-@lilypond[quote,relative=2,ragged-right,fragment,verbatim]
+@lilypond[quote,ragged-right,fragment,verbatim]
 \time 3/4
-\relative { c2 e4 g2 e4 }
+\relative c' { c2 e4 g2 e4 }
 \addlyrics { gran- de_a- mi- go }
 \addlyrics { pu- "ro y ho-" nes- to }
 \addlyrics { pu- ro~y~ho- nes- to }
@@ -742,7 +742,7 @@ d'accroître l'espacement des paroles.
 Pour que ce réglage s'applique à toute la partition, définissez-le
 dans le bloc @code{\layout}.
 
-@lilypond[relative,verbatim,quote,ragged-right]
+@lilypond[verbatim,quote,ragged-right]
 \score {
   \relative c' {
   c c c c
@@ -853,7 +853,7 @@ abrégée.
   Hi, my name is Bert.
 } \addlyrics {
   \set vocalName = "Ernie "
-  Oh, che -- ri, je t'aime
+  Oh, ché -- ri, je t'aime
 }
 @end lilypond
 
@@ -905,7 +905,7 @@ faire un mélisme.  Il faudra alors insérer des sauts invisibles
 suivant d'une note :
 
 @lilypond[verbatim,ragged-right,quote]
-\relative { c c g' }
+\relative c' { c c g' }
 \addlyrics {
   twin -- \skip 4
   kle
@@ -921,7 +921,7 @@ modifie la propriété @code{associatedVoice}.  Dans cet exemple,
 
 @lilypond[ragged-right,quote]
 <<
-  \relative \new Voice = "lahlah" {
+  \relative c' \new Voice = "lahlah" {
     \set Staff.autoBeaming = ##f
     c4
     <<
index c03e68de01e5716f705f7a7a9426d5e64a6fc8c5..1d04699985e3522917ae646150f1378854e911f3 100644 (file)
@@ -65,6 +65,17 @@ which scares away people.
 
 @end ignore
 
+@item
+Arpeggios may now use ``parenthesis'' style brackets:
+
+@lilypond[relative,ragged-right]
+  \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-slur
+
+  % Note: does not work for cross staff arpeggios.
+  \override Arpeggio #'X-extent = #ly:grob::stencil-width
+  <c g' c>2\arpeggio ~ c
+@end lilypond
+
 @item
 Enclosing text within boxes with rounded corners is now possible,
 using the @code{rounded-box} command.
index 0b9b14c57648869eecc48f0456b5ef4db6c89c29..0948c91b01a1be1df298b2552ea09d163c9e9218 100644 (file)
@@ -199,7 +199,7 @@ In some instances of complex polyphonic music, you may need
 additional voices to avoid collisions between notes.  Additional
 voices are added by defining an variable, as shown below:
 
-@lilypond[quote,verbatim,ragged-right,relative=2]
+@lilypond[quote,verbatim,ragged-right]
 voiceFive = #(context-spec-music (make-voice-props-set 4) 'Voice)
 
 \relative c''' <<
@@ -332,7 +332,7 @@ down stems and @q{Solo II}.
 If you just want the merging parts, and not the textual markings,
 you may set the property @code{printPartCombineTexts} to false.
 
-@lilypond[quote,verbatim,ragged-right,fragment,relative=2]
+@lilypond[quote,verbatim,ragged-right]
 \new Staff <<
   \set Staff.printPartCombineTexts = ##f
   \partcombine
@@ -345,7 +345,7 @@ To change the text that is printed for solos or merging, you may
 set the @code{soloText}, @code{soloIIText}, and @code{aDueText}
 properties.
 
-@lilypond[quote,verbatim,ragged-right,fragment,relative=2]
+@lilypond[quote,verbatim,ragged-right]
 \new Staff <<
   \set Score.soloText = #"ichi"
   \set Score.soloIIText = #"ni"
index 439ce43d4f4b615fe4e6383e8bc2af9ad90c620b..5cf5c8d370f448fc22cf4bef0b3631947ceab350 100644 (file)
@@ -1597,7 +1597,7 @@ music.  Note that @code{ly:make-moment} constructs
 a duration, so @code{1 4} is a longer duration
 than @code{1 16}.
 
-@lilypond[relative,verbatim,line-width=12\cm]
+@lilypond[verbatim,line-width=12\cm]
 \score {
   \relative c'' {
     g4 e e2 | f4 d d2 | c4 d e f | g4 g g2 |
@@ -1608,7 +1608,7 @@ than @code{1 16}.
 }
 @end lilypond
 
-@lilypond[relative,verbatim,line-width=12\cm]
+@lilypond[verbatim,line-width=12\cm]
 \score {
   \relative c'' {
     g4 e e2 | f4 d d2 | c4 d e f | g4 g g2 |
index 8b8c72705c4ccf9b67a94cd19982a1ef90d4eb85..ea933dd957b4fb974b5dbd576f20ab34b2969647 100644 (file)
@@ -597,7 +597,7 @@ to the main staff with @code{<<} and @code{>>} brackets.  The @emph{ossia}
 staff is stopped and started explicitely and white space is inserted 
 with the @code{\skip} command.
 
-@lilypond[verbatim,relative=2,quote]
+@lilypond[verbatim,quote]
 <<
   \new Staff \with
   {
@@ -696,7 +696,7 @@ You can make the staff lines invisible by removing the
 
 @lilypond[quote,ragged-right,verbatim]
 \score {
-  \context Staff \relative c'' { c8 c c16 c c c }
+  \new Staff \relative c'' { c8 c c16 c c c }
   \layout{
     \context {
       \Staff
@@ -719,7 +719,7 @@ The lower staff of the second staff group is not removed,
 because the setting applies only to the specific staff inside 
 of which it is written.
 
-@lilypond[quote,ragged-right,verbatim,relative=2]
+@lilypond[quote,ragged-right,verbatim]
 \layout {
   \context { 
     \RemoveEmptyStaffContext 
@@ -1174,8 +1174,8 @@ cbsn = \relative c, {
 }
 
 <<
-  \context Staff = "picc" \picc
-  \context Staff = "cbsn" \cbsn
+  \new Staff = "picc" \picc
+  \new Staff = "cbsn" \cbsn
 >>
 @end lilypond
 
index dfaf92d750e45e3d855bd0e7e46806f95fa866f1..76d7be98c51a18690d6c4ce67025125f0a6a31b6 100644 (file)
@@ -119,7 +119,7 @@ to a melody.  Here is an example,
 
 @lilypond[ragged-right,verbatim,fragment,quote]
 \time 3/4
-\relative { c2 e4 g2. }
+\relative c' { c2 e4 g2. }
 \addlyrics { play the game }
 @end lilypond
 
@@ -128,7 +128,7 @@ More stanzas can be added by adding more
 
 @lilypond[ragged-right,verbatim,fragment,quote]
 \time 3/4
-\relative { c2 e4 g2. }
+\relative c' { c2 e4 g2. }
 \addlyrics { play the game }
 \addlyrics { speel het spel }
 \addlyrics { joue le jeu }
@@ -213,9 +213,9 @@ In order to assign more than one syllable to a single note, you can
 surround them with quotes or use a @code{_} character, to get spaces
 between syllables, or use tilde  symbol (@code{~}) to get a lyric tie.
 
-@lilypond[quote,relative=2,ragged-right,fragment,verbatim]
+@lilypond[quote,ragged-right,fragment,verbatim]
 \time 3/4
-\relative { c2 e4 g2 e4 }
+\relative c' { c2 e4 g2 e4 }
 \addlyrics { gran- de_a- mi- go }
 \addlyrics { pu- "ro y ho-" nes- to }
 \addlyrics { pu- ro~y~ho- nes- to }
@@ -229,13 +229,11 @@ glyph.
 To enter lyrics with characters from non-English languages, or with
 accented and special characters (such as the heart symbol or slanted quotes),
 simply insert the characters directly into the input file and save
-it with utf-8 encoding.  See @ref{Text encoding}, for more info.
-
-FIXME: quotes.
+it with UTF-8 encoding.  See @ref{Text encoding}, for more info.
 
 @lilypond[quote,ragged-right,fragment,verbatim]
-\relative { e4 f e d e f e2 }
-\addlyrics { He said: Ã¢â\82¬Å\93Let my peo ple goââ\82¬Â\9d. }
+\relative c' { e4 f e d e f e2 }
+\addlyrics { He said: â\80\9cLet my peo ple goâ\80\9d. }
 @end lilypond
 
 To use normal quotes in lyrics, add a backslash before the
@@ -494,9 +492,9 @@ U+203F, so be
 sure to have a font (Like DejaVuLGC) installed that includes this
 glyph.}.
 
-@lilypond[quote,relative=2,ragged-right,fragment,verbatim]
+@lilypond[quote,ragged-right,fragment,verbatim]
 \time 3/4
-\relative { c2 e4 g2 e4 }
+\relative c' { c2 e4 g2 e4 }
 \addlyrics { gran- de_a- mi- go }
 \addlyrics { pu- "ro y ho-" nes- to }
 \addlyrics { pu- ro~y~ho- nes- to }
@@ -601,7 +599,7 @@ the text will be delayed another note.
 For example,
 
 @lilypond[verbatim,ragged-right,quote]
-\relative { c c g' }
+\relative c' { c c g' }
 \addlyrics {
   twin -- \skip 4
   kle
@@ -767,7 +765,7 @@ LyricSpace.
 To make this change for all lyrics in the score, set the property in the
 layout.
 
-@lilypond[relative,verbatim,quote,ragged-right]
+@lilypond[verbatim,quote,ragged-right]
 \score {
   \relative c' {
   c c c c
@@ -835,10 +833,11 @@ Stanza numbers can be added by setting @code{stanza}, e.g.,
   Hi, my name is Bert.
 } \addlyrics {
   \set stanza = "2. "
-  Oh, chÃ\83© -- ri, je t'aime
+  Oh, ché -- ri, je t'aime
 }
 @end lilypond
 
+
 @noindent
 These numbers are put just before the start of the first syllable.
 
@@ -911,7 +910,7 @@ the line, just like instrument names.  They are created by setting
   Hi, my name is Bert.
 } \addlyrics {
   \set vocalName = "Ernie "
-  Oh, che -- ri, je t'aime
+  Oh, ché -- ri, je t'aime
 }
 @end lilypond
 
@@ -933,7 +932,7 @@ in the text, as shown here,
 @lilypond[verbatim,ragged-right,quote]
 %{
 <<
-  \relative \new Voice = "lahlah" {
+  \relative c' \new Voice = "lahlah" {
     \set Staff.autoBeaming = ##f
     c4
     \slurDotted
@@ -966,7 +965,7 @@ done by setting the @code{associatedVoice} property.  In the example
 
 @lilypond[ragged-right,quote]
 <<
-  \relative \new Voice = "lahlah" {
+  \relative c' \new Voice = "lahlah" {
     \set Staff.autoBeaming = ##f
     c4
     <<
diff --git a/VERSION b/VERSION
index d9dd0f5dede2b4b25cd0731672ec3d5c1da3941a..e792adf6371e53c4bc2f6fceaa9cae968203558f 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,6 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=11
-PATCH_LEVEL=45
+PATCH_LEVEL=46
 MY_PATCH_LEVEL=
 
index e687acf2d7a0d7026a430589ae2f795922542f78..47c4847c4048825f0d65904a0431a2e861779410 100644 (file)
@@ -40,7 +40,11 @@ struct Drul_array
   Drul_array ()
   {
   }
-  Drul_array (T t1, T t2)
+  Drul_array (T const &t1, T const &t2)
+  {
+    set (t1, t2);
+  }
+  void set (T const &t1, T const &t2)
   {
     array_[0] = t1;
     array_[1] = t2;
diff --git a/input/regression/arpeggio-parenthesis.ly b/input/regression/arpeggio-parenthesis.ly
new file mode 100644 (file)
index 0000000..b666015
--- /dev/null
@@ -0,0 +1,17 @@
+
+\header {
+
+  texidoc = "There is a variant of the arpeggio sign that uses a
+  `vertical slur' instead of the wiggle."
+
+}
+
+\version "2.11.46"
+
+\relative c' {
+  \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-slur
+
+  % Note: does not work for cross staff arpeggios.
+  \override Arpeggio #'X-extent = #ly:grob::stencil-width
+  <c g' c>2\arpeggio ~ c
+}
diff --git a/input/regression/completion-heads-lyrics.ly b/input/regression/completion-heads-lyrics.ly
new file mode 100644 (file)
index 0000000..0df5fcd
--- /dev/null
@@ -0,0 +1,25 @@
+\header {
+  texidoc = "You can put lyrics under completion heads."
+}
+\version "2.11.45"
+
+mel = \relative c'' {
+ c1. c1.
+}
+
+lyr = \lyricmode {
+ One  two
+}
+
+\score {
+ \new Score <<
+   \new Staff <<
+     \new Voice = "completion" \with {
+       \remove "Note_heads_engraver"
+       \remove "Forbid_line_break_engraver"
+       \consists "Completion_heads_engraver"
+     } \mel
+   >>
+   \new Lyrics \lyricsto "completion" \lyr
+ >>
+}
diff --git a/input/regression/tie-direction-broken.ly b/input/regression/tie-direction-broken.ly
new file mode 100644 (file)
index 0000000..895f87f
--- /dev/null
@@ -0,0 +1,21 @@
+
+\version "2.11.45"
+
+\header {
+
+  texidoc = "In the single tie case, broken ties peek across line
+  boundaries to determine which direction to take."
+
+}
+
+
+\paper {
+  ragged-right = ##t
+}
+
+\relative c'' {
+ bes1~ \break
+ bes2.
+ \stemUp bes4 ~ \break
+ bes1 
+}
index daffa298fb1226d7c029034a81fa61aab3b2ebea..057e233f443d6522ddf4bddc5d74b7a515881dde 100644 (file)
@@ -7,16 +7,17 @@
 */
 
 #include "align-interface.hh"
-#include "spanner.hh"
-#include "item.hh"
 #include "axis-group-interface.hh"
-#include "pointer-group-interface.hh"
-#include "hara-kiri-group-spanner.hh"
 #include "grob-array.hh"
+#include "hara-kiri-group-spanner.hh"
 #include "international.hh"
+#include "item.hh"
+#include "paper-column.hh"
+#include "pointer-group-interface.hh"
+#include "spanner.hh"
+#include "skyline-pair.hh"
 #include "system.hh"
 #include "warn.hh"
-#include "paper-column.hh"
 
 /*
   TODO: for vertical spacing, should also include a rod & spring
index fe7b116821778f883f5b028d9a3717d50dbdf35f..80858426bc6eb43bc7f12e2f77a83aec4351d8b3 100644 (file)
@@ -8,15 +8,16 @@
 
 #include "arpeggio.hh"
 
+#include "bezier.hh"
+#include "font-interface.hh"
 #include "grob.hh"
+#include "lookup.hh"
 #include "output-def.hh"
-#include "stem.hh"
+#include "pointer-group-interface.hh"
 #include "staff-symbol-referencer.hh"
 #include "staff-symbol.hh"
+#include "stem.hh"
 #include "warn.hh"
-#include "font-interface.hh"
-#include "lookup.hh"
-#include "pointer-group-interface.hh"
 
 Grob *
 Arpeggio::get_common_y (Grob *me)
@@ -136,6 +137,28 @@ Arpeggio::brew_chord_bracket (SCM smob)
   return mol.smobbed_copy ();
 }
 
+MAKE_SCHEME_CALLBACK (Arpeggio, brew_chord_slur, 1);
+SCM
+Arpeggio::brew_chord_slur (SCM smob)
+{
+  Grob *me = unsmob_grob (smob);
+  Interval heads = robust_scm2interval (me->get_property ("positions"),
+                                       Interval())
+    * Staff_symbol_referencer::staff_space (me);
+
+  Real lt = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
+  Real dy = heads.length ();
+
+  Real height_limit = 1.5;
+  Real ratio = .33;
+  Bezier curve = slur_shape (dy, height_limit, ratio);
+  curve.rotate (M_PI / 2);
+
+  Stencil mol (Lookup::slur (curve, lt, lt));
+  mol.translate_axis (heads[LEFT], Y_AXIS);
+  return mol.smobbed_copy ();
+}
+
 /*
   We have to do a callback, because print () triggers a
   vertical alignment if it is cross-staff.
index 121b0ba1596e0736fddb246db07ef2b502083db6..044a392851df4ee626f48e6852b655e6762cd4a3 100644 (file)
@@ -18,6 +18,7 @@
 #include "paper-column.hh"
 #include "paper-score.hh"
 #include "separation-item.hh"
+#include "skyline-pair.hh"
 #include "stencil.hh"
 #include "system.hh"
 #include "warn.hh"
@@ -629,7 +630,6 @@ Axis_group_interface::calc_max_stretch (SCM smob)
   return scm_from_double (ret);
 }
 
-extern bool debug_skylines;
 MAKE_SCHEME_CALLBACK (Axis_group_interface, print, 1)
 SCM
 Axis_group_interface::print (SCM smob)
@@ -641,8 +641,10 @@ Axis_group_interface::print (SCM smob)
   Stencil ret;
   if (Skyline_pair *s = Skyline_pair::unsmob (me->get_property ("vertical-skylines")))
     {
-      ret.add_stencil (Lookup::points_to_line_stencil (0.1, (*s)[UP].to_points (X_AXIS)).in_color (255, 0, 255));
-      ret.add_stencil (Lookup::points_to_line_stencil (0.1, (*s)[DOWN].to_points (X_AXIS)).in_color (0, 255, 255));
+      ret.add_stencil (Lookup::points_to_line_stencil (0.1, (*s)[UP].to_points (X_AXIS))
+                      .in_color (255, 0, 255));
+      ret.add_stencil (Lookup::points_to_line_stencil (0.1, (*s)[DOWN].to_points (X_AXIS))
+                      .in_color (0, 255, 255));
     }
   return ret.smobbed_copy ();
 }
index a83c961727578ab5951a96d73e997ac83a369170..8734b861c2a2d15eadb9b7367b508da6200619fa 100644 (file)
@@ -166,6 +166,7 @@ Completion_heads_engraver::process_music ()
 
       event->set_property ("pitch", pits);
       event->set_property ("duration", note_dur.smobbed_copy ());
+      event->set_property ("length", Moment (note_dur.get_length ()).smobbed_copy ());
       event->set_property ("duration-log", scm_from_int (note_dur.duration_log ()));
 
       Item *note = make_note_head (event);
@@ -187,9 +188,8 @@ Completion_heads_engraver::process_music ()
     }
 
   left_to_do_ -= note_dur.get_length ();
-
   if (left_to_do_)
-    get_global_context ()->add_moment_to_process (now.main_part_ + left_to_do_);
+    get_global_context ()->add_moment_to_process (now.main_part_ + note_dur.get_length());
   /*
     don't do complicated arithmetic with grace notes.
   */
@@ -217,6 +217,8 @@ Completion_heads_engraver::start_translation_timestep ()
       note_events_.clear ();
       prev_notes_.clear ();
     }
+  context ()->set_property ("completionBusy",
+                           ly_bool2scm (note_events_.size ()));
 }
 
 Completion_heads_engraver::Completion_heads_engraver ()
@@ -240,5 +242,5 @@ ADD_TRANSLATOR (Completion_heads_engraver,
                "measureLength ",
 
                /* write */
-               ""
+               "completionBusy "
                );
diff --git a/lily/dynamic-align-engraver.cc b/lily/dynamic-align-engraver.cc
new file mode 100644 (file)
index 0000000..77feb08
--- /dev/null
@@ -0,0 +1,164 @@
+/* 
+  dynamic-align-engraver.cc -- implement Dynamic_align_engraver
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2008 Han-Wen Nienhuys <hanwen@lilypond.org>
+  
+*/
+
+#include <set>
+
+#include "engraver.hh"
+
+#include "axis-group-interface.hh"
+#include "directional-element-interface.hh"
+#include "item.hh"
+#include "side-position-interface.hh"
+#include "spanner.hh"
+#include "stream-event.hh"
+
+#include "translator.icc"
+
+class Dynamic_align_engraver : public Engraver
+{
+  TRANSLATOR_DECLARATIONS (Dynamic_align_engraver);
+  DECLARE_ACKNOWLEDGER (note_column);
+  DECLARE_ACKNOWLEDGER (dynamic);
+  DECLARE_END_ACKNOWLEDGER (dynamic);
+
+protected:
+  virtual void stop_translation_timestep ();
+
+private:
+  void create_line_spanner (Stream_event *cause);
+  Spanner* line_;
+
+  vector<Spanner*> ended_;
+  vector<Spanner*> started_;
+  vector<Grob*> scripts_;
+  vector<Grob*> support_;
+  
+  set<Spanner*> running_;
+};
+
+Dynamic_align_engraver::Dynamic_align_engraver ()
+{
+  line_ = 0;
+}
+
+ADD_ACKNOWLEDGER (Dynamic_align_engraver, dynamic);
+ADD_ACKNOWLEDGER (Dynamic_align_engraver, note_column);
+ADD_END_ACKNOWLEDGER (Dynamic_align_engraver, dynamic);
+
+void
+Dynamic_align_engraver::create_line_spanner (Stream_event* event)
+{
+  if (!line_)
+    line_ = make_spanner ("DynamicLineSpanner",
+                         event ? event->self_scm() : SCM_EOL);
+}
+
+void
+Dynamic_align_engraver::acknowledge_end_dynamic (Grob_info info)
+{
+  if (Spanner::has_interface(info.grob()))
+    ended_.push_back (info.spanner ());
+}
+
+void
+Dynamic_align_engraver::acknowledge_note_column (Grob_info info)
+{
+  support_.push_back (info.grob ());
+}
+
+void
+Dynamic_align_engraver::acknowledge_dynamic (Grob_info info)
+{
+  Stream_event *cause = info.event_cause ();
+  create_line_spanner (cause);
+  if (Spanner::has_interface(info.grob()))
+    started_.push_back (info.spanner ());
+  else if (info.item())
+    scripts_.push_back (info.item());
+  else
+    info.grob ()->programming_error ("Unknown dynamic grob.");
+
+  Axis_group_interface::add_element (line_, info.grob ());
+
+  if (cause)
+    {
+      if (Direction d = to_dir (cause->get_property ("direction")))
+       set_grob_direction (line_, d);
+    }
+}
+
+void
+Dynamic_align_engraver::stop_translation_timestep ()
+{
+  for (vsize i = 0; i < started_.size(); i++)
+    running_.insert (started_[i]);
+  for (vsize i = 0; i < ended_.size(); i++)
+    {
+      Spanner *sp = ended_[i];
+
+      set<Spanner*>::iterator it  = running_.find (sp);
+      if (it != running_.end())
+       running_.erase (it);
+      else
+       started_[i]->programming_error ("Lost track of this dynamic spanner.");
+    }
+
+  bool end = line_ && running_.empty ();
+  Direction d = LEFT;
+  do
+    {
+      if (line_
+         && ((d == LEFT && !line_->get_bound (LEFT))
+             || (end && d == RIGHT && !line_->get_bound (RIGHT))))
+       {
+         vector<Spanner*> const &spanners =
+           (d == LEFT) ? started_ : ended_;
+         
+         Grob *bound = 0;
+         if (scripts_.size())
+           bound = scripts_[0];
+         else if (spanners.size())
+           bound = spanners[0]->get_bound (d);
+         else
+           {
+             programming_error ("Started DynamicLineSpanner but have no left bound.");
+             bound = unsmob_grob (get_property ("currentMusicalColumn"));
+           }
+
+         line_->set_bound (d, bound);
+       }
+    }
+  while (flip (&d) != LEFT);
+
+  for (vsize i = 0; line_ && i < support_.size (); i++)
+    Side_position_interface::add_support (line_, support_[i]);
+
+  if (end) 
+    line_ = 0;
+
+  ended_.clear ();
+  started_.clear ();
+  scripts_.clear ();
+  support_.clear ();
+}
+
+
+ADD_TRANSLATOR (Dynamic_align_engraver,
+               /* doc */
+               "Align hairpins and dynamic texts on a horizontal line",
+
+               /* create */
+               "DynamicLineSpanner ",
+
+               /* read */
+               "currentMusicalColumn ",
+
+               /* write */
+               ""
+               );
index 2f66955d446317d3ad5682d633b992c579ee0c06..94057f0bde25ebe7ca50288758c73233d4c4f003 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "axis-group-interface.hh"
 #include "context.hh"
+#include "engraver.hh"
 #include "dimensions.hh"
 #include "directional-element-interface.hh"
 #include "engraver.hh"
@@ -253,7 +254,7 @@ Dynamic_engraver::process_music ()
              cresc_->set_property ("style", s);
              context ()->set_property ((start_type
                                         + "Spanner").c_str (), SCM_EOL);
-             s = get_property ((start_type + "Text").c_str ());
+             s = get_property ((start_type + "Text").c_str ());
              if (Text_interface::is_markup (s))
                {
                  cresc_->set_property ("text", s);
@@ -277,7 +278,6 @@ Dynamic_engraver::process_music ()
              cresc_->set_bound (LEFT, script_);
              add_bound_item (line_spanner_, cresc_->get_bound (LEFT));
            }
-
          Axis_group_interface::add_element (line_spanner_, cresc_);
        }
     }
index c749be110a169b2319d68059070dbb7f5f2bf1de..e9195564d79849deee822a51933b932948a720af 100644 (file)
@@ -70,7 +70,8 @@ Engraver::announce_end_grob (Grob *e, SCM cause)
     {
       cause = m->to_event ()->unprotect ();
     }
-  if (unsmob_stream_event (cause) || unsmob_grob (cause))
+  if (e->get_property ("cause") == SCM_EOL
+      && (unsmob_stream_event (cause) || unsmob_grob (cause)))
     e->set_property ("cause", cause);
 
   Grob_info i (this, e);
index 32ad86a9eb7592fa42c428ee857f4a6d8399802c..782574e5e6e97a491a977379d6f76a556e5199ec 100644 (file)
@@ -362,7 +362,8 @@ Figured_bass_engraver::process_music ()
            {
              if (!group.continuation_line_)
                {
-                 Spanner * line = make_spanner ("BassFigureContinuation", SCM_EOL);
+                 Spanner * line
+                   = make_spanner ("BassFigureContinuation", SCM_EOL);
                  Item * item = group.figure_item_;
                  group.continuation_line_ = line;
                  line->set_bound (LEFT, item);
@@ -412,7 +413,8 @@ Figured_bass_engraver::process_music ()
 void
 Figured_bass_engraver::create_grobs () 
 {
-  Grob *muscol = dynamic_cast<Item*> (unsmob_grob (get_property ("currentMusicalColumn")));
+  Grob *muscol
+    = dynamic_cast<Item*> (unsmob_grob (get_property ("currentMusicalColumn")));
   if (!alignment_)
     {
       alignment_ = make_spanner ("BassFigureAlignment", SCM_EOL);
index 8fbcc99b46eee93fee36d5a3c1d3952e300ebbdf..03c992303d7377885eada7c6625cfb4ac1dc9f16 100644 (file)
@@ -54,7 +54,7 @@ LY_DEFINE (ly_make_global_translator, "ly:make-global-translator",
 LY_DEFINE (ly_make_global_context, "ly:make-global-context",
           1, 0, 0, (SCM output_def),
           "Set up a global interpretation context, using the output"
-          " block @var{output_def}.  The context is returned.\n")
+          " block @var{output_def}.  The context is returned.")
 {
   LY_ASSERT_SMOB (Output_def, output_def, 1);
   Output_def *odef = unsmob_output_def (output_def); 
index 78be89e399f147c6cefb42428e7896bd204308c9..9479f17f41179cb3fbdc3cf6769fb533ffbbde9a 100644 (file)
@@ -722,14 +722,11 @@ common_refpoint_of_list (SCM elist, Grob *common, Axis a)
 Grob *
 common_refpoint_of_array (vector<Grob*> const &arr, Grob *common, Axis a)
 {
-  for (vsize i = arr.size (); i--;)
-    if (Grob *s = arr[i])
-      {
-       if (common)
-         common = common->common_refpoint (s, a);
-       else
-         common = s;
-      }
+  for (vsize i = 0; i < arr.size (); i++)
+    if (common)
+      common = common->common_refpoint (arr[i], a);
+    else
+      common = arr[i];
 
   return common;
 }
index 80f836d5b1ff89f74c0d84aab425183f8b899141..60366a0630fa7ee51dab702fe2444b6df12cb1f1 100644 (file)
@@ -47,7 +47,6 @@ Hairpin::consider_suicide (Spanner*me)
       && ly_is_equal (bounds[RIGHT]->get_column ()->get_property ("when"),
                      bounds[LEFT]->get_property ("when")))
     me->suicide ();
-  
 }
 
 MAKE_SCHEME_CALLBACK (Hairpin, print, 1);
@@ -207,7 +206,6 @@ Hairpin::print (SCM smob)
   /*
     should do relative to staff-symbol staff-space?
   */
-
   Stencil mol;
   Real x = 0.0;
 
index 7db201bb0004f5fba9b6e7373a2125a04036d82c..373045bfca740cbf80023aad6c64a5a55e4e59f6 100644 (file)
@@ -20,6 +20,7 @@ public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_positions, (SCM));
   DECLARE_SCHEME_CALLBACK (brew_chord_bracket, (SCM));
+  DECLARE_SCHEME_CALLBACK (brew_chord_slur, (SCM));
   DECLARE_SCHEME_CALLBACK (width, (SCM));
   DECLARE_SCHEME_CALLBACK (height, (SCM));
   DECLARE_SCHEME_CALLBACK (pure_height, (SCM, SCM, SCM));
index 8de07c990bf4a316c9b9afbc292ff543de8f85af..e9a82a756b394d70952e356fb5d12a2ff2f95098 100644 (file)
@@ -154,6 +154,7 @@ class Simultaneous_music;
 class Simultaneous_music_iterator;
 class Skyline;
 class Skyline_entry;
+class Skyline_pair;
 class Slur_configuration;
 class Slur_score_state;
 class Source_file;
index b01fb4d42d6e8acc0ea9d389499c2c5f2ba037ca..feabb4cf784b47d6a4a25fc00c94b0dc7e1a82e3 100644 (file)
@@ -20,6 +20,7 @@
   formatted content of the grob is put into a
   Property_object. Page-breaking handles Property_object objects.
 */
+
 class Prob
 {
   DECLARE_SMOBS (Prob);
@@ -40,13 +41,17 @@ public:
   Prob (Prob const &);
   virtual string name () const;
   SCM type () const { return type_; }
-  SCM get_property_alist (bool mutble) const;
+  SCM get_property_alist (bool _mutable) const;
   SCM internal_get_property (SCM sym) const;
   void instrumented_set_property (SCM, SCM, const char*, int, const char*);
   void internal_set_property (SCM sym, SCM val);
 };
+
 DECLARE_UNSMOB(Prob,prob);
+
 SCM ly_prob_set_property_x (SCM system, SCM sym, SCM value);
 SCM ly_prob_property (SCM system, SCM sym, SCM dfault);
 
+SCM ly_prob_type_p (SCM obj, SCM sym);
+  
 #endif /* PROPERTY_OBJECT_HH */
diff --git a/lily/include/skyline-pair.hh b/lily/include/skyline-pair.hh
new file mode 100644 (file)
index 0000000..08fe3c7
--- /dev/null
@@ -0,0 +1,36 @@
+/* 
+  skyline-pair.hh -- declare Skyline_pair
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2008 Han-Wen Nienhuys <hanwen@lilypond.org>
+  
+*/
+
+#ifndef SKYLINE_PAIR_HH
+#define SKYLINE_PAIR_HH
+
+#include "skyline.hh"
+
+class Skyline_pair
+{
+private:
+  Drul_array<Skyline> skylines_;
+
+  DECLARE_SIMPLE_SMOBS(Skyline_pair);
+public:
+  Skyline_pair ();
+  Skyline_pair (vector<Box> const &boxes, Real horizon_padding, Axis a);
+  Skyline_pair (Box const &, Real horizon_padding, Axis a);
+  void raise (Real);
+  void shift (Real);
+  void insert (Box const &, Real horizon_padding, Axis);
+  void merge (Skyline_pair const &other);
+  Skyline &operator [] (Direction d);
+  Skyline const &operator [] (Direction d) const;
+  bool is_empty () const;
+  void print () const;
+  void print_points () const;
+};
+
+#endif /* SKYLINE_PAIR_HH */
index 5dadbacaf736f6503cf7e444c4bc448324556ad1..569d01f9c9ca11d59334845e0fe14858e5766713 100644 (file)
@@ -70,24 +70,7 @@ public:
   bool is_empty () const;
 };
 
-class Skyline_pair
-{
-private:
-  Drul_array<Skyline> skylines_;
-
-  DECLARE_SIMPLE_SMOBS(Skyline_pair);
-public:
-  Skyline_pair ();
-  Skyline_pair (vector<Box> const &boxes, Real horizon_padding, Axis a);
-  Skyline_pair (Box const &, Real horizon_padding, Axis a);
-  void raise (Real);
-  void shift (Real);
-  void insert (Box const &, Real horizon_padding, Axis);
-  void merge (Skyline_pair const &other);
-  Skyline &operator [] (Direction d);
-  Skyline const &operator [] (Direction d) const;
-  bool is_empty () const;
-};
+extern bool debug_skylines;
 
 #endif /* SKYLINE_HH */
 
index f0c82bb963dc31107129688f8440e6d88798bbb8..cf77c086c03066c55c9d2eeb16823f38e6e5c39e 100644 (file)
@@ -45,7 +45,6 @@ public:
   // todo: move to somewhere else.
   Real get_broken_left_end_align () const;
   void substitute_one_mutable_property (SCM sym, SCM val);
-  bool fast_substitute_grob_array (SCM sym, Grob_array *);
 
   Interval_t<Moment> spanned_time () const;
   virtual Interval_t<int> spanned_rank_interval () const;
@@ -69,6 +68,7 @@ protected:
   void set_my_columns ();
   virtual Grob *clone () const;
   virtual void do_break_processing ();
+  bool fast_substitute_grob_array (SCM sym, Grob_array *);
 };
 
 void add_bound_item (Spanner *, Grob *);
index 18b9127d1e83937c31f6395d504275117892c2a9..24402e56c56fcddce176339fa46d42d392e63540 100644 (file)
@@ -43,6 +43,7 @@ struct Tie_details
 
   int single_tie_region_size_;
   int multi_tie_region_size_;
+  Direction neutral_direction_;
   
   Tie_details ();
   void from_grob (Grob *);
index bf5d02d8b2876a2b1d154c2064cbab0f9d17bff9..c80fe02998b420660802cb8816d3ee5515daaecc 100644 (file)
@@ -97,13 +97,15 @@ Lyric_combine_music_iterator::set_music_context (Context *to)
 {
   if (music_context_)
     {
-      music_context_->event_source ()->remove_listener (GET_LISTENER (set_busy), ly_symbol2scm ("music-event"));
+      music_context_->event_source ()->
+       remove_listener (GET_LISTENER (set_busy), ly_symbol2scm ("music-event"));
     }
 
   music_context_ = to;
   if (to)
     {
-      to->event_source ()->add_listener (GET_LISTENER (set_busy), ly_symbol2scm ("music-event"));
+      to->event_source ()->add_listener (GET_LISTENER (set_busy),
+                                        ly_symbol2scm ("music-event"));
     }
 }
 
diff --git a/lily/new-dynamic-engraver.cc b/lily/new-dynamic-engraver.cc
new file mode 100644 (file)
index 0000000..990dba0
--- /dev/null
@@ -0,0 +1,223 @@
+/* 
+  new-dynamic-engraver.cc -- implement New_dynamic_engraver
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2008 Han-Wen Nienhuys <hanwen@lilypond.org>
+  
+*/
+
+
+#include "engraver.hh"
+
+#include "item.hh"
+#include "pointer-group-interface.hh"
+#include "text-interface.hh"
+#include "note-column.hh"
+#include "self-alignment-interface.hh"
+#include "spanner.hh"
+#include "stream-event.hh"
+
+#include "translator.icc"
+
+class New_dynamic_engraver : public Engraver
+{
+  TRANSLATOR_DECLARATIONS (New_dynamic_engraver);
+  DECLARE_ACKNOWLEDGER (note_column);
+  DECLARE_TRANSLATOR_LISTENER (absolute_dynamic);
+  DECLARE_TRANSLATOR_LISTENER (span_dynamic);
+
+protected:
+  virtual void process_music ();
+  virtual void stop_translation_timestep ();
+private:
+  Drul_array<Stream_event *> accepted_spanevents_drul_;
+  Spanner *current_spanner_;
+  Spanner *finished_spanner_;
+  
+  Item *script_;
+  Stream_event *script_event_;
+  Stream_event *current_span_event_;
+};
+
+New_dynamic_engraver::New_dynamic_engraver ()
+{
+  script_event_ = 0;
+  current_span_event_ = 0;
+  script_ = 0;
+  finished_spanner_ = 0;
+  current_spanner_ = 0;
+  accepted_spanevents_drul_.set (0, 0);
+}
+
+IMPLEMENT_TRANSLATOR_LISTENER (New_dynamic_engraver, absolute_dynamic);
+void
+New_dynamic_engraver::listen_absolute_dynamic (Stream_event *ev)
+{
+  ASSIGN_EVENT_ONCE (script_event_, ev);
+}
+
+IMPLEMENT_TRANSLATOR_LISTENER (New_dynamic_engraver, span_dynamic);
+void
+New_dynamic_engraver::listen_span_dynamic (Stream_event *ev)
+{
+  Direction d = to_dir (ev->get_property ("span-direction"));
+
+  ASSIGN_EVENT_ONCE (accepted_spanevents_drul_[d], ev);
+}
+
+
+void
+New_dynamic_engraver::process_music ()
+{
+  if (current_spanner_
+      && (accepted_spanevents_drul_[STOP] || script_event_ || accepted_spanevents_drul_[START]))
+    {
+      Stream_event* ender = accepted_spanevents_drul_[STOP];
+      if (!ender)
+       ender = script_event_;
+
+      if (!ender)
+       ender = accepted_spanevents_drul_[START];
+      
+      finished_spanner_ = current_spanner_;
+      announce_end_grob (finished_spanner_, ender->self_scm ());
+      current_spanner_ = 0;
+      current_span_event_ = 0;
+    }
+
+  if (accepted_spanevents_drul_[START])
+    {
+      current_span_event_ = accepted_spanevents_drul_[START];
+      
+      SCM start_sym = current_span_event_->get_property ("class");
+      string start_type;
+         
+      if (start_sym == ly_symbol2scm ("decrescendo-event"))
+       start_type = "decrescendo";
+      else if (start_sym == ly_symbol2scm ("crescendo-event"))
+       start_type = "crescendo";
+      else
+       {
+         programming_error ("unknown dynamic spanner type");
+         return;
+       }
+      
+      SCM cresc_type = get_property ((start_type + "Spanner").c_str ());
+
+      if (cresc_type == ly_symbol2scm ("text"))
+       {
+         current_spanner_
+           = make_spanner ("DynamicTextSpanner",
+                           accepted_spanevents_drul_[START]->self_scm ());
+
+         SCM text = get_property ((start_type + "Text").c_str ());
+         if (Text_interface::is_markup (text))
+           {
+             current_spanner_->set_property ("text", text);
+           }
+       }
+      else
+       {
+         if (cresc_type != ly_symbol2scm ("hairpin"))
+           {
+             // Fixme: should put value in error message.
+             ly_display_scm (cresc_type);
+             current_span_event_
+               ->origin()->warning ("unknown crescendo style; defaulting to hairpin.");
+           }
+         current_spanner_ = make_spanner ("Hairpin",
+                                          current_span_event_->self_scm ());
+         if (finished_spanner_)
+           {
+             Pointer_group_interface::add_grob (finished_spanner_,
+                                                ly_symbol2scm ("adjacent-hairpins"),
+                                                current_spanner_);
+
+             Pointer_group_interface::add_grob (current_spanner_,
+                                                ly_symbol2scm ("adjacent-hairpins"),
+                                                finished_spanner_);
+           }
+       }
+    }
+
+  if (script_event_)
+    {
+      script_ = make_item ("DynamicText", script_event_->self_scm ());
+      script_->set_property ("text",
+                            script_event_->get_property ("text"));
+
+      if (finished_spanner_)
+       finished_spanner_->set_bound (RIGHT, script_);
+      if (current_spanner_)
+       {
+         current_spanner_->set_bound (LEFT, script_);
+         set_nested_property (current_spanner_,
+                              scm_list_3 (ly_symbol2scm ("bound-details"),
+                                          ly_symbol2scm ("left"),
+                                          ly_symbol2scm ("attach-dir")
+                                          ),
+                              scm_from_int (RIGHT));
+
+       }
+    }
+}
+
+
+
+void
+New_dynamic_engraver::stop_translation_timestep ()
+{
+  if (finished_spanner_ && !finished_spanner_->get_bound (RIGHT))
+    finished_spanner_->set_bound (RIGHT,
+                                 unsmob_grob (get_property ("currentMusicalColumn")));
+
+  if (current_spanner_ && !current_spanner_->get_bound (LEFT))
+    current_spanner_->set_bound (LEFT,
+                                unsmob_grob (get_property ("currentMusicalColumn")));
+  script_ = 0;
+  script_event_ = 0;
+  accepted_spanevents_drul_.set (0, 0);
+  finished_spanner_ = 0;
+}
+
+void
+New_dynamic_engraver::acknowledge_note_column (Grob_info info)
+{
+  if (script_ && !script_->get_parent (X_AXIS))
+    {
+      extract_grob_set (info.grob (), "note-heads", heads);
+      if (heads.size ())
+       {
+         Grob *head = heads[0];
+         script_->set_parent (head, X_AXIS);
+         Self_alignment_interface::set_center_parent (script_, X_AXIS);
+       }
+    }
+
+  if (current_spanner_ && !current_spanner_->get_bound (LEFT))
+    current_spanner_->set_bound (LEFT, info.grob ());
+  if (finished_spanner_ && !finished_spanner_->get_bound (RIGHT))
+    finished_spanner_->set_bound (RIGHT, info.grob ());
+}
+
+ADD_ACKNOWLEDGER (New_dynamic_engraver, note_column);
+ADD_TRANSLATOR (New_dynamic_engraver,
+               /* doc */
+               "Create hairpins, dynamic texts, and their vertical"
+               " alignments.  The symbols are collected onto a"
+               " @code{DynamicLineSpanner} grob which takes care of vertical"
+               " positioning.",
+
+               /* create */
+               "DynamicTextSpanner "
+               "DynamicText "
+               "Hairpin "
+               "TextSpanner ",
+
+               /* read */
+               "currentMusicalColumn ",
+
+               /* write */
+               ""
+               );
index 8c9e0aea4eec10a8607358dc777557f795834a72..0eb40d1b97a48c8297ff378de172d65de6cd5072 100644 (file)
@@ -8,23 +8,24 @@
 
 #include "paper-column.hh"
 
-#include "break-align-interface.hh"
-#include "moment.hh"
-#include "paper-score.hh"
-#include "warn.hh"
 #include "axis-group-interface.hh"
-#include "spaceable-grob.hh"
-#include "text-interface.hh"
-#include "lookup.hh"
+#include "break-align-interface.hh"
 #include "font-interface.hh"
-#include "output-def.hh"
-#include "pointer-group-interface.hh"
 #include "grob-array.hh"
-#include "system.hh"
-#include "spring.hh"
 #include "lookup.hh"
+#include "lookup.hh"
+#include "moment.hh"
+#include "output-def.hh"
+#include "paper-score.hh"
+#include "pointer-group-interface.hh"
 #include "separation-item.hh"
+#include "skyline-pair.hh"
+#include "spaceable-grob.hh"
+#include "spring.hh"
 #include "string-convert.hh"
+#include "system.hh"
+#include "text-interface.hh"
+#include "warn.hh"
 
 Grob *
 Paper_column::clone () const
diff --git a/lily/paper-system-scheme.cc b/lily/paper-system-scheme.cc
new file mode 100644 (file)
index 0000000..6935110
--- /dev/null
@@ -0,0 +1,44 @@
+/* 
+  paper-system-scheme.cc -- implement Paper_system bindings.
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2008 Han-Wen Nienhuys <hanwen@lilypond.org>
+  
+*/
+
+#include "prob.hh"
+
+#include "skyline-pair.hh"
+  
+LY_DEFINE (ly_paper_system_p, "ly:paper-system?",
+         1, 0, 0, (SCM obj),
+         "Type predicate.")
+{
+  return ly_prob_type_p (obj, ly_symbol2scm ("paper-system"));
+}
+
+LY_DEFINE (ly_paper_system_minimum_distance, "ly:paper-system-minimum-distance",
+          2, 0, 0, (SCM sys1, SCM sys2),
+          "Measure the minimum distance between these two paper-systems,"
+          " using their stored skylines if possible and falling back to"
+          " their extents otherwise.")
+{
+  Real ret = 0;
+  Prob *p1 = unsmob_prob (sys1);
+  Prob *p2 = unsmob_prob (sys2);
+  Skyline_pair *sky1 = Skyline_pair::unsmob (p1->get_property ("vertical-skylines"));
+  Skyline_pair *sky2 = Skyline_pair::unsmob (p2->get_property ("vertical-skylines"));
+
+  if (sky1 && sky2)
+    ret = (*sky1)[DOWN].distance ((*sky2)[UP]);
+  else
+    {
+      Stencil *s1 = unsmob_stencil (p1->get_property ("stencil"));
+      Stencil *s2 = unsmob_stencil (p2->get_property ("stencil"));
+      Interval iv1 = s1->extent (Y_AXIS);
+      Interval iv2 = s2->extent (Y_AXIS);
+      ret = iv2[UP] - iv1[DOWN];
+    }
+  return scm_from_double (ret);
+}
index 8c5d640ad0d3b5d9501c57c8f800d723504df8b3..717e32a945985358af74ee08f379b372e4363294 100644 (file)
@@ -7,7 +7,6 @@
 */
 
 #include "prob.hh"
-#include "skyline.hh"
 
 LY_DEFINE (ly_prob_set_property_x, "ly:prob-set-property!",
           2, 1, 0, (SCM obj, SCM sym, SCM value),
@@ -77,35 +76,24 @@ LY_DEFINE (ly_make_prob, "ly:make-prob",
   return pr->unprotect ();
 }
 
-  
-LY_DEFINE (ly_paper_system_p, "ly:paper-system?",
-         1, 0, 0, (SCM obj),
-         "Type predicate.")
+
+LY_DEFINE (ly_prob_mutable_properties, "ly:prob-mutable-properties",
+          1, 0, 0,
+          (SCM prob),
+          "Retrieve an alist of mutable properties.")
 {
-  return ly_prob_type_p (obj, ly_symbol2scm ("paper-system"));
+  LY_ASSERT_SMOB (Prob, prob, 1);
+  Prob *ps = unsmob_prob (prob);
+  return ps->get_property_alist (true);
 }
 
-LY_DEFINE (ly_paper_system_minimum_distance, "ly:paper-system-minimum-distance",
-          2, 0, 0, (SCM sys1, SCM sys2),
-          "Measure the minimum distance between these two paper-systems,"
-          " using their stored skylines if possible and falling back to"
-          " their extents otherwise.")
+LY_DEFINE (ly_prob_immutable_properties, "ly:prob-immutable-properties",
+          1, 0, 0,
+          (SCM prob),
+          "Retrieve an alist of mutable properties.")
 {
-  Real ret = 0;
-  Prob *p1 = unsmob_prob (sys1);
-  Prob *p2 = unsmob_prob (sys2);
-  Skyline_pair *sky1 = Skyline_pair::unsmob (p1->get_property ("vertical-skylines"));
-  Skyline_pair *sky2 = Skyline_pair::unsmob (p2->get_property ("vertical-skylines"));
-
-  if (sky1 && sky2)
-    ret = (*sky1)[DOWN].distance ((*sky2)[UP]);
-  else
-    {
-      Stencil *s1 = unsmob_stencil (p1->get_property ("stencil"));
-      Stencil *s2 = unsmob_stencil (p2->get_property ("stencil"));
-      Interval iv1 = s1->extent (Y_AXIS);
-      Interval iv2 = s2->extent (Y_AXIS);
-      ret = iv2[UP] - iv1[DOWN];
-    }
-  return scm_from_double (ret);
+  LY_ASSERT_SMOB (Prob, prob, 1);
+  Prob *ps = unsmob_prob (prob);
+  return ps->get_property_alist (false);
 }
+
index 5c9eb9ef10439826317203c17eee4547fc60988e..a567f3c6bd50c336e56773b14209efeb2d81eb45 100644 (file)
@@ -8,15 +8,15 @@
 
 #include "separation-item.hh"
 
+#include "accidental-placement.hh"
 #include "axis-group-interface.hh"
 #include "lookup.hh"
 #include "note-head.hh"
-#include "stencil.hh"
-#include "skyline.hh"
 #include "paper-column.hh"
-#include "warn.hh"
 #include "pointer-group-interface.hh"
-#include "accidental-placement.hh"
+#include "skyline-pair.hh"
+#include "stencil.hh"
+#include "warn.hh"
 
 void
 Separation_item::add_item (Grob *s, Item *i)
@@ -137,7 +137,6 @@ Separation_item::boxes (Grob *me, Grob *left)
   return out;      
 }
 
-extern bool debug_skylines;
 MAKE_SCHEME_CALLBACK (Separation_item, print, 1)
 SCM
 Separation_item::print (SCM smob)
diff --git a/lily/skyline-pair.cc b/lily/skyline-pair.cc
new file mode 100644 (file)
index 0000000..100061a
--- /dev/null
@@ -0,0 +1,109 @@
+/* 
+  skyline-pair.cc -- implement Skyline_pair
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2008 Han-Wen Nienhuys <hanwen@lilypond.org>
+  
+*/
+
+#include "skyline-pair.hh"
+
+#include "ly-smobs.icc"
+
+Skyline_pair::Skyline_pair ()
+  : skylines_ (Skyline (DOWN), Skyline (UP))
+{
+}
+
+Skyline_pair::Skyline_pair (vector<Box> const &boxes, Real padding, Axis a)
+  : skylines_ (Skyline (boxes, padding, a, DOWN), Skyline (boxes, padding, a, UP))
+{
+}
+
+Skyline_pair::Skyline_pair (Box const &b, Real padding, Axis a)
+  : skylines_ (Skyline (b, padding, a, DOWN), Skyline (b, padding, a, UP))
+{
+}
+
+void
+Skyline_pair::raise (Real r)
+{
+  skylines_[UP].raise (r);
+  skylines_[DOWN].raise (r);
+}
+
+void
+Skyline_pair::shift (Real r)
+{
+  skylines_[UP].shift (r);
+  skylines_[DOWN].shift (r);
+}
+
+void
+Skyline_pair::insert (Box const &b, Real padding, Axis a)
+{
+  skylines_[UP].insert (b, padding, a);
+  skylines_[DOWN].insert (b, padding, a);
+}
+
+void
+Skyline_pair::merge (Skyline_pair const &other)
+{
+  skylines_[UP].merge (other[UP]);
+  skylines_[DOWN].merge (other[DOWN]);
+}
+
+void
+Skyline_pair::print () const
+{
+  skylines_[UP].print ();
+  skylines_[DOWN].print ();
+}
+
+void
+Skyline_pair::print_points () const
+{
+  skylines_[UP].print ();
+  skylines_[DOWN].print ();
+}
+
+
+bool
+Skyline_pair::is_empty () const
+{
+  return skylines_[UP].is_empty ()
+    && skylines_[DOWN].is_empty ();
+}
+
+Skyline&
+Skyline_pair::operator [] (Direction d)
+{
+  return skylines_[d];
+}
+
+Skyline const&
+Skyline_pair::operator [] (Direction d) const
+{
+  return skylines_[d];
+}
+
+IMPLEMENT_SIMPLE_SMOBS (Skyline_pair);
+IMPLEMENT_TYPE_P (Skyline_pair, "ly:skyline-pair?");
+IMPLEMENT_DEFAULT_EQUAL_P (Skyline_pair);
+
+SCM
+Skyline_pair::mark_smob (SCM)
+{
+  return SCM_EOL;
+}
+
+int
+Skyline_pair::print_smob (SCM s, SCM port, scm_print_state *)
+{
+  Skyline_pair *r = (Skyline_pair *) SCM_CELL_WORD_1 (s);
+  (void) r;
+
+  scm_puts ("#<Skyline-pair>", port);
+  return 1;
+}
index e0139a68668ecc46f4a7682bed85abb8812c1786..5297f6359ab91ea58642e9f552eca313031217ac 100644 (file)
@@ -541,67 +541,6 @@ Skyline::is_empty () const
   return b.end_ == infinity_f && b.y_intercept_ == -infinity_f;
 }
 
-Skyline_pair::Skyline_pair ()
-  : skylines_ (Skyline (DOWN), Skyline (UP))
-{
-}
-
-Skyline_pair::Skyline_pair (vector<Box> const &boxes, Real padding, Axis a)
-  : skylines_ (Skyline (boxes, padding, a, DOWN), Skyline (boxes, padding, a, UP))
-{
-}
-
-Skyline_pair::Skyline_pair (Box const &b, Real padding, Axis a)
-  : skylines_ (Skyline (b, padding, a, DOWN), Skyline (b, padding, a, UP))
-{
-}
-
-void
-Skyline_pair::raise (Real r)
-{
-  skylines_[UP].raise (r);
-  skylines_[DOWN].raise (r);
-}
-
-void
-Skyline_pair::shift (Real r)
-{
-  skylines_[UP].shift (r);
-  skylines_[DOWN].shift (r);
-}
-
-void
-Skyline_pair::insert (Box const &b, Real padding, Axis a)
-{
-  skylines_[UP].insert (b, padding, a);
-  skylines_[DOWN].insert (b, padding, a);
-}
-
-void
-Skyline_pair::merge (Skyline_pair const &other)
-{
-  skylines_[UP].merge (other[UP]);
-  skylines_[DOWN].merge (other[DOWN]);
-}
-
-bool
-Skyline_pair::is_empty () const
-{
-  return skylines_[UP].is_empty ()
-    && skylines_[DOWN].is_empty ();
-}
-
-Skyline&
-Skyline_pair::operator [] (Direction d)
-{
-  return skylines_[d];
-}
-
-Skyline const&
-Skyline_pair::operator [] (Direction d) const
-{
-  return skylines_[d];
-}
 
 /****************************************************************/
 
@@ -610,10 +549,6 @@ IMPLEMENT_SIMPLE_SMOBS (Skyline);
 IMPLEMENT_TYPE_P (Skyline, "ly:skyline?");
 IMPLEMENT_DEFAULT_EQUAL_P (Skyline);
 
-IMPLEMENT_SIMPLE_SMOBS (Skyline_pair);
-IMPLEMENT_TYPE_P (Skyline_pair, "ly:skyline-pair?");
-IMPLEMENT_DEFAULT_EQUAL_P (Skyline_pair);
-
 SCM
 Skyline::mark_smob (SCM)
 {
@@ -631,19 +566,3 @@ Skyline::print_smob (SCM s, SCM port, scm_print_state *)
 
   return 1;
 }
-
-SCM
-Skyline_pair::mark_smob (SCM)
-{
-  return SCM_EOL;
-}
-
-int
-Skyline_pair::print_smob (SCM s, SCM port, scm_print_state *)
-{
-  Skyline_pair *r = (Skyline_pair *) SCM_CELL_WORD_1 (s);
-  (void) r;
-
-  scm_puts ("#<Skyline-pair>", port);
-  return 1;
-}
index 2033cfcac43898dfc6b68e3dbb87d6aca6847501..d494c318c5ef820ca7759264c30c9a0f880c3842 100644 (file)
@@ -17,6 +17,7 @@
 #include "paper-column.hh"
 #include "separation-item.hh"
 #include "skyline.hh"
+#include "skyline-pair.hh"
 #include "system.hh"
 
 /* return the right-pointing skyline of the left-items and the left-pointing
index e580e33267cda1879fa665b22c7d2aaa0c4820dd..74e54e7eac7d308672ecb44e73e8704c37244656 100644 (file)
@@ -21,6 +21,7 @@
 #include "paper-score.hh"
 #include "pointer-group-interface.hh"
 #include "separation-item.hh"
+#include "skyline-pair.hh"
 #include "spaceable-grob.hh"
 #include "spacing-interface.hh"
 #include "staff-spacing.hh"
index a2ad71ece35dc8cb8df9e1c4e1b691972b4faa5a..e686e3b58cad0585e3ea7303686e50bfeb5e13aa 100644 (file)
 #include "axis-group-interface.hh"
 #include "grob-array.hh"
 #include "international.hh"
+#include "lookup.hh"
 #include "main.hh"
 #include "output-def.hh"
 #include "paper-column.hh"
 #include "paper-score.hh"
 #include "paper-system.hh"
 #include "pointer-group-interface.hh"
+#include "skyline-pair.hh"
 #include "staff-symbol-referencer.hh"
 #include "warn.hh"
-#include "lookup.hh"
-
-extern bool debug_skylines;
 
 System::System (System const &src)
   : Spanner (src)
@@ -395,8 +394,12 @@ System::get_paper_system ()
       Skyline_pair *skylines = Skyline_pair::unsmob (get_property ("vertical-skylines"));
       if (skylines)
        {
-         sys_stencil.add_stencil (Lookup::points_to_line_stencil (0.1, (*skylines)[UP].to_points (X_AXIS)).in_color (255, 0, 0));
-         sys_stencil.add_stencil (Lookup::points_to_line_stencil (0.1, (*skylines)[DOWN].to_points (X_AXIS)).in_color (0, 255, 0));
+         Stencil up
+           = Lookup::points_to_line_stencil (0.1, (*skylines)[UP].to_points (X_AXIS));
+         Stencil down
+           = Lookup::points_to_line_stencil (0.1, (*skylines)[DOWN].to_points (X_AXIS));
+         sys_stencil.add_stencil (up.in_color (255, 0, 0));
+         sys_stencil.add_stencil (down.in_color (0, 255, 0));
        }
     }
 
index 7c39b1c717cf20bbca5c7fbf8f7b7e10dc32623a..75a32d5bb78a1aabc584815851d73442ddc80595 100644 (file)
@@ -28,7 +28,10 @@ Tie_details::from_grob (Grob *me)
 {
   staff_symbol_referencer_ = me;
   staff_space_ = Staff_symbol_referencer::staff_space (me);
-
+  
+  neutral_direction_ = to_dir (me->get_property ("neutral-direction"));
+  if (!neutral_direction_)
+    neutral_direction_ = DOWN;
   
   SCM details = me->get_property ("details");
 
index bb50c4fbc18c1cfb9cee8be9fbb49e9c54b3b443..6aa5feb3b1b04e139db3829810472c3590e58581 100644 (file)
@@ -977,7 +977,8 @@ Tie_formatting_problem::set_ties_config_standard_directions (Ties_configuration
        tie_configs->at (0).dir_ = Direction (sign (tie_configs->at (0).position_));
 
       if (!tie_configs->at (0).dir_)
-       tie_configs->at (0).dir_ = DOWN;
+       tie_configs->at (0).dir_
+         = (tie_configs->size() > 1) ? DOWN : details_.neutral_direction_;
     }
   
   if (!tie_configs->back ().dir_)
index aa265f504236aee5c4465eeec693610a247f9add..980484d21bcdaed4b0345b1fdee3f5891f5a7ffa 100644 (file)
@@ -17,6 +17,7 @@
 #include "note-head.hh"
 #include "output-def.hh"
 #include "paper-column.hh"
+#include "pointer-group-interface.hh"
 #include "rhythmic-head.hh"
 #include "spanner.hh"
 #include "staff-symbol-referencer.hh"
@@ -113,7 +114,11 @@ Tie::get_default_dir (Grob *me)
   Direction d = LEFT;
   do
     {
-      Grob *stem = head (me, d) ? Rhythmic_head::get_stem (head (me, d)) : 0;
+      Grob *one_head = head (me, d);
+      if (!one_head && dynamic_cast<Spanner*> (me)) 
+       one_head = Tie::head (dynamic_cast<Spanner*> (me)->broken_neighbor (d), d);
+      
+      Grob *stem = one_head ? Rhythmic_head::get_stem (one_head) : 0;
       if (stem)
        stem = Stem::is_invisible (stem) ? 0 : stem;
 
@@ -135,7 +140,7 @@ Tie::get_default_dir (Grob *me)
   else if (int p = get_position (me))
     return Direction (sign (p));
   
-  return UP;
+  return to_dir (me->get_property("neutral-direction"));
 }
 
 
@@ -218,6 +223,14 @@ Tie::calc_control_points (SCM smob)
       //      && unsmob_grob_array (yparent->get_object ("ties"))->size () > 1
       )
     {
+      extract_grob_set (yparent, "ties", ties);
+      if (ties.size() == 1
+         && !to_dir (me->get_property_data ("direction")))
+       {
+         assert (ties[0] == me);
+         set_grob_direction (me, Tie::get_default_dir (me));
+       }
+      
       /* trigger positioning. */
       (void) yparent->get_property ("positioning-done");
     }
@@ -310,10 +323,11 @@ ADD_INTERFACE (Tie,
               "dash-period "
               "details "
               "direction "
-              "separation-item "
               "head-direction "
               "line-thickness "
+              "neutral-direction "
               "quant-score "
+              "separation-item "
               "staff-position "
               "thickness "
               );
index c2239ec05424d3816f086e3296d4ffe5ea7a4de6..480a1ad6dc8551b8a629fc0eab5602c149549ebe 100644 (file)
@@ -222,7 +222,9 @@ multiple voices on the same staff."
   \consists "Part_combine_engraver"
 
   \consists "Text_engraver"
-  \consists "Dynamic_engraver"
+  \consists "New_dynamic_engraver"
+  \consists "Dynamic_align_engraver"
+%  \consists "Dynamic_engraver"
   \consists "Fingering_engraver"
   \consists "Bend_engraver"
 
@@ -505,6 +507,9 @@ automatically when an output definition (a @code{\score} or
   middleCClefPosition = #-6
   middleCPosition = #-6
   firstClef = ##t
+
+  crescendoSpanner = #'hairpin
+  decrescendoSpanner = #'hairpin
   
   defaultBarType = #"|"
   barNumberVisibility = #first-bar-number-invisible
index 60989ede0cd2ed21a70613b7cbe4060d62f4f90a..1425b22b14954315deea2483a50c4b3a110e737e 100644 (file)
@@ -51,31 +51,38 @@ endcresc =  {
 
 setTextCresc = {
     \set crescendoText = \markup { \italic "cresc." }
-    \set crescendoSpanner = #'dashed-line
+    \set crescendoSpanner = #'text
+    \override DynamicTextSpanner #'style = #'dashed-line
 }
 
 setTextDecresc = {
     \set decrescendoText = \markup { \italic "decresc." }
-    \set decrescendoSpanner = #'dashed-line
+    \set decrescendoSpanner = #'text
+    \override DynamicTextSpanner #'style = #'dashed-line
 }
 
 setTextDecr = {
     \set decrescendoText = \markup { \italic "decr." }
-    \set decrescendoSpanner = #'dashed-line
+    \set decrescendoSpanner = #'text
+    \override DynamicTextSpanner #'style = #'dashed-line
 }
 
 setTextDim = {
     \set decrescendoText = \markup { \italic "dim." }
-    \set decrescendoSpanner = #'dashed-line
+    \set decrescendoSpanner = #'text
+    \override DynamicTextSpanner #'style = #'dashed-line
 }
+
 setHairpinCresc = {
     \unset crescendoText 
     \unset crescendoSpanner 
 }
+
 setHairpinDecresc = {
     \unset decrescendoText 
     \unset decrescendoSpanner 
 }
+
 setHairpinDim = {
     \unset decrescendoText 
     \unset decrescendoSpanner 
index e506ed24fea8a978dffb9be277b99910a9374c92..f656942b1630e769a87b4f549201e2271bc7b56c 100644 (file)
@@ -148,6 +148,7 @@ Values of 7 and -7 are common.")
      (clefPosition ,number? "Where should the center of the clef
 symbol go, measured in half staff spaces from the center of the
 staff.")
+     (completionBusy ,boolean? "Whether a completion-note head is playing.")
      (connectArpeggios ,boolean? "If set, connect arpeggios across
 piano staff.")
      (countPercentRepeats ,boolean? "If set, produce counters for
@@ -581,4 +582,4 @@ and subscripts.  See @file{scm/script.scm} for more information.")
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (define-public default-melisma-properties
-  '(melismaBusy slurMelismaBusy tieMelismaBusy beamMelismaBusy))
+  '(melismaBusy slurMelismaBusy tieMelismaBusy beamMelismaBusy completionBusy))
index 652a1392437143ba68ba4fc2d07c696ad9de5673..94e30465e9b7f36b09c88cd0ef45fe65636a1eb8 100644 (file)
        (springs-and-rods . ,ly:spanner::set-spacing-rods)
        (avoid-slur . inside)
        (direction . ,ly:tie::calc-direction)
+       (neutral-direction . ,UP)
        (stencil . ,ly:tie::print)
        (font-size . -6)
        (details . (
index 1e7c524241141b0c4ab6e8dff817a59b077b0544..c700f190dbc5f287b2999a6047be3c436e733d0a 100644 (file)
@@ -340,7 +340,18 @@ i.e.  this is not an override"
              'grob-property gprop))
 
 (define direction-polyphonic-grobs
-  '(Stem Tie Rest Slur PhrasingSlur Script TextScript Dots DotColumn Fingering))
+  '(DotColumn
+    Dots
+    Fingering
+    LaissezVibrerTie
+    PhrasingSlur
+    RepeatTie
+    Rest
+    Script
+    Slur
+    Stem
+    TextScript
+    Tie))
 
 (define-safe-public (make-voice-props-set n)
   (make-sequential-music