la nostra comunitat, l'Informe LilyPond:
@example
-@uref{http://news.lilynet.net}
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net}
@end example
@subsubheading Llista de correu de llançaments: @code{info-lilypond@@gnu.org}
@item
Juny de 2009
-A un @uref{http://news.lilynet.net/Free-Music-Now, article}
+A un @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/Free-Music-Now, article}
publicat a la revista anual de la @emph{Associació Nacional de
Pares d'Alumnes de Conservatoris} de França, el compositor i
membre del projecte LilyPond, Valentin Villenave, explica com les
@newsItem
@subsubheading El LilyPond Report #28. @emph{12 de novembre de 2012}
-L'informe @uref{http://news.lilynet.net/?The-LilyPond-Report-28,
+L'informe @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-28,
número d'octubre del @emph{LilyPond Report}} es focalitza en la
-@uref{http://news.lilynet.net/?LilyPond-meeting-in-Waltrop,
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?LilyPond-meeting-in-Waltrop,
reunió l'últim agost de desenvolupadors i usuaris del LilyPond} a
Waltrop, Alemanya. Òbviament, hi ha també alguns enraonaments
sobre el LilyPond causats pel llançament de les versions 2.16.0 i
També hi ha dos informes financers mensuals de David Kastrup, atès
que la seva feina sobre el LilyPond és
-@uref{http://news.lilynet.net/?The-LilyPond-Report-24#an_urgent_request_for_funding,
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-24#an_urgent_request_for_funding,
pagat exclusivament per} contribucions financeres d'altres
desenvolupadors i usuaris (gràcies!), i un informa sobre les
experiències de
@uref{http://scorio.com, un servei de gravat musical basat en la
web} que usa el LilyPond internament.
-@uref{http://news.lilynet.net/?The-LilyPond-Report-28, Llegiu el
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-28, Llegiu el
LilyPond Report 28} ara; els comentaris i les contribucions són
molt benvinguts!
@newsEnd
constructs.
@item
-The @code{NullVoice} context is now @q{below} @code{Score}.
-
-@item
-A new command @code{\tagGroup} has now been added. This compliments
+A new command @code{\tagGroup} has now been added. This complements
the existing @code{\keepWithTag} and @code{\removeWithTag} commands.
For Example:
@example
@uref{http://lists.gnu.org/archive/html/lilypond-devel/2010-09/msg00178.html}
-@uref{http://news.lilynet.net/spip.php?article121}
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/spip.php?article121}
@uref{http://lists.gnu.org/archive/html/lilypond-devel/2010-11/msg00076.html}
@end example
@lilypond[quote,verbatim,ragged-right]
\relative {
\key g \major
- % Voice "1" Voice "2"
+ % Voice = "1" Voice = "2"
<< { g'4 fis8( g) a4 g } \\ { d4 d d d } >>
}
@end lilypond
@lilypond[quote,verbatim,ragged-right,relative=2]
\key d \minor
-% Voice "1" Voice "2"
+% Voice = "1" Voice = "2"
<< { r4 g g4. a8 } \\ { d,2 d4 g } >>
<< { bes4 bes c bes } \\ { g4 g g8( a) g4 } >>
<< { a2. r4 } \\ { fis2. s4 } >>
@lilypond[quote,verbatim,ragged-right]
<<
\key d \minor
- \relative { % Voice "1"
+ \relative { % Voice = "1"
r4 g' g4. a8 |
bes4 bes c bes |
a2. r4 |
} \\
- \relative { % Voice "2"
+ \relative { % Voice = "2"
d'2 d4 g |
g4 g g8( a) g4 |
fis2. s4 |
\new Staff \relative {
% Main voice
c'16 d e f
- % Voice "1" Voice "2" Voice "3"
+ % Voice = "1" Voice = "2" Voice = "3"
<< { g4 f e } \\ { r8 e4 d c8~ } >> |
<< { d2 e } \\ { c8 b16 a b8 g~ 2 } \\ { s4 b c2 } >> |
}
našeho společenství: LilyPond Reportu (v angličtině).
@example
-@uref{http://news.lilynet.net}
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net}
@end example
@subsubheading Poštovní seznam pro nové verze: @code{info-lilypond@@gnu.org}
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.19.21"
+@c \version "2.19.24"
@c Translators: Till Paala
<d f g>4
\once \override NoteHead.style = #'cross
<d f g>4
- \applyOutput #'Voice #mc-squared
+ \applyOutput Voice #mc-squared
<d f g>4
<<
{ d8[ es-( fis^^ g] fis2-) }
- \repeat unfold 5 { \applyOutput #'Voice #mc-squared s8 }
+ \repeat unfold 5 { \applyOutput Voice #mc-squared s8 }
>>
}
@end lilypond
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.19.22"
+@c \version "2.19.24"
@c Translators: Till Paala
(set! (ly:grob-property grob 'transparent) #t)))
\relative {
- a'4 e8 <<\applyOutput #'Voice #blanker a c d>> b2
+ a'4 e8 <<\applyOutput Voice #blanker a c d>> b2
}
@end lilypond
@lilypond[quote,verbatim,ragged-right]
\relative {
\key g \major
- % Voice "1" Voice "2"
+ % Voice = "1" Voice = "2"
<< { g'4 fis8( g) a4 g } \\ { d4 d d d } >>
}
@end lilypond
@lilypond[quote,verbatim,ragged-right,relative=2]
\key d \minor
-% Voice "1" Voice "2"
+% Voice = "1" Voice = "2"
<< { r4 g g4. a8 } \\ { d,2 d4 g } >>
<< { bes4 bes c bes } \\ { g4 g g8( a) g4 } >>
<< { a2. r4 } \\ { fis2. s4 } >>
@lilypond[quote,verbatim,ragged-right]
<<
\key d \minor
- \relative { % Voice "1"
+ \relative { % Voice = "1"
r4 g' g4. a8 |
bes4 bes c bes |
a2. r4 |
} \\
- \relative { % Voice "2"
+ \relative { % Voice = "2"
d'2 d4 g |
g4 g g8( a) g4 |
fis2. s4 |
\new Staff \relative {
% Main voice
c'16 d e f
- % Voice "1" Voice "2" Voice "3"
+ % Voice = "1" Voice = "2" Voice = "3"
<< { g4 f e } \\ { r8 e4 d c8~ } >> |
<< { d2 e } \\ { c8 b16 a b8 g~ 2 } \\ { s4 b c2 } >> |
}
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.19.22"
+@c \version "2.19.24"
@c Translators: Till Paala
interpretiert wird, muss folgende Form benutzt werden:
@example
-\applyOutput #'Score #@var{Funktion}
-\applyOutput #'Staff #@var{Funktion}
+\applyOutput Score #@var{Funktion}
+\applyOutput Staff #@var{Funktion}
@end example
@end itemize
unserer Gemeinschaft zu lesen, den LilyPond Report (auf Englisch).
@example
-@uref{http://news.lilynet.net}
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net}
@end example
@subsubheading Mailingliste für neue Versionen: @code{info-lilypond@@gnu.org}
@item
June 2009
-In einem @uref{http://news.lilynet.net/Free-Music-Now, Artikel}
+In einem @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/Free-Music-Now, Artikel}
in der Jahreszeitschrift der @emph{National Conservatory Parent
Association} erklärt der französischer Komponist und LilyPond-Mitarbeiter
Valentin Villenave wie freie Lizenzen und insbesondere mit LilyPond
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.19.21"
+@c \version "2.19.24"
@node Grabado musical
@chapter Grabado musical
<d f g>4
\once \override NoteHead.style = #'cross
<d f g>4
- \applyOutput #'Voice #mc-squared
+ \applyOutput Voice #mc-squared
<d f g>4
<<
{ d8[ es-( fis^^ g] fis2-) }
- \repeat unfold 5 { \applyOutput #'Voice #mc-squared s8 }
+ \repeat unfold 5 { \applyOutput Voice #mc-squared s8 }
>>
}
@end lilypond
version that you are working on. See TRANSLATION for details.
@end ignore
-@c \version "2.19.22"
+@c \version "2.19.24"
@node Interfaces para programadores
@chapter Interfaces para programadores
(set! (ly:grob-property grob 'transparent) #t)))
\relative {
- a'4 e8 <<\applyOutput #'Voice #blanker a c d>> b2
+ a'4 e8 <<\applyOutput Voice #blanker a c d>> b2
}
@end lilypond
utilice estas formas:
@example
-\applyOutput #'Score #@var{función}
-\applyOutput #'Staff #@var{función}
+\applyOutput Score #@var{función}
+\applyOutput Staff #@var{función}
@end example
@lilypond[quote,verbatim,ragged-right]
\relative {
\key g \major
- % Voice "1" Voice "2"
+ % Voice = "1" Voice = "2"
<< { g'4 fis8( g) a4 g } \\ { d4 d d d } >>
}
@end lilypond
@lilypond[quote,verbatim,ragged-right]
\relative {
\key d \minor
- % Voice "1" Voice "2"
+ % Voice = "1" Voice = "2"
<< { r4 g' g4. a8 } \\ { d,2 d4 g } >> |
<< { bes4 bes c bes } \\ { g4 g g8( a) g4 } >> |
<< { a2. r4 } \\ { fis2. s4 } >> |
@lilypond[quote,verbatim,ragged-right]
<<
\key d \minor
- \relative { % Voice "1"
+ \relative { % Voice = "1"
r4 g' g4. a8 |
bes4 bes c bes |
a2. r4 |
} \\
- \relative { % Voice "2"
+ \relative { % Voice = "2"
d'2 d4 g |
g4 g g8( a) g4 |
fis2. s4 |
\new Staff \relative {
% Main voice
c'16 d e f
- % Voice "1" Voice "2" Voice "3"
+ % Voice = "1" Voice = "2" Voice = "3"
<< { g4 f e } \\ { r8 e4 d c8~ } >> |
<< { d2 e } \\ { c8 b16 a b8 g~ 2 } \\ { s4 b c2 } >> |
}
comunidad, el Informe LilyPond:
@example
-@uref{http://news.lilynet.net}
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net}
@end example
@subsubheading Lista de correo de lanzamientos: @code{info-lilypond@@gnu.org}
@item
Junio de 2009
-En un @uref{http://news.lilynet.net/Free-Music-Now, artículo}
+En un @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/Free-Music-Now, artículo}
publicado en la revista anual de la @emph{Asociación Nacional de
Padres de Alumnos de Conservatorios} de Francia, el compositor y
miembro del proyecto LilyPond, Valentin Villenave, explica cómo las
@newsItem
@subsubheading El Informe LilyPond, número 28. @emph{12 de noviembre de 2012}
-La @uref{http://news.lilynet.net/?The-LilyPond-Report-28, edición
+La @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-28, edición
de octubre del @emph{Informe LilyPond}} se centra en el
-@uref{http://news.lilynet.net/?LilyPond-meeting-in-Waltrop,
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?LilyPond-meeting-in-Waltrop,
encuentro de usuarios y desarrolladores de LilyPond} en Waltrop
(Alemania), el mes de agosto pasado. Por supuesto que también hay
noticias de LilyPond producidas a raíz del lanzamiento de las
También incluyen dos informes financieros mensuales por parte de
David Kastrup cuyo trabajo en LilyPond está
-@uref{http://news.lilynet.net/?The-LilyPond-Report-24#an_urgent_request_for_funding,
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-24#an_urgent_request_for_funding,
exclusivamente pagado} por las donaciones de otros desarrolladores
y usuarios (¡gracias!), y un informe acerca de las experiencias
con @uref{http://scorio.com, un servicio web de tipografía
musical} que utiliza LilyPond internamente.
-Acérquese y @uref{http://news.lilynet.net/?The-LilyPond-Report-28,
+Acérquese y @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-28,
lea ya el Informe LilyPond número 28}; ¡todos los comentarios y
aportaciones serán calurosamente bien recibidos!
@newsEnd
sobre ciertos proyectos poco conocidos colaterales a LilyPond, y
algunas otras noticias más ligeras.
-Acérquese y @uref{http://news.lilynet.net/?The-LilyPond-Report-27,
+Acérquese y @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-27,
lea ya el Informe LilyPond número 27}; ¡todos los comentarios y
aportaciones serán calurosamente bien recibidos!
salida de LilyPond; vea por sí mismo cuán cerca (¿o cuán lejos?)
estamos de igualar la calidad de las partituras grabadas a mano.
-Acérquese y @uref{http://news.lilynet.net/?The-LilyPond-Report-26,
+Acérquese y @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-26,
lea ya el Informe LilyPond número 26}; ¡todos los comentarios y
aportaciones serán calurosamente bien recibidos!
Warchoł! También incluimos en esta edición algunos elementos
inesperados, entre ellos (y no solamente)… ¡una receta de cocina!
-Acérquese al @uref{http://news.lilynet.net/?The-LilyPond-Report-25,
+Acérquese al @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-25,
Informe LilyPond 25} y léalo ahora mismo; ¡animamos calurosamente a
todos a que hagan sus comentarios y contribuciones!
gramática de LilyPond, y una panorámica de las aplicaciones de web
basadas en LilyPond.
-Acérquese al @uref{http://news.lilynet.net/?The-LilyPond-Report-24,
+Acérquese al @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-24,
Informe LilyPond 24} y léalo ahora mismo; ¡animamos calurosamente a
todos a que hagan sus comentarios y contribuciones!
así como una entrevista con el colaborador de LilyPond y compositor
Mike Solomon.
-Acérquese al @uref{http://news.lilynet.net/?The-LilyPond-Report-23,
+Acérquese al @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-23,
Informe LilyPond 23} y léalo ahora mismo; ¡animamos calurosamente a
todos a que hagan sus comentarios y contribuciones!
@strong{Jan Nieuwenhuizen}, que ha estado muy ocupado los últimos meses:
¡dispóngase a leer en qué!
-Acérquese al @uref{http://news.lilynet.net/The-LilyPond-Report-22,
+Acérquese al @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-22,
Informe LilyPond 22} y léalo ahora mismo; ¡animamos calurosamente a
todos a que hagan sus comentarios y contribuciones!
las acostumbradas notas de lanzamientos, el fragmento de código del
día y las noticias que nos llegan de la charca de las ranas.
-Acérquese al @uref{http://news.lilynet.net/The-LilyPond-Report-21,
+Acérquese al @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-21,
Informe LilyPond 21} y léalo ahora mismo; ¡animamos calurosamente a
todos a que hagan sus comentarios y contribuciones!
notas de lanzamientos, el fragmento de código del día, noticias desde
la charca de las ranas y el informe de fallos del día.
-Acérquese al @uref{http://news.lilynet.net/The-LilyPond-Report-20,
+Acérquese al @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-20,
Informe LilyPond 20} y léalo ahora mismo; ¡animamos calurosamente a
todos a que hagan sus comentarios y contribuciones!
@newsEnd
código del día, noticias desde la charca de las ranas, y el informe de
fallo del día.
-Acérquese al @uref{http://news.lilynet.net/The-LilyPond-Report-19,
+Acérquese al @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-19,
Informe LilyPond 19} y léalo ahora mismo; ¡animamos calurosamente a
todos a que hagan sus comentarios y contribuciones!
@newsEnd
bolsas de papel y pentagramas terminados en zigzag, además de las
secciones habituales Ranas y Bichos.
-Acérquese al @uref{http://news.lilynet.net/The-LilyPond-Report-18,
+Acérquese al @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-18,
Informe LilyPond 18} y léalo ahora mismo; ¡animamos calurosamente a
todos a que hagan sus comentarios y contribuciones!
@newsEnd
Frescobaldi!
¿A qué espera? Acérquese y
-¡@uref{http://news.lilynet.net/The-LilyPond-Report-17, lea el Informe
+¡@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-17, lea el Informe
LilyPond número 17} (en inglés) ahora mismo!
@newsEnd
The LilyPond Report is back! This short, informal opinion column is
about the LilyPond project: its team, its world, its community.
-Read @uref{http://news.lilynet.net/The-LilyPond-Report-16, issue 16}
+Read @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-16, issue 16}
now!
@newsEnd
The @emph{LilyPond Report} is a short, informal opinion column about the LilyPond project:
its team, its world, its community.
-Follow @uref{http://news.lilynet.net/The-LilyPond-Report-15,this link}
+Follow @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-15,this link}
to read the full issue...
@newsEnd
The @emph{LilyPond Report} is back, on a new website!
This short, informal, weekly opinion column is about the LilyPond project: its team, its world, its community.
-Follow @uref{http://news.lilynet.net/The-LilyPond-Report-14,this link} to read the full issue...
+Follow @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-14,this link} to read the full issue...
@newsEnd
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.19.21"
+@c \version "2.19.24"
@node Music engraving
@chapter Music engraving
<d f g>4
\once \override NoteHead.style = #'cross
<d f g>4
- \applyOutput #'Voice #mc-squared
+ \applyOutput Voice #mc-squared
<d f g>4
<<
{ d8[ es-( fis^^ g] fis2-) }
- \repeat unfold 5 { \applyOutput #'Voice #mc-squared s8 }
+ \repeat unfold 5 { \applyOutput Voice #mc-squared s8 }
>>
}
@end lilypond
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.19.22"
+@c \version "2.19.24"
@node Interfaces for programmers
@chapter Interfaces for programmers
The most versatile way of tuning an object is @code{\applyOutput} which
works by inserting an event into the specified context
-(@rinternals{ApplyOutputEvent}). Its syntax is
+(@rinternals{ApplyOutputEvent}). Its syntax is either
@example
\applyOutput @var{Context} @var{proc}
@end example
+or
+@example
+\applyOutput @var{Context}.@var{Grob} @var{proc}
+@end example
@noindent
where @code{@var{proc}} is a Scheme function, taking three arguments.
When interpreted, the function @code{@var{proc}} is called for
-every layout object found in the context @code{@var{Context}} at
-the current time step, with the following arguments:
+every layout object (with grob name @var{Grob} if specified) found
+in the context @code{@var{Context}} at the current time step, with
+the following arguments:
@itemize
@item the layout object itself,
@item the context where the layout object was created, and
@lilypond[quote,verbatim,ragged-right]
#(define (blanker grob grob-origin context)
- (if (and (memq 'note-head-interface (ly:grob-interfaces grob))
- (< (abs (ly:grob-property grob 'staff-position)) 2))
+ (if (< (abs (ly:grob-property grob 'staff-position)) 2)
(set! (ly:grob-property grob 'transparent) #t)))
\relative {
- a'4 e8 <<\applyOutput #'Voice #blanker a c d>> b2
+ a'4 e8 <<\applyOutput Voice.NoteHead #blanker a c d>> b2
}
@end lilypond
level use these forms
@example
-\applyOutput #'Score #@var{function}
-\applyOutput #'Staff #@var{function}
+\applyOutput Score@dots{}
+\applyOutput Staff@dots{}
@end example
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.19.21"
+@c \version "2.19.24"
@c Translators: Jean-Charles Malahieude, John Mandereau, Gauvain Pocentek
<d f g>4
\once \override NoteHead.style = #'cross
<d f g>4
- \applyOutput #'Voice #mc-squared
+ \applyOutput Voice #mc-squared
<d f g>4
<<
{ d8[ es-( fis^^ g] fis2-) }
- \repeat unfold 5 { \applyOutput #'Voice #mc-squared s8 }
+ \repeat unfold 5 { \applyOutput Voice #mc-squared s8 }
>>
}
@end lilypond
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.19.22"
+@c \version "2.19.24"
@c Translators: Valentin Villenave, Jean-Charles Malahieude
@c Translation checkers: Gilles Thibault
(set! (ly:grob-property grob 'transparent) #t)))
\relative {
- a'4 e8 <<\applyOutput #'Voice #blanker a c d>> b2
+ a'4 e8 <<\applyOutput Voice #blanker a c d>> b2
}
@end lilypond
des syntaxes
@example
-\applyOutput #'Score #@var{procédure}
-\applyOutput #'Staff #@var{procédure}
+\applyOutput Score #@var{procédure}
+\applyOutput Staff #@var{procédure}
@end example
@lilypond[quote,verbatim,ragged-right]
\relative {
\key g \major
- % Voice "1" Voice "2"
+ % Voice = "1" Voice = "2"
<< { g'4 fis8( g) a4 g } \\ { d4 d d d } >>
}
@end lilypond
Autre exemple :
-@lilypond[quote,verbatim,ragged-right]
-\relative {
- \key d \minor
- % Voice "1" Voice "2"
- << { r4 g' g4. a8 } \\ { d,2 d4 g } >> |
- << { bes4 bes c bes } \\ { g4 g g8( a) g4 } >> |
- << { a2. r4 } \\ { fis2. s4 } >> |
-}
+@lilypond[quote,verbatim,fragment,ragged-right,relative=2]
+\key d \minor
+% Voice = "1" Voice = "2"
+<< { r4 g g4. a8 } \\ { d,2 d4 g } >> |
+<< { bes4 bes c bes } \\ { g4 g g8( a) g4 } >> |
+<< { a2. r4 } \\ { fis2. s4 } >> |
@end lilypond
Le recours à une construction @code{<< \\ >>} particulière à chaque
@lilypond[quote,verbatim,ragged-right]
<<
\key d \minor
- \relative { % Voice "1"
+ \relative { % Voice = "1"
r4 g' g4. a8 |
bes4 bes c bes |
a2. r4 |
} \\
- \relative { % Voice "2"
+ \relative { % Voice = "2"
d'2 d4 g |
g4 g g8( a) g4 |
fis2. s4 |
\new Staff \relative {
% Main voice
c'16 d e f
- % Voice "1" Voice "2" Voice "3"
+ % Voice = "1" Voice = "2" Voice = "3"
<< { g4 f e } \\ { r8 e4 d c8~ } >> |
<< { d2 e } \\ { c8 b16 a b8 g~ 2 } \\ { s4 b c2 } >> |
}
Dans la revue annuelle de la Fédération Nationale des Associations
de Parents d'Éleves de Conservatoires, le compositeur français
Valentin Villenave, également contributeur LilyPond, consacre un
-@uref{http://news.lilynet.net/Free-Music-Now, article} aux licences
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/Free-Music-Now, article} aux licences
libres, et au rôle primordial que peut jouer LilyPond afin d'ouvrir
à tous l'accès à la musique écrite.
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.19.21"
+@c \version "2.19.24"
@node A kottaszedés
@chapter A kottaszedés
<d f g>4
\once \override NoteHead.style = #'cross
<d f g>4
- \applyOutput #'Voice #mc-squared
+ \applyOutput Voice #mc-squared
<d f g>4
<<
{ d8[ es-( fis^^ g] fis2-) }
- \repeat unfold 5 { \applyOutput #'Voice #mc-squared s8 }
+ \repeat unfold 5 { \applyOutput Voice #mc-squared s8 }
>>
}
@end lilypond
@subsubheading LilyPond hírlevél
Közösségi hírlevelünket olvasva nyomon követheted a program fejlődését:
-@uref{http://news.lilynet.net/, LilyPond hírlevél}.
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/, LilyPond hírlevél}.
@subsubheading Értesítés a kiadott verziókról: @code{info-lilypond@@gnu.org}
@lilypond[quote,verbatim,ragged-right]
\relative {
\key g \major
- % Voice "1" Voice "2"
+ % Voice = "1" Voice = "2"
<< { g'4 fis8( g) a4 g } \\ { d4 d d d } >>
}
@end lilypond
@lilypond[quote,verbatim,ragged-right]
\relative {
\key d \minor
- % Voice "1" Voice "2"
+ % Voice = "1" Voice = "2"
<< { r4 g' g4. a8 } \\ { d,2 d4 g } >> |
<< { bes4 bes c bes } \\ { g4 g g8( a) g4 } >> |
<< { a2. r4 } \\ { fis2. s4 } >> |
@lilypond[quote,verbatim,ragged-right]
<<
\key d \minor
- \relative { % Voice "1"
+ \relative { % Voice = "1"
r4 g' g4. a8 |
bes4 bes c bes |
a2. r4 |
} \\
- \relative { % Voice "2"
+ \relative { % Voice = "2"
d'2 d4 g |
g4 g g8( a) g4 |
fis2. s4 |
\new Staff \relative {
% Main voice
c'16 d e f
- % Voice "1" Voice "2" Voice "3"
+ % Voice = "1" Voice = "2" Voice = "3"
<< { g4 f e } \\ { r8 e4 d c8~ } >> |
<< { d2 e } \\ { c8 b16 a b8 g~ 2 } \\ { s4 b c2 } >> |
}
@subsubheading LilyPond Report
Il modo più semplice per restare in contatto è leggere la newsletter della
-nostra comunità, il @uref{http://news.lilynet.net/, LilyPond Report}.
+nostra comunità, il @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/, LilyPond Report}.
@subsubheading Mailing list dei rilasci: @code{info-lilypond@@gnu.org}
@item
Giugno 2009
-In un @uref{http://news.lilynet.net/Free-Music-Now, articolo}
+In un @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/Free-Music-Now, articolo}
pubblicato nella rivista annuale francese @emph{National Conservatory Parent
Association}, Valentin Villenave, compositore francese e collaboratore di
LilyPond, spiega come le licenze libere, e in particolare le partiture
@lilypond[quote,verbatim,ragged-right]
\relative {
\key g \major
- % Voice "1" Voice "2"
+ % Voice = "1" Voice = "2"
<< { g'4 fis8( g) a4 g } \\ { d4 d d d } >>
}
@end lilypond
@lilypond[quote,verbatim,fragment,ragged-right,relative=2]
\key d \minor
-% Voice "1" Voice "2"
+% Voice = "1" Voice = "2"
<< { r4 g g4. a8 } \\ { d,2 d4 g } >> |
<< { bes4 bes c bes } \\ { g4 g g8( a) g4 } >> |
<< { a2. r4 } \\ { fis2. s4 } >> |
@lilypond[quote,verbatim,ragged-right]
<<
\key d \minor
- \relative { % Voice "1"
+ \relative { % Voice = "1"
r4 g' g4. a8 |
bes4 bes c bes |
a2. r4 |
} \\
- \relative { % Voice "2"
+ \relative { % Voice = "2"
d'2 d4 g |
g4 g g8( a) g4 |
fis2. s4 |
\new Staff \relative {
% Main voice
c'16 d e f
- % Voice "1" Voice "2" Voice "3"
+ % Voice = "1" Voice = "2" Voice = "3"
<< { g4 f e } \\ { r8 e4 d c8 ~ } >> |
<< { d2 e2 } \\ { c8 b16 a b8 g ~ 2 } \\ { s4 b4 c2 } >> |
}
我々のコミュニティのニュース レター LilyPond レポートを読むことです。
@example
-@uref{http://news.lilynet.net}
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net}
@end example
@subsubheading リリース メーリング リスト: @code{info-lilypond@@gnu.org}
@item
June 2009
-In an @uref{http://news.lilynet.net/Free-Music-Now, article}
+In an @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/Free-Music-Now, article}
published in the French @emph{National Conservatory Parent
Association}'s yearly magazine, French composer and LilyPond
contributor Valentin Villenave explains how Free licenses, and
@lilypond[quote,verbatim,ragged-right]
\relative {
\key g \major
- % Voice "1" Voice "2"
+ % Voice = "1" Voice = "2"
<< { g'4 fis8( g) a4 g } \\ { d4 d d d } >>
}
@end lilypond
@lilypond[quote,verbatim,ragged-right]
\relative {
\key d \minor
- % Voice "1" Voice "2"
+ % Voice = "1" Voice = "2"
<< { r4 g' g4. a8 } \\ { d,2 d4 g } >> |
<< { bes4 bes c bes } \\ { g4 g g8( a) g4 } >> |
<< { a2. r4 } \\ { fis2. s4 } >> |
@lilypond[quote,verbatim,ragged-right]
<<
\key d \minor
- \relative { % Voice "1"
+ \relative { % Voice = "1"
r4 g' g4. a8 |
bes4 bes c bes |
a2. r4 |
} \\
- \relative { % Voice "2"
+ \relative { % Voice = "2"
d'2 d4 g |
g4 g g8( a) g4 |
fis2. s4 |
\new Staff \relative {
% Main voice
c'16 d e f
- % Voice "1" Voice "2" Voice "3"
+ % Voice = "1" Voice = "2" Voice = "3"
<< { g4 f e } \\ { r8 e4 d c8~ } >> |
<< { d2 e } \\ { c8 b16 a b8 g~ 2 } \\ { s4 b c2 } >> |
}
@lilypond[quote,verbatim,ragged-right]
\relative {
\key g \major
- % Voice "1" Voice "2"
+ % Voice = "1" Voice = "2"
<< { g'4 fis8( g) a4 g } \\ { d4 d d d } >>
}
@end lilypond
@lilypond[quote,verbatim,ragged-right]
\relative {
\key d \minor
- % Voice "1" Voice "2"
+ % Voice = "1" Voice = "2"
<< { r4 g' g4. a8 } \\ { d,2 d4 g } >> |
<< { bes4 bes c bes } \\ { g4 g g8( a) g4 } >> |
<< { a2. r4 } \\ { fis2. s4 } >> |
@lilypond[quote,verbatim,ragged-right]
<<
\key d \minor
- \relative { % Voice "1"
+ \relative { % Voice = "1"
r4 g' g4. a8 |
bes4 bes c bes |
a2. r4 |
} \\
- \relative { % Voice "2"
+ \relative { % Voice = "2"
d'2 d4 g |
g4 g g8( a) g4 |
fis2. s4 |
\new Staff \relative {
% Main voice
c'16 d e f
- % Voice "1" Voice "2" Voice "3"
+ % Voice = "1" Voice = "2" Voice = "3"
<< { g4 f e } \\ { r8 e4 d c8~ } >> |
<< { d2 e } \\ { c8 b16 a b8 g~ 2 } \\ { s4 b c2 } >> |
}
@item
juni 2009
-In een @uref{http://news.lilynet.net/Free-Music-Now, artikel}
+In een @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/Free-Music-Now, artikel}
gepubliceerd in het Franse @emph{National Conservatory Parent
Association}'s jaarblad, legt de Franse componist en LilyPond-bijdrager
Valentin Villenave uit waarom Vrije licenties, en in het bijzonder
-%% DO NOT EDIT this file manually; it is automatically
-%% generated from LSR http://lsr.di.unimi.it
-%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
-%% and then run scripts/auxiliar/makelsr.py
-%%
-%% This file is in the public domain.
-\version "2.18.0"
+% 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.19.24
+\version "2.19.24"
\header {
lsrtags = "really-cool, scheme-language, tweaks-and-overrides"
} % begin verbatim
#(define (mc-squared grob grob-origin context)
- (let ((sp (ly:grob-property grob 'staff-position)))
- (if (grob::has-interface grob 'note-head-interface)
- (begin
- (ly:grob-set-property! grob 'stencil
- (grob-interpret-markup grob
- (make-lower-markup 0.5
- (case sp
- ((-5) "m")
- ((-3) "c ")
- ((-2) (make-smaller-markup (make-bold-markup "2")))
- (else "bla")))))))))
+ (let ((sp (ly:grob-property grob 'staff-position)))
+ (ly:grob-set-property!
+ grob 'stencil
+ (grob-interpret-markup grob
+ #{ \markup \lower #0.5
+ #(case sp
+ ((-5) "m")
+ ((-3) "c ")
+ ((-2) #{ \markup \teeny \bold 2 #})
+ (else "bla")) #}))))
\relative c' {
<d f g b>2
- \applyOutput #'Voice #mc-squared
+ \applyOutput Voice.NoteHead #mc-squared
<d f g b>2
}
--- /dev/null
+\version "2.19.24"
+
+\header {
+ lsrtags = "really-cool, scheme-language, tweaks-and-overrides"
+
+ texidoc = "
+The @code{\\applyOutput} command allows the tuning of any layout
+object, in any context. It requires a Scheme function with three
+arguments.
+
+"
+ doctitle = "Changing properties for individual grobs"
+}
+#(define (mc-squared grob grob-origin context)
+ (let ((sp (ly:grob-property grob 'staff-position)))
+ (ly:grob-set-property!
+ grob 'stencil
+ (grob-interpret-markup grob
+ #{ \markup \lower #0.5
+ #(case sp
+ ((-5) "m")
+ ((-3) "c ")
+ ((-2) #{ \markup \teeny \bold 2 #})
+ (else "bla")) #}))))
+
+\relative c' {
+ <d f g b>2
+ \applyOutput Voice.NoteHead #mc-squared
+ <d f g b>2
+}
@cindex LibreOffice.org
LilyPond notation can be added to OpenOffice.org and LibreOffice with
-@uref{http://@/ooolilypond@/.sourceforge@/.net@/,OOoLilyPond}.
+@uref{http://@/ooolilypond@/.sourceforge@/.net@/,OOoLilyPond}, an
+OpenOffice.org extension that converts LilyPond files into images within
+OpenOffice.org documents. Although this is no longer being developed,
+it appears to still work with version 4.
@node Inserting LilyPond output into other programs
@item
June 2009
-In an @uref{http://news.lilynet.net/Free-Music-Now, article}
+In an @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/Free-Music-Now, article}
published in the French @emph{National Conservatory Parent
Association}'s yearly magazine, French composer and LilyPond
contributor Valentin Villenave explains how Free licenses, and
@item
@uref{http://extensions.services.openoffice.org/en/project/OOoLilyPond,OOoLilypond},
-an OpenOffice.org extension that converts LilyPond files it into images
+an OpenOffice.org extension that converts LilyPond files into images
within OpenOffice.org documents. Although this is no longer being
developed, it appears to still work with version 4.
@newsItem
@subheading The LilyPond Report #28. @emph{November 12, 2012}
-The @uref{http://news.lilynet.net/?The-LilyPond-Report-28, October
+The @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-28, October
issue of the @emph{LilyPond Report}} focuses on the
-@uref{http://news.lilynet.net/?LilyPond-meeting-in-Waltrop,
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?LilyPond-meeting-in-Waltrop,
meeting of LilyPond developers and users} in Waltrop, Germany last
August. Of course, there are also some musings on LilyPond
triggered by the release of 2.16.0 and 2.17.0 occuring from that
There are also two monthly financial reports from David Kastrup
whose work on LilyPond is
-@uref{http://news.lilynet.net/?The-LilyPond-Report-24#an_urgent_request_for_funding,
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-24#an_urgent_request_for_funding,
solely paid for} by financial contributions from other developer
and users (thank you!), and a report about experiences from
@uref{http://scorio.com, a web-based music typesetting service}
using LilyPond internally.
-Come @uref{http://news.lilynet.net/?The-LilyPond-Report-28, read
+Come @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-28, read
LilyPond Report 28} now; comments and contributions are warmly
encouraged!
@newsEnd
companion projects, and a handful of more shallow factoids.
Come
-@uref{http://news.lilynet.net/?The-LilyPond-Report-27, read
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-27, read
LilyPond Report 27} now; comments and contributions are
warmly encouraged!
the quality of hand-engraved scores.
Come
-@uref{http://news.lilynet.net/?The-LilyPond-Report-26, read
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-26, read
LilyPond Report 26} now; comments and contributions are
warmly encouraged!
including (but not limited to)… a cooking recipe!
Come
-@uref{http://news.lilynet.net/?The-LilyPond-Report-25, read
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-25, read
LilyPond Report 25} now; comments and contributions are
warmly encouraged!
and an overview of LilyPond-based web applications.
Come
-@uref{http://news.lilynet.net/?The-LilyPond-Report-24, read
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-24, read
LilyPond Report 24} now; comments and contributions are
warmly encouraged!
with LilyPond contributor and composer Mike Solomon.
Come
-@uref{http://news.lilynet.net/?The-LilyPond-Report-23, read
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-23, read
LilyPond Report 23} now; comments and contributions are
warmly encouraged!
read on to find out what for!
Come
-@uref{http://news.lilynet.net/The-LilyPond-Report-22, read
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-22, read
LilyPond Report 22} now; comments and contributions are
warmly encouraged!
the frog pond!
Come
-@uref{http://news.lilynet.net/The-LilyPond-Report-21, read
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-21, read
LilyPond Report 21} now; comments and contributions are
warmly encouraged!
the bug report of the report!
Come
-@uref{http://news.lilynet.net/The-LilyPond-Report-20, read
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-20, read
LilyPond Report 20} now; comments and contributions are
warmly encouraged!
@newsEnd
report!
Come
-@uref{http://news.lilynet.net/The-LilyPond-Report-19, read
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-19, read
LilyPond Report 19} now; comments and contributions are
warmly encouraged!
@newsEnd
staves, plus the usual Frogs and Bugs.
Come
-@uref{http://news.lilynet.net/The-LilyPond-Report-18, read
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-18, read
LilyPond Report 18} now; comments and contributions are
warmly encouraged!
@newsEnd
review of the Frescobaldi editor!
What are you waiting for? Come
-@uref{http://news.lilynet.net/The-LilyPond-Report-17, read
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-17, read
LilyPond Report 17} now!
@newsEnd
The LilyPond Report is back! This short, informal opinion column is
about the LilyPond project: its team, its world, its community.
-Read @uref{http://news.lilynet.net/The-LilyPond-Report-16, issue 16}
+Read @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-16, issue 16}
now!
@newsEnd
The @emph{LilyPond Report} is a short, informal opinion column about the LilyPond project:
its team, its world, its community.
-Follow @uref{http://news.lilynet.net/The-LilyPond-Report-15,this link}
+Follow @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-15,this link}
to read the full issue...
@newsEnd
The @emph{LilyPond Report} is back, on a new website!
This short, informal, weekly opinion column is about the LilyPond project: its team, its world, its community.
-Follow @uref{http://news.lilynet.net/The-LilyPond-Report-14,this link} to read the full issue...
+Follow @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-14,this link} to read the full issue...
@newsEnd
#
RedirectMatch ^/bugs /bug-reports
#RedirectMatch ^/bugs http://code.google.com/p/lilypond/issues/list
-RedirectMatch ^/wiki http://wiki.lilynet.net
# the new website already has an /authors
#RedirectMatch ^/authors /doc/Documentation/topdocs/AUTHORS
# the new website has news on the main page
newsletter, the LilyPond Report:
@example
-@uref{http://news.lilynet.net}
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net}
@end example
@subsubheading 发行版邮件列表: @code{info-lilypond@@gnu.org}
@item
2009年6月
-In an @uref{http://news.lilynet.net/Free-Music-Now, article}
+In an @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/Free-Music-Now, article}
published in the French @emph{National Conservatory Parent
Association}'s yearly magazine, French composer and LilyPond
contributor Valentin Villenave explains how Free licenses, and
the quality of hand-engraved scores.
Come
-@uref{http://news.lilynet.net/?The-LilyPond-Report-26, read
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-26, read
LilyPond Report 26} now; comments and contributions are
warmly encouraged!
-\version "2.19.21"
+\version "2.19.24"
\header {
texidoc = "The @code{\\applyOutput} expression is the most flexible way to
}
#(define (mc-squared gr org cur)
- (let*
- (
- (ifs (ly:grob-interfaces gr))
- (sp (ly:grob-property gr 'staff-position))
- )
- (if (memq 'note-head-interface ifs)
- (begin
- (ly:grob-set-property! gr 'stencil
- (grob-interpret-markup gr
- (make-raise-markup -0.5
- (case sp
- ((-5) (make-simple-markup "m"))
- ((-3) (make-simple-markup "c "))
- ((-2) (make-smaller-markup (make-bold-markup "2")))
- (else (make-simple-markup "bla"))
- ))))
- ))))
+ (let ((sp (ly:grob-property gr 'staff-position)))
+ (ly:grob-set-property!
+ gr 'stencil
+ (grob-interpret-markup gr
+ #{ \markup \raise #-0.5
+ #(case sp
+ ((-5) "m")
+ ((-3) "c ")
+ ((-2) #{ \markup \teeny \bold 2 #})
+ (else "bla")) #}))))
\new Voice \relative {
\set autoBeaming = ##f
<d' f g b>8
- \applyOutput #'Voice #mc-squared
+ \applyOutput Voice.NoteHead #mc-squared
<d f g b>8
}
--- /dev/null
+\version "2.19.23"
+
+\header {
+ texidoc = "@code{\\autochange} needs to be given pitches in their
+final octaves, so if @code{\\relative} is used it must be applied
+inside @code{\\autochange}. The pitches in @code{\\autochange} are
+unaffected by an outer @code{\\relative}, so that the printed output
+shows the pitches that @code{\\autochange} used.
+
+The expected output of this test is three identical measures."
+}
+
+\new PianoStaff {
+ \autochange \absolute {g4 c g' c}
+ \relative \autochange {g4 c g' c} % relative is ignored
+ \autochange \relative {g4 c, g'' c,,}
+}
-\version "2.19.22"
+\version "2.19.24"
#(use-modules (srfi srfi-13)
(ice-9 format))
\test ##[ \revert StaffGrouper.staff-staff-spacing.basic-distance #] % nested properties
%% \applyOutput
-\test ##[ \applyOutput #'Foo #(lambda (arg) (list)) #]
+\test ##[ \applyOutput Foo #(lambda (arg) (list)) #]
+\test ##[ \applyOutput Foo.NoteHead #(lambda (arg) (list)) #]
%% \applyContext
\test ##[ \applyContext #(lambda (arg) (list)) #]
-\version "2.16.0"
+\version "2.19.24"
\header{
texidoc="
\relative c''{
- \applyOutput #'Bottom #(outputproperty-compatibility
+ \applyOutput Bottom #(outputproperty-compatibility
(make-type-checker 'note-head-interface)
'extra-offset '(2 . 3))
c2
c
- \applyOutput #'Score #(outputproperty-compatibility (make-type-checker 'mark-interface) 'extra-offset '(-1 . 4))
+ \applyOutput Score #(outputproperty-compatibility (make-type-checker 'mark-interface) 'extra-offset '(-1 . 4))
\mark A
d1
\mark \default
--- /dev/null
+\version "2.19.23"
+
+\header {
+ texidoc = "@code{\\partcombine} needs to be given pitches in their
+final octaves, so if @code{\\relative} is used it must be applied
+inside @code{\\partcombine}. The pitches in @code{\\partcombine} are
+unaffected by an outer @code{\\relative}, so that the printed output
+shows the pitches that @code{\\partcombine} used.
+
+The expected output of this test is three identical measures."
+}
+
+\new Staff {
+ \partcombine \absolute { e'2 f' } { c'2 d' }
+ \relative \partcombine { e'2 f' } { c'2 d' } % relative is ignored
+ \partcombine \relative { e'2 f } \relative { c'2 d }
+}
--- /dev/null
+\version "2.19.24"
+
+\header {
+ texidoc = "@code{\\tweak} commands can be used to effect overrides
+when given a symbol list as argument. Such overrides can be the
+target of another tweak, with the tweaks accumulating. This example
+should show the starting chord with blue, cross-styled note heads
+and a red stem."
+}
+
+\layout { ragged-right = ##t }
+
+{
+ \once \tweak Stem.color #red
+ \tweak color #blue
+ \tweak style #'cross NoteHead
+ <c' e'>2 c'2
+}
public:
Moment music_get_length () const;
+ // music_start_mom () is calculated relative to the time where the
+ // iterator occurs in the music stream, so it will usually be
+ // non-zero only for expressions starting with grace notes.
Moment music_start_mom () const;
Music_iterator ();
void report_event (Music *);
virtual Moment pending_moment () const;
virtual bool ok () const;
virtual bool run_always () const;
+ // process is called with a time relative to the iterator start, so
+ // usually the last processed moment is the same as music_get_length.
virtual void process (Moment until);
virtual void derived_mark () const;
virtual void construct_children ();
{
DECLARE_GROB_INTERFACE ();
- DECLARE_SCHEME_CALLBACK (calc_direction, (SCM));
DECLARE_SCHEME_CALLBACK (calc_control_points, (SCM));
- static bool less (Grob *const &s1,
- Grob *const &s2);
+ static bool less (Grob *s1, Grob *s2);
static int get_column_rank (Item *);
static int get_position (Item *);
static Item *head (Item *);
- // return the head if it is present on the given side
- static Item *head (Item *, Direction d);
};
#endif /* SEMI_TIE_HH */
static Item *head (Spanner *, Direction);
static int get_column_rank (Spanner *, Direction);
static int get_position (Spanner *);
- static int get_position_generic (Grob *);
- static Direction get_default_dir (Grob *);
+ static Direction get_default_dir (Spanner *);
static SCM get_control_points (Grob *, Grob *,
Tie_configuration const &,
Tie_details const &);
DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM));
DECLARE_SCHEME_CALLBACK (calc_direction, (SCM));
DECLARE_SCHEME_CALLBACK (calc_control_points, (SCM));
- static bool less (Grob *const &s1,
- Grob *const &s2);
+ static bool less (Grob *s1, Grob *s2);
};
#endif // TIE_HH
{
Stream_event *o = props_[i];
Context *d = inf.context ();
+ SCM grob = o->get_property ("symbol");
+ if (scm_is_symbol (grob)
+ && ly_symbol2string (grob) != inf.grob ()->name ())
+ continue;
SCM proc = o->get_property ("procedure");
scm_call_3 (proc,
inf.grob ()->self_scm (),
| partial_function ETC
{
$$ = MAKE_SYNTAX (partial_music_function, @$,
- scm_reverse_x (scm_car ($1), SCM_EOL),
- scm_reverse_x (scm_cdr ($1), SCM_EOL));
+ scm_reverse_x ($1, SCM_EOL));
}
;
partial_function:
MUSIC_FUNCTION function_arglist_partial
{
- $$ = scm_cons (scm_list_1 ($1), scm_list_1 ($2));
+ $$ = scm_acons ($1, $2, SCM_EOL);
}
| EVENT_FUNCTION function_arglist_partial
{
- $$ = scm_cons (scm_list_1 ($1), scm_list_1 ($2));
+ $$ = scm_acons ($1, $2, SCM_EOL);
}
| SCM_FUNCTION function_arglist_partial
{
- $$ = scm_cons (scm_list_1 ($1), scm_list_1 ($2));
+ $$ = scm_acons ($1, $2, SCM_EOL);
}
| MUSIC_FUNCTION EXPECT_SCM function_arglist_optional partial_function
{
- $$ = scm_cons (scm_cons ($1, scm_car ($4)),
- scm_cons ($3, scm_cdr ($4)));
+ $$ = scm_acons ($1, $3, $4);
}
| EVENT_FUNCTION EXPECT_SCM function_arglist_optional partial_function
{
- $$ = scm_cons (scm_cons ($1, scm_car ($4)),
- scm_cons ($3, scm_cdr ($4)));
+ $$ = scm_acons ($1, $3, $4);
}
| SCM_FUNCTION EXPECT_SCM function_arglist_optional partial_function
{
- $$ = scm_cons (scm_cons ($1, scm_car ($4)),
- scm_cons ($3, scm_cdr ($4)));
+ $$ = scm_acons ($1, $3, $4);
}
| MUSIC_FUNCTION EXPECT_OPTIONAL EXPECT_SCM function_arglist_nonbackup partial_function
{
- $$ = scm_cons (scm_cons ($1, scm_car ($5)),
- scm_cons ($4, scm_cdr ($5)));
+ $$ = scm_acons ($1, $4, $5);
}
| EVENT_FUNCTION EXPECT_OPTIONAL EXPECT_SCM function_arglist_nonbackup partial_function
{
- $$ = scm_cons (scm_cons ($1, scm_car ($5)),
- scm_cons ($4, scm_cdr ($5)));
+ $$ = scm_acons ($1, $4, $5);
}
| SCM_FUNCTION EXPECT_OPTIONAL EXPECT_SCM function_arglist_nonbackup partial_function
{
- $$ = scm_cons (scm_cons ($1, scm_car ($5)),
- scm_cons ($4, scm_cdr ($5)));
+ $$ = scm_acons ($1, $4, $5);
}
;
Percent_repeat_iterator ();
protected:
virtual SCM get_music_list () const;
+ virtual void construct_children ();
+ virtual void next_element (bool);
+ virtual void derived_mark () const;
+private:
+ SCM child_list_;
+ int starting_bar_;
};
IMPLEMENT_CTOR_CALLBACK (Percent_repeat_iterator);
Percent_repeat_iterator::Percent_repeat_iterator ()
+ : child_list_ (SCM_UNDEFINED), starting_bar_ (-1)
{
}
+void
+Percent_repeat_iterator::derived_mark () const
+{
+ scm_gc_mark (child_list_);
+}
+
+void
+Percent_repeat_iterator::construct_children ()
+{
+ Music *mus = get_music ();
+
+ Music *child = Repeated_music::body (mus);
+ child_list_ = scm_list_1 (child->self_scm ());
+
+ Sequential_iterator::construct_children ();
+
+ descend_to_bottom_context ();
+ if (!measure_position (get_outlet ()).main_part_)
+ starting_bar_ =
+ robust_scm2int (get_outlet ()->get_property ("internalBarNumber"), 0);
+}
+
SCM
Percent_repeat_iterator::get_music_list () const
{
+ return child_list_;
+}
+
+// Arrive here when child processing has been completed. At that
+// point of time, we can determine what kind of percent expression we
+// are dealing with and extend the child list just in time before the
+// next iterator is getting fetched.
+void
+Percent_repeat_iterator::next_element (bool side_effect)
+{
+ // Do nothing if we already did our processing here.
+ if (!scm_is_pair (child_list_))
+ {
+ Sequential_iterator::next_element (side_effect);
+ return;
+ }
+
Music *mus = get_music ();
Music *child = Repeated_music::body (mus);
SCM length = child->get_length ().smobbed_copy ();
+
+ int current_bar = -1;
+ if (!measure_position (get_outlet ()).main_part_)
+ current_bar =
+ robust_scm2int (get_outlet ()->get_property ("internalBarNumber"), 0);
+
SCM child_list = SCM_EOL;
- Moment measure_len = measure_length (get_outlet ());
- Moment music_len = robust_scm2moment (length, Moment (0));
string event_type;
SCM slash_count = SCM_EOL;
- if (measure_len == music_len)
+ if (starting_bar_ >= 0 && current_bar == starting_bar_ + 1)
event_type = "PercentEvent";
- else if (measure_len * Moment (2) == music_len)
+ else if (starting_bar_ >=0 && current_bar == starting_bar_ + 2)
event_type = "DoublePercentEvent";
else
{
child_list = scm_cons (percent->unprotect (), child_list);
}
- child_list = scm_cons (child->self_scm (), child_list);
+ scm_set_cdr_x (child_list_, child_list);
+ child_list_ = SCM_EOL;
- return child_list;
+ Sequential_iterator::next_element (side_effect);
}
"The interface for a column of l.v. (laissez vibrer) ties.",
/* properties */
- "direction "
"positioning-done "
"head-direction "
"tie-configuration "
SCM
Semi_tie::calc_control_points (SCM smob)
{
- Grob *me = unsmob<Grob> (smob);
+ Item *me = LY_ASSERT_SMOB(Item, smob, 1);
+
(void) me->get_property ("direction");
- if (Semi_tie_column::has_interface (me->get_parent (Y_AXIS)))
- {
- me->get_parent (Y_AXIS)->get_property ("positioning-done");
- }
- else
+ Grob *yparent = me->get_parent (Y_AXIS);
+ if (Semi_tie_column::has_interface (yparent))
{
- programming_error ("lv tie without Semi_tie_column. Killing lv tie.");
- me->suicide ();
+ /* trigger positioning. */
+ yparent->get_property ("positioning-done");
+
+ return me->get_property_data ("control-points");
}
- return me->get_property_data ("control-points");
+ programming_error ("lv tie without Semi_tie_column. Killing lv tie.");
+ me->suicide ();
+ return SCM_EOL;
}
int
}
bool
-Semi_tie::less (Grob *const &s1,
- Grob *const &s2)
+Semi_tie::less (Grob *g1, Grob *g2)
{
- return Tie::get_position_generic (s1) < Tie::get_position_generic (s2);
+ Item *i1 = dynamic_cast<Item *> (g1);
+ Item *i2 = dynamic_cast<Item *> (g2);
+ if (i1 && i2) {
+ return get_position (i1) < get_position (i2);
+ }
+
+ programming_error ("grob is not a semi-tie");
+ return false;
}
Item *
{
return unsmob<Item> (me->get_object ("note-head"));
}
-
-Item *
-Semi_tie::head (Item *me, Direction d)
-{
- SCM head_dir = me->get_property ("head-direction");
- return (is_direction (head_dir) && (to_dir (head_dir) == d)) ? head (me) : 0;
-}
#include "tie-formatting-problem.hh"
#include "grob.hh"
+#include "item.hh"
+#include "semi-tie.hh"
+#include "spanner.hh"
#include "tie.hh"
#include "libc-extension.hh"
#include "tie-specification.hh"
void
Tie_specification::from_grob (Grob *tie)
{
+ // In this method, Tie and Semi_tie require the same logic with different
+ // types. It might be clearer to use a template.
tie_grob_ = tie;
if (scm_is_number (tie->get_property_data ("direction")))
{
has_manual_dir_ = true;
}
- position_ = Tie::get_position_generic (tie);
+ if (Spanner *spanner = dynamic_cast<Spanner *> (tie))
+ position_ = Tie::get_position (spanner);
+ else if (Item *item = dynamic_cast<Item *> (tie))
+ position_ = Semi_tie::get_position (item);
+ else
+ {
+ programming_error ("grob is neither a tie nor a semi-tie");
+ position_ = 0;
+ }
+
SCM pos_scm = tie->get_property ("staff-position");
if (scm_is_number (pos_scm))
{
#include "semi-tie-column.hh"
bool
-Tie::less (Grob *const &s1, Grob *const &s2)
+Tie::less (Grob *g1, Grob *g2)
{
- return get_position_generic (s1) < get_position_generic (s2);
+ Spanner *s1 = dynamic_cast<Spanner *> (g1);
+ Spanner *s2 = dynamic_cast<Spanner *> (g2);
+ if (s1 && s2) {
+ return get_position (s1) < get_position (s2);
+ }
+
+ programming_error ("grob is not a tie");
+ return false;
}
void
return 0;
}
-int
-Tie::get_position_generic (Grob *me) // TODO: do away with this
-{
- Spanner *spanner = dynamic_cast<Spanner *> (me);
- if (spanner)
- return get_position (spanner);
-
- Item *item = dynamic_cast<Item *> (me);
- if (item)
- return Semi_tie::get_position (item);
-
- programming_error ("grob is neither a tie nor a semi-tie");
- return 0;
-}
-
/*
Default: Put the tie oppositie of the stem [Wanske p231]
(what about linebreaks? )
*/
Direction
-Tie::get_default_dir (Grob *me)
+Tie::get_default_dir (Spanner *me)
{
Drul_array<Grob *> stems;
for (LEFT_and_RIGHT (d))
{
- Grob *one_head = 0;
- if (Spanner *spanner = dynamic_cast<Spanner *> (me))
- {
- one_head = head (spanner, d);
- if (!one_head)
- one_head = head (spanner->broken_neighbor (d), d);
- }
- else if (Item *item = dynamic_cast<Item *> (me))
- one_head = Semi_tie::head (item);
+ Grob *one_head = head (me, d);
+ if (!one_head)
+ one_head = head (me->broken_neighbor (d), d);
Grob *stem = one_head ? Rhythmic_head::get_stem (one_head) : 0;
stems[d] = (stem && !Stem::is_invisible (stem)) ? stem : 0;
return -get_grob_direction (stems[LEFT]);
else if (stems[RIGHT])
return -get_grob_direction (stems[RIGHT]);
- else if (int p = get_position_generic (me))
+ else if (int p = get_position (me))
return Direction (sign (p));
return to_dir (me->get_property ("neutral-direction"));
SCM
Tie::calc_direction (SCM smob)
{
+ // In this method, Tie and Semi_tie require the same logic with different
+ // types. It might be clearer to use a template.
Grob *me = unsmob<Grob> (smob);
Grob *yparent = me->get_parent (Y_AXIS);
if ((Tie_column::has_interface (yparent)
return me->get_property_data ("direction");
}
- else
- return scm_from_int (Tie::get_default_dir (me));
+
+ programming_error ("no Tie_column or Semi_tie_column. Killing grob.");
+ me->suicide ();
+ return scm_from_int (CENTER);
}
SCM
if (!scm_is_pair (timeSignatureSettings))
{
programming_error ("missing timeSignatureSettings");
- // A memoized constant is not the prettiest thing as a fallback
- // since it does not track changes of the variable. However,
- // this is still better than nothing, and we already complained
- // via a programming_error
timeSignatureSettings = Lily::default_time_signature_settings;
}
context ()->set_property ("timeSignatureSettings", timeSignatureSettings);
(func music))
applyOutput =
-#(define-music-function (ctx proc) (symbol? procedure?)
- (_i "Apply function @code{proc} to every layout object in context @code{ctx}")
- (make-music 'ApplyOutputEvent
- 'procedure proc
- 'context-type ctx))
+#(define-music-function (target proc) (symbol-list-or-symbol? procedure?)
+ (_i "Apply function @code{proc} to every layout object matched by
+@var{target} which takes the form @code{Context} or @code{Context.Grob}.")
+ (let ((p (check-grob-path target (*location*) #:max 2)))
+ (if p
+ (make-music 'ApplyOutputEvent
+ 'procedure proc
+ 'context-type (car p)
+ (if (pair? (cdr p))
+ (list (cons 'symbol (cadr p)))
+ '()))
+ (make-music 'Music))))
appoggiatura =
#(def-grace-function startAppoggiaturaMusic stopAppoggiaturaMusic
#:start 1
#:default #t
#:min 2)))
- (if p
- (set! (ly:music-property item 'tweaks)
- (acons (cond ((pair? (cddr p)) p)
- ((symbol? (car p))
- (cons (car p) (cadr p)))
- (else (cadr p)))
- value
- (ly:music-property item 'tweaks))))
+ (cond ((not p))
+ ;; p now contains at least two elements. The first
+ ;; element is #t when no grob has been explicitly
+ ;; specified, otherwise it is a grob name.
+ ((music-is-of-type? item 'context-specification)
+ ;; This is essentially dealing with the case
+ ;; \tweak color #red \tweak font-size #3 NoteHead
+ ;; namely when stacked tweaks end in a symbol list
+ ;; rather than a music expression.
+ ;;
+ ;; We have a tweak here to convert into an override,
+ ;; so we need to know the grob to apply it to. That's
+ ;; easy if we have a directed tweak, and otherwise we
+ ;; need to find the symbol in the expression itself.
+ (let* ((elt (ly:music-property item 'element))
+ (seq (if (music-is-of-type? elt 'sequential-music)
+ elt
+ (make-sequential-music (list elt))))
+ (elts (ly:music-property seq 'elements))
+ (symbol (if (symbol? (car p))
+ (car p)
+ (and (pair? elts)
+ (ly:music-property (car elts)
+ 'symbol)))))
+ (if (symbol? symbol)
+ (begin
+ (set! (ly:music-property seq 'elements)
+ (cons (make-music 'OverrideProperty
+ 'symbol symbol
+ 'grob-property-path (cdr p)
+ 'pop-first #t
+ 'grob-value value
+ 'origin (*location*))
+ elts))
+ (set! (ly:music-property item 'element) seq))
+ (begin
+ (ly:parser-error (_ "Cannot \\tweak")
+ (*location*))
+ (ly:music-message item (_ "untweakable"))))))
+ (else
+ (set! (ly:music-property item 'tweaks)
+ (acons (cond ((pair? (cddr p)) p)
+ ((symbol? (car p))
+ (cons (car p) (cadr p)))
+ (else (cadr p)))
+ value
+ (ly:music-property item 'tweaks)))))
item)
(propertyOverride (append item (if (symbol? prop) (list prop) prop)) value)))
(let
((lst
(fold-some-music
- (lambda (m) (or (music-is-of-type? m 'layout-instruction-event)
- (music-is-of-type? m 'context-specification)
- (music-is-of-type? m 'apply-context)
- (music-is-of-type? m 'time-signature-music)))
+ (music-type-predicate '(layout-instruction-event
+ context-specification
+ apply-context
+ time-signature-music))
(lambda (m overrides)
(case (ly:music-property m 'name)
((OverrideProperty)
#(if have-music
#{ << \SATB \Piano >> #}
#{ { } #} )
- \layout { $(if Layout #{ \Layout #} ) }
+ \layout { $(if Layout Layout) }
}
\with {
instrumentName = \markup \smallCaps {
#(if show-instrName
- (if instrName
- #{ #instrName #}
- #{ #name #} )
- #{ "" #} )
+ (if instrName instrName name)
+ "")
}
shortInstrumentName = \markup \smallCaps {
#(if show-instrName
- (if shortInstrName
- #{ #shortInstrName #}
- (if instrName
- #{ #(substring instrName 0 1) #}
- #{ #(substring name 0 1) #} ))
- #{ "" #} )
+ (cond
+ (shortInstrName shortInstrName)
+ (instrName (substring instrName 0 1))
+ (else (substring name 0 1)))
+ "")
}
- midiInstrument =
- #(if midiName
- #{ #midiName #}
- #{ "clarinet" #} )
- #(if dynUp
- #{ \dynamicUp #}
- (if dynDown
- #{ \dynamicDown #}
- #{ \dynamicNeutral #} ))
+ midiInstrument = #(if midiName midiName "clarinet")
+ #(cond
+ (dynUp dynamicUp)
+ (dynDown dynamicDown)
+ (else dynamicNeutral))
+
}
{
- #(if Key #{ \Key #} )
+ #(if Key Key)
\clef #clef
\make-voice #name
}
#{ \markup \smallCaps #instrName #}
#{ \markup \right-column \smallCaps {
#(if v1music
- (if v1InstrName
- v1InstrName
- v1name)
+ (if v1InstrName v1InstrName v1name)
"")
#(if v2music
- (if v2InstrName
- v2InstrName
- v2name)
- "") } #} )
+ (if v2InstrName v2InstrName v2name)
+ "")
+ } #} )
shortInstrumentName =
#(if shortInstrName
#{ \markup \smallCaps #shortInstrName #}
#{ \markup \right-column \smallCaps {
#(if v1music
- (if v1ShortInstrName
- v1ShortInstrName
- (if v1InstrName
- (substring v1InstrName 0 1)
- (substring v1name 0 1)))
+ (cond
+ (v1ShortInstrName v1ShortInstrName)
+ (v1InstrName (substring v1InstrName 0 1))
+ (else (substring v1name 0 1)))
"")
#(if v2music
- (if v2ShortInstrName
- v2ShortInstrName
- (if v2InstrName
- (substring v2InstrName 0 1)
- (substring v2name 0 1)))
- "") } #} )
+ (cond
+ (v2ShortInstrName v2ShortInstrName)
+ (v2InstrName (substring v2InstrName 0 1))
+ (else (substring v2name 0 1)))
+ "")
+ } #} )
}
<<
- #(if Key #{ \Key #} )
+ #(if Key Key)
\clef #clef
#(if v1music
\consists "Staff_performer"
\dynamicUp
midiInstrument =
- #(if v1midiName
- #{ #v1midiName #}
- #{ "clarinet" #})
+ #(if v1midiName v1midiName "clarinet")
}
<<
- #(if KeepAlive #{ \KeepAlive #} )
- #(if Time #{ \Time #} )
- #(if v2music #{ \voiceOne #} #{ \oneVoice #} )
+ #(if KeepAlive KeepAlive)
+ #(if Time Time)
+ #(if v2music voiceOne oneVoice)
#v1music
>>
#} )
\consists "Staff_performer"
\dynamicDown
midiInstrument =
- #(if v2midiName
- #{ #v2midiName #}
- #{ "clarinet" #})
+ #(if v2midiName v2midiName "clarinet")
}
<<
- #(if KeepAlive #{ \KeepAlive #} )
- #(if Time #{ \Time #} )
- #(if v1music #{ \voiceTwo #} #{ \oneVoice #} )
+ #(if KeepAlive KeepAlive)
+ #(if Time Time)
+ #(if v1music voiceTwo oneVoice)
#v2music
>>
#} )
#(define-music-function (name clef)
(voice-prefix? string?)
- "Make a staff with one voice and lyrics beneath
- name: the default prefix for instrument name and music
- clef: the clef for this staff "
+ "Make a staff with one voice and lyrics beneath
+ name: the default prefix for instrument name and music
+ clef: the clef for this staff "
- (if (make-id name "Music")
- #{
- <<
- \make-one-voice-staff #name #clef "Up"
- #(make-simultaneous-music
- (reverse (map
- (lambda (lyrics-postfix)
- #{ \make-one-stanza "Below" #name #name #lyrics-postfix #} )
- lyrics-postfixes)))
- >>
- #}
- (make-music 'SequentialMusic 'void #t)))
+ (if (make-id name "Music")
+ (make-simultaneous-music
+ (list
+ (make-one-voice-staff name clef "Up")
+ (make-simultaneous-music
+ (reverse (map
+ (lambda (lyrics-postfix)
+ (make-one-stanza "Below" name name lyrics-postfix))
+ lyrics-postfixes)))))
+ (make-music 'SequentialMusic 'void #t)))
make-two-voice-vocal-staff =
#(define-music-function (name clef v1name v2name)
(voice-prefix? string? voice-prefix? voice-prefix?)
- "Make a vocal staff with two voices and lyrics above and below
- name: the prefix to the staff name
- clef: the clef to use
- v1name: the prefix to the name of voice one
- v2name: the prefix to the name of voice two "
+ "Make a vocal staff with two voices and lyrics above and below
+ name: the prefix to the staff name
+ clef: the clef to use
+ v1name: the prefix to the name of voice one
+ v2name: the prefix to the name of voice two "
- (define v1music (make-id v1name "Music"))
- (define v2music (make-id v2name "Music"))
+ (define v1music (make-id v1name "Music"))
+ (define v2music (make-id v2name "Music"))
- #{
- <<
- \make-two-voice-staff #name #clef #v1name #v2name
- #(if v1music
- (make-simultaneous-music
- (map
- (lambda (lyrics-postfix)
- #{ \make-one-stanza "Above" #name #v1name #lyrics-postfix #} )
- lyrics-postfixes)))
+ (make-simultaneous-music
+ (delq! #f
+ (list
+ (make-two-voice-staff name clef v1name v2name)
+ (and v1music
+ (make-simultaneous-music
+ (map
+ (lambda (lyrics-postfix)
+ (make-one-stanza "Above" name v1name lyrics-postfix))
+ lyrics-postfixes)))
- #(if v2music
- (make-simultaneous-music
- (reverse (map
- (lambda (lyrics-postfix)
- #{ \make-one-stanza "Below" #name #v2name #lyrics-postfix #} )
- lyrics-postfixes))))
- >>
- #} )
+ (and v2music
+ (make-simultaneous-music
+ (reverse
+ (map
+ (lambda (lyrics-postfix)
+ (make-one-stanza "Below" name v2name lyrics-postfix))
+ lyrics-postfixes))))))))
make-two-vocal-staves-with-stanzas =
#(define-music-function
vxname: the prefix to the name of voice x, x = 1..4
verses: the list of verse names containing the stanzas"
- #{
- <<
- \make-two-voice-vocal-staff
- #upperName #upperClef #v1name #v2name
- #(make-simultaneous-music
- (map
- (lambda (verse-name)
- #{ \make-one-stanza
- #upperName #v1name #v2name #verse-name #} )
- verses))
- \make-two-voice-vocal-staff
- #lowerName #lowerClef #v3name #v4name
- >>
- #} )
+ (make-simultaneous-music
+ (list
+ (make-two-voice-vocal-staff
+ upperName upperClef v1name v2name)
+ (make-simultaneous-music
+ (map
+ (lambda (verse-name)
+ (make-one-stanza
+ upperName v1name v2name verse-name))
+ verses))
+ (make-two-voice-vocal-staff
+ lowerName lowerClef v3name v4name))))
return str
return inner (str)
-@rule ((2, 19, 24), "music-has-type -> music-is-of-type?")
+@rule ((2, 19, 24), r"""music-has-type -> music-is-of-type?
+\applyOutput #'Context -> \applyOutput Context""")
def conv (str):
str = re.sub (r'(?<=\s|["\\()])' + "music-has-type" + r'(?=\s|["\\()])',
"music-is-of-type?", str)
+ str = re.sub (r"(\\applyOutput\s+)#'([a-zA-Z])", r"\1\2", str)
return str
# Guidelines to write rules (please keep this at the end of this file)
(RepeatTieColumn
. (
- (direction . ,ly:tie::calc-direction)
(head-direction . ,ly:semi-tie-column::calc-head-direction)
(positioning-done . ,ly:semi-tie-column::calc-positioning-done)
(X-extent . #f)
(x-ext (ly:stencil-extent arg-stencil X))
(y-ext (ly:stencil-extent arg-stencil Y)))
(ly:stencil-add
- (ly:make-stencil
- `(delay-stencil-evaluation
- ,(delay (let* ((table (ly:output-def-lookup layout 'label-page-table))
- (page-number (if (list? table)
- (assoc-get label table)
- #f)))
- (list 'page-link page-number
- `(quote ,x-ext) `(quote ,y-ext)))))
- x-ext
- y-ext)
- arg-stencil)))
-
+ (ly:make-stencil
+ `(delay-stencil-evaluation
+ ,(delay (let* ((table (ly:output-def-lookup layout 'label-page-table))
+ (table-page-number
+ (if (list? table)
+ (assoc-get label table)
+ #f))
+ (first-page-number
+ (ly:output-def-lookup layout 'first-page-number))
+ (current-page-number
+ (if table-page-number
+ (1+ (- table-page-number first-page-number))
+ #f)))
+ (list 'page-link current-page-number
+ `(quote ,x-ext) `(quote ,y-ext)))))
+ x-ext
+ y-ext)
+ arg-stencil)))
(define-markup-command (beam layout props width slope thickness)
(number? number? number?)
;;; post events
;;;
-(define (post-event? m)
- (music-is-of-type? m 'post-event))
+(define post-event? (music-type-predicate 'post-event))
(define* (event-direction->lily-string event #:optional (required #t))
(let ((direction (ly:music-property event 'direction)))
(chord-repeat (ly:music-property chord 'duration)))
(call-with-values
(lambda ()
- (partition (lambda (m) (music-is-of-type? m 'rhythmic-event))
+ (partition (music-type-predicate 'rhythmic-event)
elements))
(lambda (chord-elements other-elements)
(cond ((pair? chord-elements)
(define-display-method ApplyOutputEvent (applyoutput)
(let ((proc (ly:music-property applyoutput 'procedure))
- (ctx (ly:music-property applyoutput 'context-type)))
- (format #f "\\applyOutput #'~a #~a"
+ (ctx (ly:music-property applyoutput 'context-type))
+ (grob (ly:music-property applyoutput 'symbol)))
+ (format #f "\\applyOutput ~a~@[.~a~] #~a"
ctx
+ (and (symbol? grob) grob)
(or (procedure-name proc)
(with-output-to-string
(lambda ()
(define-module (scm ly-syntax-constructors)
#:use-module (lily)
- #:use-module (srfi srfi-1))
+ #:use-module (srfi srfi-1)
+ #:use-module (scm display-lily))
(define-public (music-function-call-error fun m)
(let* ((sigcar (car (ly:music-function-signature fun)))
;; Used for chaining several music functions together. `final'
;; contains the last argument and still needs typechecking.
-(define (music-function-chain fun args final)
- (let* ((siglast (last (ly:music-function-signature fun)))
+(define (music-function-chain call final)
+ (let* ((fun (car call))
+ (siglast (last (ly:music-function-signature fun)))
(pred? (if (pair? siglast) (car siglast) siglast)))
(if (pred? final)
- (music-function fun (cons final args))
+ (music-function fun (cons final (cdr call)))
(begin
- (argument-error (1+ (length args)) pred? final)
+ (argument-error (length call) pred? final)
;; call music function just for the error return value
(music-function fun #f)))))
-(define-public (partial-music-function fun-list arg-list)
- (let* ((good (every list? arg-list))
- (sig (ly:music-function-signature (car fun-list))))
+(define-public (partial-music-function call-list)
+ (let* ((good (every list? call-list))
+ (sig (ly:music-function-signature (caar call-list))))
(and good
(ly:make-music-function
- (cons (car sig) (list-tail (cdr sig) (length (car arg-list))))
+ (cons (car sig) (list-tail sig (length (car call-list))))
(lambda rest
;; Every time we use music-function, it destructively
;; reverses its list of arguments. Changing the calling
;; avoid reusing any music expressions without copying and
;; want to let them point to the location of the music
;; function call rather than its definition.
- (let ((arg-list (ly:music-deep-copy arg-list (*location*))))
+ (let ((call-list (ly:music-deep-copy call-list (*location*))))
(fold music-function-chain
- (music-function (car fun-list)
- (reverse! rest (car arg-list)))
- (cdr fun-list) (cdr arg-list))))))))
+ (music-function (caar call-list)
+ (reverse! rest (cdar call-list)))
+ (cdr call-list))))))))
(define-public (void-music)
(ly:set-origin! (make-music 'Music)))
"Does @code{mus} belong to the music class @code{type}?"
(memq type (ly:music-property mus 'types)))
+(define-safe-public (music-type-predicate types)
+ "Returns a predicate function that can be used for checking
+music to have one of the types listed in @var{types}."
+ (if (cheap-list? types)
+ (lambda (m)
+ (any (lambda (t) (music-is-of-type? m t)) types))
+ (lambda (m) (music-is-of-type? m types))))
+
;; TODO move this
(define-public ly:grob-property
(make-procedure-with-setter ly:grob-property
;; articulations on individual events since they can't actually get
;; into a repeat chord given its input syntax.
- (define (keep-element? m)
- (any (lambda (t) (music-is-of-type? m t))
- event-types))
+ (define keep-element? (music-type-predicate event-types))
(for-each
(lambda (field)
"Return a flat list of all music with @var{type} (either a single
type symbol or a list of alternatives) inside of @var{music}, not
recursing into matches themselves."
- (extract-music
- music
- (if (cheap-list? type)
- (lambda (m)
- (any (lambda (t) (music-is-of-type? m t)) type))
- (lambda (m) (music-is-of-type? m type)))))
+ (extract-music music (music-type-predicate type)))
(define*-public (event-chord-wrap! music)
"Wrap isolated rhythmic events and non-postevent events in