$(foreach a, $(README_TOP_FILES), cp $(top-src-dir)/$(a) $(outdir)/$(a).txt && ) true
$(PYTHON) $(step-bindir)/text2html.py $(OUT_TXT_FILES)
+# Explicitly list the dependencies on generated content
+$(outdir)/web.texi: $(outdir)/we-wrote.itexi $(outdir)/others-did.itexi $(outdir)/weblinks.itexi
+
ifeq ($(out),www)
## Extra images dependencies
$(OUT_TEXINFO_MANUALS): $(outdir)/pictures
$(MAKE) -C pictures WWW-1
ln -sf ../pictures/$(outdir) $@
+$(outdir)/web.texi: $(outdir)/ly-examples
+
$(outdir)/ly-examples:
$(MAKE) -C web/ly-examples
ln -sf ../web/ly-examples/$(outdir) $@
endif
-ifeq ($(out),www)
-$(outdir)/web.texi: $(outdir)/ly-examples $(outdir)/we-wrote.itexi $(outdir)/others-did.itexi
-else
-# duplicate (without ly-examples)
-$(outdir)/web.texi: $(outdir)/we-wrote.itexi $(outdir)/others-did.itexi
-endif
-
# Ugh, using '%' twice not possible
$(outdir)/notation/notation.xml: $(outdir)/notation.texi
$(outdir)/learning.texi $(outdir)/notation.texi: $(OUT_PDF_IMAGES)
-$(foreach manual, $(MANUAL_SUBDIRS),\
-$(eval $(outdir)/(manual).texi: $(call src-wildcard,$(manual)/*.ite??)))
-
-
-
$(outdir)/source:
@rm -f $(@)
ln -sf $(depth) $(@)
Install @command{git-cl} by entering:
@example
-git clone https://github.com/martine/git-cl
+git clone https://github.com/gperciva/git-cl.git
+@end example
+
+If that command fails for some reason, try this instead:
+
+@example
+git clone git://github.com/gperciva/git-cl.git
@end example
@item
* Modifying context plug-ins::
* Changing context default settings::
* Defining new contexts::
-* Aligning contexts::
+* Context layout order::
@end menu
@end example
-@node Aligning contexts
-@subsection Aligning contexts
+@node Context layout order
+@subsection Context layout order
-New contexts may be aligned above or below existing contexts. This
-could be useful in setting up a vocal staff (@rlearning{Vocal ensembles}) and
-in ossia,
+@cindex contexts, layout order
+@funindex \accepts
+@funindex \denies
-@c TODO Better example needed. Ref LM, and expand on it.
+Contexts are normally positioned in a system from top to bottom
+in the order in which they are encountered in the input file. When
+contexts are nested, the outer context will include inner nested
+contexts as specified in the input file, provided the inner contexts
+are included in the outer context's @qq{accepts} list. Nested
+contexts which are not included in the outer context's @qq{accepts}
+list will be repositioned below the outer context rather than nested
+within it.
-@cindex ossia
-@funindex alignAboveContext
-@funindex alignBelowContext
+The @qq{accepts} list of a context can be changed with the
+@code{\accepts} and @code{\denies} commands. @code{\accepts} adds a
+context to the @qq{accepts} list and @code{\denies} removes a context
+from the list. For example, it would not normally be desirable for
+chord names to be nested within a @code{Staff} context, so the
+@code{ChordNames} context is not included by default in the @qq{accepts}
+list of the @code{Staff} context, but if this were to be required it can
+be done:
-@lilypond[quote,ragged-right]
-ossia = { f4 f f f }
-\score{
- \relative c' \new Staff = "main" {
- c4 c c c
- <<
- \new Staff \with { alignAboveContext = #"main" } \ossia
- { d8 f d f d f d f }
- >>
+@lilypond[verbatim,quote]
+\score {
+ \new Staff {
+ c' d' e' f'
+ \chords { d1:m7 b1:min7.5- }
}
}
@end lilypond
-@cindex nested contexts
-@cindex contexts, nested
-
-@funindex \accepts
-@funindex \denies
-
-Contexts like @code{PianoStaff} can contain other contexts
-nested within them. Contexts which are acceptable for nesting
-are defined by the @qq{accepts} list of a context. Contexts
-which are not in this list are placed below the outer context
-in the printed score.
-For example, the @code{PianoStaff} context is defined by default
-to accept @code{Staff} and @code{FiguredBass} contexts within
-it, but not (for example) a @code{Lyrics} context. So in the
-following structure the lyrics are placed below the piano staff
-rather than between the two staves:
-
-@lilypond[verbatim,quote,relative=1]
-\new PianoStaff
-<<
- \new Staff { e4 d c2 }
- \addlyrics { Three blind mice }
+@lilypond[verbatim,quote]
+\score {
\new Staff {
- \clef "bass"
- { c,1 }
+ c' d' e' f'
+ \chords { d1:m7 b1:min7.5- }
}
->>
+ \layout {
+ \context {
+ \Staff
+ \accepts "ChordNames"
+ }
+ }
+}
@end lilypond
-The @qq{accepts} list of a context can be modified to include
-additional nested contexts, so if we wanted the lyrics to appear
-between the two staves we could use:
+@code{\denies} is mainly used when a new context is being based on
+another, but the required nesting differs. For example, the
+@code{VaticanaStaff} context is based on the @code{Staff} context, but
+with the @code{VaticanaVoice} context substituted for the @code{Voice}
+context in the @qq{accepts} list.
+
+Note that a context will be silently created implicitly if a command
+is encountered when there is no suitable context available to
+contain it. This can give rise to unexpected new staves or scores.
+
+@seealso
+Usage Manual:
+@rprogram{An extra staff appears}.
+
+Installed Files:
+@file{ly/engraver-init.ly}.
-@lilypond[verbatim,quote,relative=1]
-\new PianoStaff \with { \accepts Lyrics }
-<<
- \new Staff { e4 d c2 }
- \addlyrics { Three blind mice }
- \new Staff {
- \clef "bass"
- { c,1 }
- }
->>
-@end lilypond
-The opposite of @code{\accepts} is @code{\denies}; this removes a
-context from the @qq{accepts} list.
@node Explaining the Internals Reference
@section Explaining the Internals Reference
@menu
* Input modes::
* Direction and placement::
-* Context layout order::
* Distances and measurements::
* Staff symbol properties::
* Spanners::
@end lilypond
-@node Context layout order
-@subsection Context layout order
-
-@cindex contexts, layout order
-
-Contexts are normally positioned in a system from top to bottom
-in the order in which they are encountered in the input file. When
-contexts are nested, the outer context will include inner nested
-contexts as specified in the input file, provided the inner contexts
-are included in the outer context's @qq{accepts} list. Nested
-contexts which are not included in the outer context's @qq{accepts}
-list will be repositioned below the outer context rather than nested
-within it.
-
-Note that a context will be silently created implicitly if a command
-is encountered when there is no suitable context available to
-contain it. This can give rise to unexpected new staves or scores.
-
-The default order in which contexts are laid out and the
-@qq{accepts} list can be changed, see @ref{Aligning contexts}.
-
-@seealso
-Usage Manual:
-@rprogram{An extra staff appears}.
-
-
@node Distances and measurements
@subsection Distances and measurements
@cindex acciaccatura
@funindex \grace
-@funindex grace
+@funindex \slashedGrace
+@funindex \acciaccatura
+@funindex \appoggiatura
-Grace notes are ornaments that are written out. Grace notes
-are printed in a smaller font and take up no logical time
-in a measure.
+Grace notes are musical ornaments, printed in a smaller font, that take
+up no additional logical time in a measure.
@lilypond[quote,relative=2,verbatim]
-c4 \grace c16 c4
-\grace { c16[ d16] } c2
+c4 \grace b16 a4(
+\grace { b16[ c16] } a2)
@end lilypond
-LilyPond also supports two special types of grace notes, the
+There are three other types of grace notes possible; the
@emph{acciaccatura} -- an unmeasured grace note indicated by a slurred
-small note with a slashed stem -- and the @emph{appoggiatura}, which
-takes a fixed fraction of the main note and appears in small print
-without a slash.
+note with a slashed stem -- and the @emph{appoggiatura}, which takes a
+fixed fraction of the main note it is attached to and prints without the
+slash. It is also possible to write a grace note with a slashed stem,
+like the @emph{acciaccatura} but without the slur, so as to place it
+between notes that are slurred themselves, using the
+@code{\slashedGrace} function.
@lilypond[quote,relative=2,verbatim]
-\grace c8 b4
\acciaccatura d8 c4
\appoggiatura e8 d4
-\acciaccatura { g16[ f] } e4
+\acciaccatura { g16[ f] } e2
+\slashedGrace a,8 g4
+\slashedGrace b16 a4(
+\slashedGrace b8 a2)
@end lilypond
-The placement of grace notes is synchronized between different
-staves. In the following example, there are two sixteenth grace
-notes for every eighth grace note
+The placement of grace notes is synchronized between different staves.
+In the following example, there are two sixteenth grace notes for every
+eighth grace note
@lilypond[quote,relative=2,verbatim]
<<
@rlearning{Vocal ensembles}.
Notation Reference:
-@ref{Aligning contexts},
+@ref{Context layout order},
@ref{Creating contexts}.
@node Placing syllables horizontally
\header {
lsrtags = "keyboards"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Los símbolos específicos de acordeón discanto se escriben mediante
@code{\\markup}. Se puede trucar la colocación vertical de los
\header {
lsrtags = "chords, ancient-notation, contexts-and-engravers"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Al escribir un bajo cifrado, podemos situar las cifras encima o debajo
\header {
lsrtags = "pitches, staff-notation, vocal-music"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
doctitlees = "Añadir un ámbito por voz"
texidoces = "
Se puede añadir un ámbito por cada voz. En este caso, el ámbito se
\header {
lsrtags = "staff-notation, contexts-and-engravers, breaks"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Al añadir un pentagrama nuevo en un salto de línea, por desgracia
se añade un espacio adicional al final de la línea antes del salto
\header {
lsrtags = "staff-notation, contexts-and-engravers"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede añadir (posiblemente de forma temporal) un pentagrama
nuevo una vez que la pieza ha comenzado.
\header {
lsrtags = "chords"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Para añadir indicaciones de línea divisoria dentro del contexto de
los nombres de acorde @code{ChordNames}, incluya el grabador
\header {
lsrtags = "rhythms, expressive-marks"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
La sintaxis de LilyPond puede implicar muchas colocaciones poco
comunes para los paréntesis, corchetes, etc, que a veces se tienen
\header {
lsrtags = "rhythms, percussion"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Mediante la utilización de las potentes herramientas preconfiguradas
como la función @code{\\drummode} y el contexto @code{DrumStaff}, la
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Para añadir digitaciones a las tablaturas, utilice una combinación de
@code{\\markup} y @code{\\finger}.
\header {
lsrtags = "staff-notation, vocal-music"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Este ejemplo muestra una forma de simplificar la adición de muchas
\header {
lsrtags = "expressive-marks"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
La función @code{\\parenthesize} es un truco especial que encierra
objetos entre paréntesis. El grob asociado es @code{ParenthesesItem}.
\header {
lsrtags = "text, titles"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Con algo de código de Scheme, se puede añadir fácilmente la fecha
actual a una partitura.
\header {
lsrtags = "repeats"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
El grabador @code{Volta_engraver} reside de forma predeterminada
dentro del contexto de @code{Score}, y los corchetes de la repetición
\header {
lsrtags = "simultaneous-notes"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
doctitlees = "Voces adicionales para evitar colisiones"
texidoces = "
En ciertos casos de polifonía compleja, se necesitan voces adicionales
\header {
lsrtags = "rhythms, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede ajustar la separación entre las notas de adorno utilizando la
propiedad @code{spacing-increment} de @code{Score.GraceSpacing}.
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Este fragmento de código muestra cómo situar la línea de base de la
letra más cerca del pentagrama.
\header {
lsrtags = "expressive-marks"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Puede ser necesario trucar la propiedad
@code{shortest-duration-space} para poder ajustar el tamaño de las
\header {
lsrtags = "text, paper-and-layout, titles"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
La alineación horizontal de los nombres de instrumento se puede
trucar modificando la propiedad @code{Staff.InstrumentName
\header {
lsrtags = "rhythms"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Los números de compás se alinean de forma predeterminada por la
\header {
lsrtags = "text"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Si están especificadas, las marcas de texto se pueden alinear con
objetos de notación distintos a las líneas divisorias. Entre estos
\header {
lsrtags = "editorial-annotations, fretted-strings, spacing"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Las cifras de digitación orientadas verticalmente se colocan de forma
\header {
lsrtags = "pitches, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede variar la longitud de las plicas de las figuras unidas por
una barra mediante la sobreescritura de la propiedad
\header {
lsrtags = "pitches, vocal-music"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
doctitlees = "Ámbitos con varias voces"
texidoces = "
La adición del grabador @code{Ambitus_engraver} al contexto de
\header {
lsrtags = "editorial-annotations, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
De forma predeterminada se añaden corchetes de análisis sencillos
debajo del pentagrama. El ejemplo siguiente muestra una manera de
\version "2.15.9"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Aquí se muestran muchos de (¿o quizá todos?) los símbolos que
están contemplados por la capacidad de LilyPond para la música
\header {
lsrtags = "vocal-music, ancient-notation, template"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Este ejemplo muestra cómo hacer una transcripción moderna de canto
gregoriano. El canto gregoriano no tiene compás ni plicas; utiliza
\header {
lsrtags = "ancient-notation, template"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Al transcribir música mensural, es útil un «incipit» al compienzo
de la pieza para indicar la tonalidad y el tempo
\header {
lsrtags = "ancient-notation"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Las indicaciones de compás también se pueden grabar en estilo antiguo.
\header {
lsrtags = "vocal-music, template"
-%% Translation of GIT committish: b1bebb842d9762894fc7b2a178e2bdfcd544419f
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Esta plantilla muestra una forma de preparar un cántico salmódico
anglicano. También muestra cómo se pueden añadir estrofas adicionales
\header {
lsrtags = "pitches, editorial-annotations"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
doctitlees = "Aplicar estilos de cabeza según la nota de la escala"
texidoces = "
La propiedad @code{shapeNoteStyles} se puede usar para definir varios
\header {
lsrtags = "world-music"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Para las improvisaciones o @emph{taqasim} que son libres durante unos
momentos, se puede omitir la indicación de compás y se puede usar
\header {
lsrtags = "expressive-marks, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede hacer que una ligadura de expresión sea asimétrica para
adaptarse mejor a un patrón asimétrico de notas.
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se pueden subdividir las barras automáticamente. Estableciendo la
propiedad @code{subdivideBeams}, las barras se subdividen en
\header {
lsrtags = "rhythms, editorial-annotations, chords, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Las reglas de final de barra especificadas en el contexto
@code{Score} se aplican a todos los pentagramas, pero se pueden
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
No está especificada ninguna agrupación predeterminada automática
de las barras para el compás de 7/8, de forma que si se requieren
\header {
lsrtags = "rhythms"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Normalmente están prohibidos los saltos de línea si las barras
atraviesan las líneas divisorias. Se puede cambiar este
\header {
lsrtags = "editorial-annotations, text"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
La instrucción @code{\\whiteout} intercala un rectángulo blanco
debajo de un elemento de marcado. Este rectángulo blanco no tapa
\header {
lsrtags = "expressive-marks"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Para hacer invisibles partes de un regulador de crescendo, se usa
el método de dibujar un rectángulo blanco encima de la parte
\header {
lsrtags = "expressive-marks, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
A veces se denota una «cesura» mediante una doble marca de respiración
parecida a las vías del tren, con un calderón encima. Este fragmento
\header {
lsrtags = "expressive-marks, text"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Este ejemplo proporciona una función para tipografiar un regulador con
texto por debajo, como @qq{molto} o @qq{poco}. El ejemplo ilustra
\header {
lsrtags = "expressive-marks, unfretted-strings"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Para hacer más pequeño el círculo de @code{\\flageolet} (armónico)
utilice la siguiente función de Scheme.
\header {
lsrtags = "simultaneous-notes, editorial-annotations, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se pueden modificar notas individuales de un acorde con la instrucción
@code{\\tweak}, alterando la propiedad @code{font-size}.
\header {
lsrtags = "rhythms"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se insertan automáticamente barras en ángulo cuando se detecta un
intervalo muy grande entre las notas. Se puede hacer un ajuste
\header {
lsrtags = "chords"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede establecer el separador entre las distintas partes del
nombre de un acorde para que sea cualquier elemento de marcado.
\header {
lsrtags = "rhythms, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
doctitlees = "Cambiar la forma de los silencios multicompás"
texidoces = "
Si hay diez compases de silencio o menos, se imprime en el pentagrama
lsrtags = "fretted-strings"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
\header {
lsrtags = "contexts-and-engravers, midi"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Al producir una salida MIDI, el comportamiento predeterminado es que
cada pentagrama representa un canal MIDI, con todas las voces de dicho
\header {
lsrtags = "simultaneous-notes"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Al utilizar la posibilidad de combinación automática de partes, se
puede modificar el texto que se imprime para las secciones de solo
\header {
lsrtags = "expressive-marks, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede modificar el texto empleado para los crescendos y
decrescendos modificando las propiedades de contexto
%% Note: this file works from version 2.14.0
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Es posible ajustar la separación en las indicaciones de tesitura.
\header {
lsrtags = "expressive-marks, editorial-annotations"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede cambiar el aspecto de las ligaduras de expresión de
continuas a punteadas o intermitentes.
\header {
lsrtags = "expressive-marks"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
El glifo de la marca de respiración se puede ajustar
sobreescribiendo la propiedad de texto del objeto de presentación
\header {
lsrtags = "chords"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
La nomenclatura inglesa (predeterminada) para los acordes del cifrado
americano se puede cambiar por la alemana (@code{\\germanChords}
%% Note: this file works from version 2.14.0
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Este código muestra cómo cambiar la cantidad de puntillos de una nota.
\header {
lsrtags = "chords"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Las alteraciones y los signos «más» pueden aparecer antes o
después de los números, según el valor de las propiedades
\version "2.14.0"
\header {
-%%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
\header {
lsrtags = "rhythms, tweaks-and-overrides, midi"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Para cambiar el tempo en la salida MIDI sin
imprimir nada, hacemos invisible la indicación metronómica:
\header {
lsrtags = "keyboards, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede usar @code{Staff.pedalSustainStrings} para fijar el texto de
las indicaciones de pisar pedal y levantar pedal. Observe que las
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
La instrucción @code{\\time} establece las propiedades
@code{timeSignatureFraction}, @code{beatLength}, @code{beatGrouping} y
\header {
lsrtags = "rhythms"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
doctitlees = "Cambiar el número del grupo especial"
texidoces = "
\header {
lsrtags = "rhythms, contexts-and-engravers"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
La propiedad @code{measureLength}, junto con
@code{measurePosition}, determina cuándo es necesario dibujar una
\header {
lsrtags = "rhythms, vocal-music, ancient-notation, contexts-and-engravers"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Este tipo de notación se utiliza para el canto de los Salmos, en
que las estrofas no siempre tienen la misma longitud.
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Los deslizamientos para acordes se pueden indicar tanto en el contexto
\header {
lsrtags = "chords"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede usar la propiedad @code{chordNameExceptions} para
almacenar una lista de notaciones espaciales para acordes
\header {
lsrtags = "chords"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
La presentación del acorde de séptima mayor se
puede ajustar mediante majorSevenSymbol.
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede hacer que los diagramas de posiciones se muestren sólo
cuando el acorde cambia o al comienzo de una nueva línea.
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Este código muestra cómo recortar (extraer) fragmentos a partir de una
partitura completa.
\header {
lsrtags = "simultaneous-notes, chords, keyboards"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Los «clusters» o racimos son un mecanismo para indicar la
interpretación de un ámbito de notas al mismo tiempo.
\header {
lsrtags = "expressive-marks, text"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Ciertas indicaciones dinámicas pueden llevar textos (como @qq{più
forte} o @qq{piano subito}). Se pueden producir usando un bloque
\header {
lsrtags = "simultaneous-notes, text"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
La herramienta de combinación de partes (instrucción
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: ea4fdf1afa3e6bb9a7c586f5a533be93ff3312d3
doctitlees = "Indicaciones de compases compuestos"
texidoces = "
Las indicaciones de compás poco frecuentes como @qq{5/8} se pueden
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
La agrupación de pulsos dentro de un compás está controlada por la
propiedad de contexto @code{beatStructure}. Hay establecidos valores
\header {
lsrtags = "expressive-marks"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede tipografiar un gissando contemporáneo sin nota final
utilizando una nota oculta y temporalización de cadenza.
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
La visibilidad de los objetos de extensión que acaban en la primera
\header {
lsrtags = "editorial-annotations, chords, keyboards, fretted-strings"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede controlar con precisión la colocación de los números de
digitación. Para que se tenga en cuenta la orientación de las
\header {
lsrtags = "expressive-marks, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
El orden vertical que ocupan las inscripciones gráficas está
controlado con la propiedad @code{'script-priority}. Cuanto más
\header {
lsrtags = "rhythms, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
El comportamiento predeterminado de la visibilidad de los corchetes de
\header {
lsrtags = "expressive-marks, editorial-annotations, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
La creación de un grupeto circular de anticipación entre dos notas,
donde la nota inferior del grupeto utiliza una alteración, requiere
\header {
lsrtags = "pitches"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
En una música que tenga muchas apariciones de la
misma secuencia de notas a distintas alturas, podría ser de
\header {
lsrtags = "expressive-marks"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede trazar un símbolo de arpegio entre notas de distintas
voces que están sobre el mismo pentagrama si el grabador
\header {
lsrtags = "staff-notation, editorial-annotations, contexts-and-engravers, paper-and-layout"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Para crear pentagramas en blanco, genere compases vacíos y después
elimine el grabador de números de compás @code{Bar_number_engraver}
\header {
lsrtags = "expressive-marks"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Dentro de un @code{PianoStaff}, es posible hacer que un arpegio
cruce entre los pentagramas ajustando la propiedad
\header {
lsrtags = "expressive-marks"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se pueden crear arpegios que se cruzan entre pentagramas dentro de
contextos distintos a @code{GrandStaff}, @code{PianoStaff} y
\header {
lsrtags = "rhythms"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se pueden crear indicaciones metronómicas nuevas en modo de
marcado, pero no cambian el tempo en la salida MIDI.
\header {
lsrtags = "expressive-marks, text"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Aunque la manera más fácil de añadir paréntesis a una indicación
de dinámica es utilizar un bloque @code{\\markup}, este método
\header {
lsrtags = "expressive-marks, text, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
A diferencia de las inscripciones de texto, las lestras de ensayo
no se pueden apilar en un punto concreto de la partitura: sólo se
\header {
lsrtags = "expressive-marks, keyboards, unfretted-strings"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
En determinadas situaciones es necesario crear ligaduras de
expresión entre notas que están en voces distintas.
\header {
lsrtags = "expressive-marks, text, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Las instrucciones @code{\\startTextSpan} y @code{\\stopTextSpan}
permiten la creación de elementos de extensión textuales tan
\header {
lsrtags = "repeats, keyboards"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
\header {
lsrtags = "ancient-notation, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se pueden tipografiar «custos» en diferentes estilos.
lsrtags = "fretted-strings, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se pueden establecer las propiedades de los diagramas de
posiciones de acordes por medio de @code{'fret-diagram-details}.
\header {
lsrtags = "fretted-strings, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se pueden establecer las propiedades de los diagramas de
posiciones a través de @code{'fret-diagram-details}. Para los
\header {
lsrtags = "editorial-annotations"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
La dirección predeterminada de las plicas sobre la tercera línea
del pentagrama está determinada por la propiedad
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Este ejemplo demuestra cómo se puede definir el grabador de ámbito en
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se pueden añadir diagramas de posiciones predefinidas para
\header {
lsrtags = "staff-notation, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Si hay un solo pentagrama en un de los tipos de sistema
@code{ChoirStaff} o @code{StaffGroup}, el comportamiento
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
He aquí una forma de imprimir un acorde en el que suena la misma nota
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Al trabajar con los callbacks de un grob, puede ser de mucha ayuda
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
doctitlees = "Alteraciones de estilo dodecafónico para todas las notas incluidas las naturales"
texidoces = "
En las obras de principios del s.XX, empezando por Schoenberg, Berg y
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Funciones postfijas para la creación de objetos de extensión de texto
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Los objetos de extensión \cresc, \dim y \decresc ahora se pueden
\header {
lsrtags = "editorial-annotations, text"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede insertar códico PostScript directamente dentro de un
bloque @code{\\markup}.
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Del problema central de la notación, esto es, crear un determinado
símbolo, se encargan los «plugins» o complementos añadidos. Cada
\header {
lsrtags = "rhythms"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
doctitlees = "Grabado manual de las ligaduras"
texidoces = "
Se pueden grabar a mano las ligaduras modificando la propiedad
\header {
lsrtags = "rhythms"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
doctitlees = "Escribir varios grupos especiales usando una sola instrucción \\times"
texidoces = "
La propiedad @code{tupletSpannerDuration} establece cuánto debe durar
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede simular un @qq{hammer} o ligado ascendente con ligaduras de
\header {
lsrtags = "winds"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se pueden conseguir símbolos especiales combinando glifos existentes,
lo que es de utilidad para la notación de instrumentos de viento.
\header {
lsrtags = "fretted-strings"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
En este ejemplo se combinan las digitaciones de la mano izquierda,
indicaciones del número de cuerda y digitaciones de la mano
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
\header {
lsrtags = "rhythms"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Son posibles tanto los corchetes rectos sobre notas sueltas como
extremos de barra sueltos en figuras unidas, con una combinación de
\header {
lsrtags = "simultaneous-notes, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
doctitlees = "Forzar el desplazamiento horizontal de las notas"
\header {
lsrtags = "vocal-music"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Si LilyPond no cree que haya sitio suficiente para un guión separador
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se pueden crear tablas alternativas de diagramas de posiciones. Se
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Armónicos sobre cuerdas pisadas (armónicos artificiales):
"
\header {
lsrtags = "pitches"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Este fragmento de código basado en Scheme genera
24 notas aleatorias (o tantas como se necesiten), basándose en la
\version "2.14.0"
\header {
-%%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
En muchos casos, las llaves que no están en la columna central se
\header {
lsrtags = "editorial-annotations"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede cambiar el aspecto de las líneas de rejilla
sobreescribiendo algunas de sus propiedades.
\header {
lsrtags = "editorial-annotations"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se pueden trazar líneas verticales normales entre pentagramas para
mostrar la relación entre notas; sin embargo, en caso de música
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Los patrones de barrado se pueden alterar con la propiedad
@code{beatGrouping}:
%
% This file is in the public domain.
%% Note: this file works from version 2.14.0
-\version "2.14.0"
+\version "2.15.10"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
hideFretNumber = {
\once \override TabNoteHead #'transparent = ##t
\once \override NoteHead #'transparent = ##t
- \once \override Stem #'transparent = ##t
+ \once \override Stem #'transparent = ##t \once \override Flag #'transparent = ##t
\once \override Flag #'transparent = ##t
\once \override NoteHead #'no-ledgers = ##t
\once \override Glissando #'(bound-details left padding) = #0.3
\header {
lsrtags = "rhythms, fretted-strings"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Para la música de guitarra, es posible mostrar los ritmos de rasgueo,
además de las notas de la melodía, acordes y diagramas de posiciones.
\header {
lsrtags = "expressive-marks, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Los reguladores pueden imprimirse en uno cualquiera de los estilos de
@code{line-interface}: discontinuo, punteado, línea, trino o zig-zag.
%% Note: this file works from version 2.14.0
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Aquí se muestra la manera de ocultar las alteraciones de las notas
\header {
lsrtags = "expressive-marks"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Los cambios de dinámica con estilo de texto (como cresc. y dim.)
se imprimen con una línea intermitente que muestra su alcance.
\header {
lsrtags = "vocal-music, template"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Este fragmento de código muestra una forma de preparar un himno cuando
cada línea comienza con un compás parcial. También muestra cómo
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Los «incipit» se pueden escribir utilizando el grob del nombre del
instruemento, pero manteniendo independientes las definiciones del
\header {
lsrtags = "keyboards"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Un corchete de arpegio puede indicar que se tienen que tocar con la
misma mano notas que están en dos pentagramas distintos. Para hacerlo,
\header {
lsrtags = "expressive-marks, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Las marcas de cesura se pueden crear sobreescribiendo la propiedad
@code{'text} del objeto @code{BreathingSign}. También está disponible
\header {
lsrtags = "repeats"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
También se pueden imprimir símbolos de porcentaje sueltos.
\header {
lsrtags = "keyboards, percussion, fretted-strings, template"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Ésta es una plantilla bastante avanzada, para un conjunto de
jazz. Observe que la notación de todos los instrumentos está en
\header {
lsrtags = "pitches, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Cuando se produce un cambio de clave, el símbolo de clave se imprime a
un tamaño menor que la clave inicial. Esto se puede ajustar con
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
La tablatura se puede formatear utilizando letras en lugar de números.
\header {
lsrtags = "expressive-marks, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se pueden aplicar puntas de flecha a los elementos de extensión de
texto y de línea (como el Glissando).
\header {
lsrtags = "text, vocal-music"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
La alineación horizontal de la letra se puede ajustar sobreescribiendo
la propiedad @code{self-alignment-X} del objeto @code{LyricText}.
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
El «Makam» es un tipo de melodía de Turquía que
utiliza alteraciones microtonales de 1/9 de tono. Consulte el
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Las ligaduras de expresión se pueden construir con patrones de
\header {
lsrtags = "staff-notation, editorial-annotations"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede engrosar una línea del pentagrama con fines pedagógicos
(p.ej. la tercera línea o la de la clave de Sol). Esto se puede
\header {
lsrtags = "repeats, staff-notation, editorial-annotations"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Este fragmento de código proporciona una solución alternativa a la
producción de contadores de compás utilizando repeticiones
\header {
lsrtags = "staff-notation, ancient-notation, contexts-and-engravers, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
La disposición «mensurstriche» en que las líneas divisorias no
están dibujadas sobre los pentagramas, sino entre ellos, se puede
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Utilice un texto de marcado para sustituir el glifo de clave (TAB) con
una fuente tipográfica moderna.
\header {
lsrtags = "expressive-marks"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Las abreviaturas se encuentran definidas dentro del archivo
@file{ly/script-init.ly}, donde las variables @code{dashHat},
\header {
lsrtags = "rhythms, simultaneous-notes, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Cuando se puede una nota en la voz superior para evitar la colisión
con una nota de otra voz, el comportamiento predeterminado es
\header {
lsrtags = "expressive-marks, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede ajustar la posición vertical de una ligadura de
expresión utilizando la propiedad @code{positions} del objeto
\header {
lsrtags = "rhythms, text"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Los elementos de marcado aplicados a un silencio multicompás se
centran encima o debajo de éste. Los elementos de marcado extensos
\header {
lsrtags = "staff-notation, contexts-and-engravers, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede utilizar la propiedad
@code{systemStartDelimiterHierarchy} para crear grupos de
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
LilyPond también proporciona funciones de formato para imprimir
números de grupo especial diferentes a la propia fracción, así
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
doctitlees = "Armaduras de tonalidad no tradicionales"
texidoces = "
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Las cabezas de nota de notación fácil utilizan la propiedad
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Referencia para armónicos sobre cuerdas al aire (armónicos naturales):
\header {
lsrtags = "pitches, staff-notation, vocal-music, template"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Esta plantilla muestra el uso de contextos @code{StaffGroup} y
@code{GrandStaff} anidados para sub-agrupar instrumentos del mismo
\header {
lsrtags = "pitches, text"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Internamente, @code{\\ottava} establece las propiedades
\header {
lsrtags = "rhythms"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
\header {
lsrtags = "repeats, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se pueden mostrar los contadores de las repeticiones del tipo
porcentaje a intervalos regulares mediante el establecimiento de
\header {
lsrtags = "repeats"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Las repeticiones de compases completos de más de dos repeticiones
pueden llevar un contador si se activa la propiedad adecuada, como se
\header {
lsrtags = "rhythms"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
doctitlees = "Permitir saltos de línea dentro de grupos especiales con barra"
texidoces = "
Este ejemplo artificial muestra cómo se pueden permitir tanto los
\header {
lsrtags = "keyboards, template"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Presentamos a continuación una plantilla de piano sencilla con algunas
notas.
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Muchas partituras de piano tienen las indicaciones dinámicas centradas
entre los dos pentagramas. El contexto @code{Dynamics}, si se sitúa
\header {
lsrtags = "text, keyboards, template"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
En lugar de tener un pentagrama dedicado a la melodía y la letra, ésta
se puede centrar entre los pentagramas de un sistema de piano.
\header {
lsrtags = "vocal-music, keyboards, template"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
He aquí el típico formato dde una canción: un pentagrama con la
melodía y la letra, y el acompañamiento de piano por debajo.
\header {
lsrtags = "fretted-strings"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Es posible ejercer un mayor control sobre la colocación de las
digitaciones de la mano derecha estableciendo el valor de una
\header {
lsrtags = "fretted-strings"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
La polifonía se crea de la misma forma en un @code{TabStaff} que
en una pauta normal.
\header {
lsrtags = "expressive-marks, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Si necesitamos alargar o acortar un símbolo de arpegio, podemos
modificar independientemente los extremos superior e inferior.
\header {
lsrtags = "rhythms"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Cuando se colocan figuras sobre líneas adicionales, sus barras se
\header {
lsrtags = "rhythms"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Al establecer la propiedad @code{'strict-grace-spacing} hacemos que
\header {
lsrtags = "rhythms, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
doctitlees = "Posicionar los silencios multicompás"
texidoces = "
A diferencia de los silencios normales, no existe una instrucción
\header {
lsrtags = "expressive-marks, editorial-annotations, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Los elementos de marcado de texto deben tener la propiedad
\header {
lsrtags = "pitches"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
doctitlees = "Evitar que se añadan becuadros adicionales automáticamente"
texidoces = "
\header {
lsrtags = "pitches"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
doctitlees = "Evitar que se impriman becuadros cuando cambia la armadura"
texidoces = "
\header {
lsrtags = "repeats, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede imprimir una línea divisoria de la forma @code{|:} al
principio de la pieza, sobreescribiendo la propiedad correspondiente:
\header {
lsrtags = "rhythms"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se pueden imprimir los números de compás a intervalos regulares
\header {
lsrtags = "rhythms, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Los números de compás también se pueden imprimir dentro de rectángulos o de circunferencias.
\header {
lsrtags = "expressive-marks"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se pueden imprimir reguladores con un círculo en la punta (notación
«al niente») estableciendo la propiedad @code{circled-tip} del objeto
\header {
lsrtags = "text"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
\header {
lsrtags = "text"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Aunque normalmente las marcas de texto sólo se imprimen sobre el
pentagrama superior, también se pueden imprimir en otro pentagrama
\header {
lsrtags = "rhythms, expressive-marks, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
De forma predeterminada, las indicaciones metronómicas y las
letras de ensayo se imprimen encima del pentagrama. Para
\header {
lsrtags = "tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede usar el contexto @code{NoteNames} para imprimir el valor
textual de las notas. La propiedad @code{printOctaveNames} activa o
\header {
lsrtags = "rhythms"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
De forma predeterminada se suprime el número del primer compás de una
\header {
lsrtags = "pitches, staff-notation"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Los pasajes citados tienen en cuenta la transposición de la fuente
tanto como la del destino. En este ejemplo, todos los
\header {
lsrtags = "staff-notation"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
La propiedad @code{quotedEventTypes} determina los tipos de eventos
\header {
lsrtags = "winds"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
El ejemplo siguiente muestra cómo se pueden realizar diagramas de
\header {
lsrtags = "rhythms"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Los valores predeterminados para las notas de adorno están
\header {
lsrtags = "rhythms, contexts-and-engravers"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se pueden eliminar completamente los números de compás quitando el
\header {
lsrtags = "rhythms, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
De forma predeterminada, las líneas divisorias en los grupos
StaffGroup, PianoStaff o GrandStaff se conectan entre los pentagramas.
\header {
lsrtags = "staff-notation, tweaks-and-overrides, breaks"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
El primer pentagrama vacío también se puede suprimir de la
partitura estableciendo la propiedad @code{remove-first} de
\header {
lsrtags = "rhythms, ancient-notation, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
doctitlees = "Estilos de silencios"
texidoces = "
Los silencios se pueden imprimir en distintos estilos.
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Para tipografiar las barras agrupadas en la forma @code{3-4-3-2} sólo
es necesario modificar la estructura de pulsos:
\header {
lsrtags = "vocal-music, template"
-%% Translation of GIT committish: b1bebb842d9762894fc7b2a178e2bdfcd544419f
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Plantilla de coro SATB (en cuatro pentagramas)
\header {
lsrtags = "expressive-marks, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Si la nota que da fin a un regulador cae sobre la primera parte de
un compás, el regulador se detiene en la línea divisoria
\header {
lsrtags = "staff-notation, tweaks-and-overrides, paper-and-layout"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se pueden insertar separadores sistema entre los sistemas de una
página. Se puede usar cualquier elemento de marcado, pero
%% Note: this file works from version 2.14.0
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
\header {
lsrtags = "expressive-marks"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Si los reguladores son demasiado cortos, se pueden alargar
modificando la propiedad @code{minimum-length} del objeto
\header {
lsrtags = "repeats"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
De forma predeterminada, los corchetes de primera y segunda vez se
trazan encima de los finales alternativos completos, pero es posible
\header {
lsrtags = "chords"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se pueden imprimir los acordes exclusivamente al comienzo de las
líneas y cuando cambia el acorde.
\header {
lsrtags = "chords"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Al juntar nombres de acorde en cifrado americano, melodía y letra,
obtenemos una hoja guía de acordes o «lead sheet»:
\header {
lsrtags = "vocal-music, chords, template"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Esta plantilla facilita la preparación de una canción con melodía,
letra y acordes.
\header {
lsrtags = "vocal-music, chords, template"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Presentamos a continuación un ejemplo de plantilla para una hoja
guía de acordes con melodía, letra, acordes y diagramas de
\header {
lsrtags = "chords, template"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
¿Quiere preparar una hoja guía de acordes (o «lead sheet») con
melodía y acordes? ¡No busque más!
\header {
lsrtags = "vocal-music, template"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Esta pequeña plantilla muestra una melodía sencilla con letra. Córtela
y péguela, escriba las notas y luego la letra. Este ejemplo desactiva
\header {
lsrtags = "template"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Esta plantilla simple prepara un pentagrama con notas, adecuado para
un instrumento solista o un fragmento melódico. Córtelo y péguelo en
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Los deslizamientos se pueden componer tipográficamente tanto en los
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
doctitlees = "Marca de pizzicato de chasquido (`pizzicato de Bartók')"
texidoces = "
El pizzicato de chasquido (también llamado @q{Pizzicato de Bartók}) es un
\header {
lsrtags = "text"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Los textos independientes se pueden disponer en varias columnas
utilizando instrucciones @code{\\markup}:
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
La dirección de las plicas se contola de la misma forma en la
tablatura que en la notación tradicional. Las barras se pueden
\header {
lsrtags = "unfretted-strings, template"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Esta plantilla muestra un cuarteto de cuerda normal. También utiliza
una sección @code{\\global} para el compás y la armadura
\header {
lsrtags = "unfretted-strings, template"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
El fragmento de código @qq{Plantilla de cuarteto de cuerda} produce un
resultado satisfactorio para el cuarteto, pero ¿y si tenemos que
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
\header {
lsrtags = "rhythms, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
A veces, la indicación de compás no debe imprimir la fracción completa
\header {
lsrtags = "ancient-notation, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
A modo de alternativa para obtener auténticos «incipit»
independientes de la partitura principal, se incluyen como
\header {
lsrtags = "pitches"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
doctitlees = "Transportar música con el menor número de alteraciones"
texidoces = "
Este ejemplo utiliza código de Scheme para forzar las
\header {
lsrtags = "pitches, staff-notation, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
doctitlees = "Trucaje de las propiedades de clave"
texidoces = "
La instrucción @code{\\clef \"treble_8\"} equivale a un ajuste de
\header {
lsrtags = "rhythms, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
La disposición de las expresiones de adorno se puede cambiar a lo
\header {
lsrtags = "staff-notation, contexts-and-engravers"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se puede usar el delimitador de comienzo de un sistema
@code{SystemStartSquare} estableciéndolo explícitamente dentro de
\header {
lsrtags = "rhythms, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Se pueden imprimir estilos alternativos del corchete o gancho de las
\header {
lsrtags = "expressive-marks, vocal-music"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
El corchete de arpegios @code{arpeggioBracket} se puede usar para
indicar la división de voces cuando no hay plicas que puedan ofrecer
\header {
lsrtags = "expressive-marks"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Algunos compositores escriben dos ligaduras cuando quieren acordes
legato. Esto se puede conseguir estableciendo @code{doubleSlurs}.
\header {
lsrtags = "rhythms"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Es posible aplicar la barrita que cruza la barra de las
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
\header {
lsrtags = "rhythms"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
doctitlees = "Uso de ligaduras en los arpegios"
texidoces = "
En ocasiones se usan ligaduras de unión para escribir los arpegios.
\header {
lsrtags = "tweaks-and-overrides, spacing"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Mediante el establecimiento de la propiedad @code{'Y-extent} a un valor
adecuado, todos los objetos @code{DynamicLineSpanner} (reguladores e
\header {
lsrtags = "expressive-marks"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Las expresiones dinámicas que se comienzan, terminan o se producen
en la misma nota se alinean verticalmente. Para asegurar que las
\header {
lsrtags = "vocal-music, tweaks-and-overrides, spacing"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Este fragmento de código muestra el uso de las propiedades de
contexto @code{alignBelowContext} y @code{alignAboveContext} para
\header {
lsrtags = "chords, tweaks-and-overrides"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Allí donde se utilicen líneas extensoras para el bajo cifrado mediante
el establecimiento de @code{useBassFigureExtenders} al valor
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Esta plantilla añade una reducción de piano automática a la partitura
\header {
lsrtags = "text, vocal-music, contexts-and-engravers, template"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Esta plantilla es, básicamente, la misma que la sencilla plantilla
@qq{Conjunto vocal}, excepto que aquí todas las líneas de letra se
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Esta plantilla crea una partitura que comienza con una estrofa para
\version "2.14.0"
\header {
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
He aquí una partitura vocal estándar para cuatro voces SATB. Con
grupos mayores, suele ser útil incluir una sección que aparezca en
\header {
lsrtags = "repeats, staff-notation, chords"
-%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
Mediante la adición del grabador @code{Volta_engraver} al
pentagrama pertinente, se pueden poner los corchetes de primera y
\version "2.14.0"
\header {
-%%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
\version "2.14.0"
\header {
-%%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
+%%% Translation of GIT committish: 2d548a99cb9dba80f2ff035582009477cd37eceb
texidoces = "
El fragmento de música que aparece a continuación presenta todos los
diagramas de viento madera que se encuentran definidos en LilyPond por
@c used for news about the upcoming release; see CG 10.2
+@newsItem
+@subsubheading LilyPond 2.15.14 released! @emph{October 7, 2011}
+
+We are happy to announce the release of LilyPond 2.15.14. This
+release contains the usual number of bugfixes.
+
+It is strongly recommended that normal users do @strong{not} use
+this release, and instead use the stable 2.14 version. Please
+note that due to a few Critical bugs, this is not the next release
+candidate.
+
+@newsEnd
+
+
@newsItem
@subsubheading LilyPond 2.15.13 released! @emph{September 27, 2011}
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=15
-PATCH_LEVEL=14
+PATCH_LEVEL=15
MY_PATCH_LEVEL=
VERSION_STABLE=2.14.2
-VERSION_DEVEL=2.15.13
+VERSION_DEVEL=2.15.14
--- /dev/null
+\version "2.15.12"
+
+\header {
+ texidoc = "@code{NoteColumn} grobs can be skipped over by glissandi.
+"
+}
+
+\relative c' {
+ a2 \glissando
+ \once \override NoteColumn #'glissando-skip = ##t
+ f''4 d,
+}
--- /dev/null
+\version "2.15.14"
+
+\header {
+ texidoc ="It is possible to use the part combiner for three
+ voices with \\partcombineUp and \\partcombineDown."
+}
+
+
+soprano = { d''2 f'' g'' }
+alto = { a' c''4 d'' e''2 }
+tenor = { f'2 a'4 b' c''2 }
+basso = { d'4 e' f' g' g'2 }
+
+\new Staff << \partcombineUp \soprano \alto \\ \basso >>
+
+\new Staff << \soprano \\ \partcombineDown \tenor \basso >>
+
+
{
}
-Audio_span_dynamic::Audio_span_dynamic ()
+Audio_span_dynamic::Audio_span_dynamic (Real min_volume, Real max_volume)
{
grow_dir_ = CENTER;
+ min_volume_ = min_volume;
+ max_volume_ = max_volume;
}
void
Real start_v = dynamics_[0]->volume_;
if (dynamics_.back ()->volume_ < 0)
- dynamics_.back ()->volume_ = max (min (start_v + grow_dir_ * 0.25, 1.0), 0.1);
+ dynamics_.back ()->volume_ = max (min (start_v + grow_dir_ * 0.25, max_volume_), min_volume_);
delta_v = dynamics_.back ()->volume_ - dynamics_[0]->volume_;
#include "direction.hh"
#include "directional-element-interface.hh"
#include "grob.hh"
+#include "grob-array.hh"
+#include "item.hh"
#include "international.hh"
+#include "least-squares.hh"
#include "libc-extension.hh"
#include "main.hh"
+#include "note-head.hh"
#include "output-def.hh"
#include "pointer-group-interface.hh"
+#include "rhythmic-head.hh"
#include "staff-symbol-referencer.hh"
#include "stencil.hh"
#include "stem.hh"
Real
Beam_scoring_problem::y_at (Real x, Beam_configuration const *p) const
{
- return p->y[LEFT] + (x - x_span[LEFT]) * p->y.delta () / x_span.delta ();
+ return p->y[LEFT] + (x - x_span_[LEFT]) * p->y.delta () / x_span_.delta ();
}
/****************************************************************/
void Beam_scoring_problem::add_collision (Real x, Interval y,
Real score_factor)
{
- if (edge_dirs[LEFT] == edge_dirs[RIGHT])
+ if (edge_dirs_[LEFT] == edge_dirs_[RIGHT])
{
- Direction d = edge_dirs[LEFT];
+ Direction d = edge_dirs_[LEFT];
- Real quant_range_y = quant_range[LEFT][-d]
- + (x - x_span[LEFT]) * (quant_range[RIGHT][-d] - quant_range[LEFT][-d]) / x_span.delta ();
+ Real quant_range_y = quant_range_[LEFT][-d]
+ + (x - x_span_[LEFT]) * (quant_range_[RIGHT][-d] - quant_range_[LEFT][-d]) / x_span_.delta ();
if (d * (quant_range_y - minmax (d, y[UP], y[DOWN])) > 0)
{
for (vsize j = 0; j < segments_.size (); j++)
{
if (segments_[j].horizontal_.contains (x))
- c.beam_y_.add_point (segments_[j].vertical_count_ * beam_translation);
+ c.beam_y_.add_point (segments_[j].vertical_count_ * beam_translation_);
if (segments_[j].horizontal_[LEFT] > x)
break;
}
- c.beam_y_.widen (0.5 * beam_thickness);
+ c.beam_y_.widen (0.5 * beam_thickness_);
c.x_ = x;
- y *= 1 / staff_space;
+ y *= 1 / staff_space_;
c.y_ = y;
c.base_penalty_ = score_factor;
collisions_.push_back (c);
void Beam_scoring_problem::init_collisions (vector<Grob *> grobs)
{
Grob *common_x = NULL;
- segments_ = Beam::get_beam_segments (beam, &common_x);
+ segments_ = Beam::get_beam_segments (beam_, &common_x);
vector_sort (segments_, beam_segment_less);
- if (common[X_AXIS] != common_x)
+ if (common_[X_AXIS] != common_x)
{
programming_error ("Disagree on common x. Skipping collisions in beam scoring.");
return;
{
Box b;
for (Axis a = X_AXIS; a < NO_AXES; incr (a))
- b[a] = grobs[i]->extent (common[a], a);
+ b[a] = grobs[i]->extent (common_[a], a);
Real width = b[X_AXIS].length ();
- Real width_factor = sqrt (width / staff_space);
+ Real width_factor = sqrt (width / staff_space_);
Direction d = LEFT;
do
for (set<Grob *>::const_iterator it (stems.begin ()); it != stems.end (); it++)
{
Grob *s = *it;
- Real x = s->extent (common[X_AXIS], X_AXIS).center ();
+ Real x = s->extent (common_[X_AXIS], X_AXIS).center ();
Direction stem_dir = get_grob_direction (*it);
Interval y;
y.set_full ();
- y[-stem_dir] = Stem::chord_start_y (*it) + (*it)->relative_coordinate (common[Y_AXIS], Y_AXIS)
- - beam->relative_coordinate (common[Y_AXIS], Y_AXIS);
+ y[-stem_dir] = Stem::chord_start_y (*it) + (*it)->relative_coordinate (common_[Y_AXIS], Y_AXIS)
+ - beam_->relative_coordinate (common_[Y_AXIS], Y_AXIS);
- Real factor = parameters.STEM_COLLISION_FACTOR;
+ Real factor = parameters_.STEM_COLLISION_FACTOR;
if (!unsmob_grob (s->get_object ("beam")))
factor = 1.0;
add_collision (x, y, factor);
void Beam_scoring_problem::init_stems ()
{
- extract_grob_set (beam, "covered-grobs", collisions);
- extract_grob_set (beam, "stems", stems);
+ extract_grob_set (beam_, "covered-grobs", collisions);
+ extract_grob_set (beam_, "stems", stems);
for (int a = 2; a--;)
{
- common[a] = common_refpoint_of_array (stems, beam, Axis (a));
- common[a] = common_refpoint_of_array (collisions, common[a], Axis (a));
+ common_[a] = common_refpoint_of_array (stems, beam_, Axis (a));
+ common_[a] = common_refpoint_of_array (collisions, common_[a], Axis (a));
}
- Drul_array<Grob *> edge_stems (Beam::first_normal_stem (beam),
- Beam::last_normal_stem (beam));
+ Drul_array<Grob *> edge_stems (Beam::first_normal_stem (beam_),
+ Beam::last_normal_stem (beam_));
Direction d = LEFT;
do
- x_span[d] = edge_stems[d] ? edge_stems[d]->relative_coordinate (common[X_AXIS], X_AXIS) : 0.0;
+ x_span_[d] = edge_stems[d] ? edge_stems[d]->relative_coordinate (common_[X_AXIS], X_AXIS) : 0.0;
while (flip (&d) != LEFT);
Drul_array<bool> dirs_found (0, 0);
continue;
Stem_info si (Stem::get_stem_info (s));
- si.scale (1 / staff_space);
- stem_infos.push_back (si);
+ si.scale (1 / staff_space_);
+ stem_infos_.push_back (si);
dirs_found[si.dir_] = true;
bool f = to_boolean (s->get_property ("french-beaming"))
&& s != edge_stems[LEFT] && s != edge_stems[RIGHT];
- Real y = Beam::calc_stem_y (beam, s, common, x_span[LEFT], x_span[RIGHT], CENTER,
+ Real y = Beam::calc_stem_y (beam_, s, common_, x_span_[LEFT], x_span_[RIGHT], CENTER,
Interval (0, 0), f);
- base_lengths.push_back (y / staff_space);
- stem_xpositions.push_back (s->relative_coordinate (common[X_AXIS], X_AXIS));
+ base_lengths_.push_back (y / staff_space_);
+ stem_xpositions_.push_back (s->relative_coordinate (common_[X_AXIS], X_AXIS));
}
- edge_dirs = Drul_array<Direction> (CENTER, CENTER);
- if (stem_infos.size ())
+ edge_dirs_ = Drul_array<Direction> (CENTER, CENTER);
+ if (stem_infos_.size ())
{
- edge_dirs = Drul_array<Direction> (stem_infos[0].dir_,
- stem_infos.back ().dir_);
+ edge_dirs_ = Drul_array<Direction> (stem_infos_[0].dir_,
+ stem_infos_.back ().dir_);
}
- is_xstaff = Align_interface::has_interface (common[Y_AXIS]);
- is_knee = dirs_found[LEFT] && dirs_found[RIGHT];
+ is_xstaff_ = Align_interface::has_interface (common_[Y_AXIS]);
+ is_knee_ = dirs_found[LEFT] && dirs_found[RIGHT];
- staff_radius = Staff_symbol_referencer::staff_radius (beam);
- edge_beam_counts = Drul_array<int>
+ staff_radius_ = Staff_symbol_referencer::staff_radius (beam_);
+ edge_beam_counts_ = Drul_array<int>
(Stem::beam_multiplicity (stems[0]).length () + 1,
Stem::beam_multiplicity (stems.back ()).length () + 1);
- // TODO - why are we dividing by staff_space?
- beam_translation = Beam::get_beam_translation (beam) / staff_space;
+ // TODO - why are we dividing by staff_space_?
+ beam_translation_ = Beam::get_beam_translation (beam_) / staff_space_;
d = LEFT;
do
{
- quant_range[d].set_full ();
+ quant_range_[d].set_full ();
if (!edge_stems[d])
continue;
- Real stem_offset = edge_stems[d]->relative_coordinate (common[Y_AXIS], Y_AXIS)
- - beam->relative_coordinate (common[Y_AXIS], Y_AXIS);
- Interval heads = Stem::head_positions (edge_stems[d]) * 0.5 * staff_space;
+ Real stem_offset = edge_stems[d]->relative_coordinate (common_[Y_AXIS], Y_AXIS)
+ - beam_->relative_coordinate (common_[Y_AXIS], Y_AXIS);
+ Interval heads = Stem::head_positions (edge_stems[d]) * 0.5 * staff_space_;
- Direction ed = edge_dirs[d];
- heads.widen (0.5 * staff_space
- + (edge_beam_counts[d] - 1) * beam_translation + beam_thickness * .5);
- quant_range[d][-ed] = heads[ed] + stem_offset;
+ Direction ed = edge_dirs_[d];
+ heads.widen (0.5 * staff_space_
+ + (edge_beam_counts_[d] - 1) * beam_translation_ + beam_thickness_ * .5);
+ quant_range_[d][-ed] = heads[ed] + stem_offset;
}
while (flip (&d) != LEFT);
Beam_scoring_problem::Beam_scoring_problem (Grob *me, Drul_array<Real> ys)
{
- beam = me;
- unquanted_y = ys;
+ beam_ = me;
+ unquanted_y_ = ys;
/*
Calculations are relative to a unit-scaled staff, i.e. the quants are
- divided by the current staff_space.
+ divided by the current staff_space_.
*/
- staff_space = Staff_symbol_referencer::staff_space (me);
- beam_thickness = Beam::get_beam_thickness (me) / staff_space;
- line_thickness = Staff_symbol_referencer::line_thickness (me) / staff_space;
+ staff_space_ = Staff_symbol_referencer::staff_space (me);
+ beam_thickness_ = Beam::get_beam_thickness (me) / staff_space_;
+ line_thickness_ = Staff_symbol_referencer::line_thickness (me) / staff_space_;
// This is the least-squares DY, corrected for concave beams.
- musical_dy = robust_scm2double (me->get_property ("least-squares-dy"), 0);
+ musical_dy_ = robust_scm2double (me->get_property ("least-squares-dy"), 0);
- parameters.fill (me);
+ parameters_.fill (me);
init_stems ();
}
+// Assuming V is not empty, pick a 'reasonable' point inside V.
+static Real
+point_in_interval (Interval v, Real dist)
+{
+ if (isinf (v[DOWN]))
+ return v[UP] - dist;
+ else if (isinf (v[UP]))
+ return v[DOWN] + dist;
+ else
+ return v.center ();
+}
+
+/* Set stem's shorten property if unset.
+
+TODO:
+take some y-position (chord/beam/nearest?) into account
+scmify forced-fraction
+
+This is done in beam because the shorten has to be uniform over the
+entire beam.
+*/
+
+void
+set_minimum_dy (Grob *me, Real *dy)
+{
+ if (*dy)
+ {
+ /*
+ If dy is smaller than the smallest quant, we
+ get absurd direction-sign penalties.
+ */
+
+ Real ss = Staff_symbol_referencer::staff_space (me);
+ Real beam_thickness = Beam::get_beam_thickness (me) / ss;
+ Real slt = Staff_symbol_referencer::line_thickness (me) / ss;
+ Real sit = (beam_thickness - slt) / 2;
+ Real inter = 0.5;
+ Real hang = 1.0 - (beam_thickness - slt) / 2;
+
+ *dy = sign (*dy) * max (fabs (*dy),
+ min (min (sit, inter), hang));
+ }
+}
+
+Interval
+Beam::no_visible_stem_positions (Grob *me, Interval default_value)
+{
+ extract_grob_set (me, "stems", stems);
+ if (stems.empty ())
+ return default_value;
+
+ Interval head_positions;
+ Slice multiplicity;
+ for (vsize i = 0; i < stems.size (); i++)
+ {
+ head_positions.unite (Stem::head_positions (stems[i]));
+ multiplicity.unite (Stem::beam_multiplicity (stems[i]));
+ }
+
+ Direction dir = get_grob_direction (me);
+
+ if (!dir)
+ programming_error ("The beam should have a direction by now.");
+
+ Real y = head_positions.linear_combination (dir)
+ * 0.5 * Staff_symbol_referencer::staff_space (me)
+ + dir * get_beam_translation (me) * (multiplicity.length () + 1);
+
+ y /= Staff_symbol_referencer::staff_space (me);
+ return Interval (y, y);
+}
+
+/*
+ Compute a first approximation to the beam slope.
+*/
+MAKE_SCHEME_CALLBACK (Beam, calc_least_squares_positions, 2);
+SCM
+Beam::calc_least_squares_positions (SCM smob, SCM /* posns */)
+{
+ Grob *me = unsmob_grob (smob);
+
+ int count = normal_stem_count (me);
+ Interval pos (0, 0);
+ if (count < 1)
+ return ly_interval2scm (no_visible_stem_positions (me, pos));
+
+ vector<Real> x_posns;
+ extract_grob_set (me, "normal-stems", stems);
+ Grob *commonx = common_refpoint_of_array (stems, me, X_AXIS);
+ Grob *commony = common_refpoint_of_array (stems, me, Y_AXIS);
+
+ Real my_y = me->relative_coordinate (commony, Y_AXIS);
+
+ Grob *fvs = first_normal_stem (me);
+ Grob *lvs = last_normal_stem (me);
+
+ Interval ideal (Stem::get_stem_info (fvs).ideal_y_
+ + fvs->relative_coordinate (commony, Y_AXIS) - my_y,
+ Stem::get_stem_info (lvs).ideal_y_
+ + lvs->relative_coordinate (commony, Y_AXIS) - my_y);
+
+ Real x0 = first_normal_stem (me)->relative_coordinate (commonx, X_AXIS);
+ for (vsize i = 0; i < stems.size (); i++)
+ {
+ Grob *s = stems[i];
+
+ Real x = s->relative_coordinate (commonx, X_AXIS) - x0;
+ x_posns.push_back (x);
+ }
+ Real dx = last_normal_stem (me)->relative_coordinate (commonx, X_AXIS) - x0;
+
+ Real y = 0;
+ Real slope = 0;
+ Real dy = 0;
+ Real ldy = 0.0;
+ if (!ideal.delta ())
+ {
+ Interval chord (Stem::chord_start_y (stems[0]),
+ Stem::chord_start_y (stems.back ()));
+
+ /* Simple beams (2 stems) on middle line should be allowed to be
+ slightly sloped.
+
+ However, if both stems reach middle line,
+ ideal[LEFT] == ideal[RIGHT] and ideal.delta () == 0.
+
+ For that case, we apply artificial slope */
+ if (!ideal[LEFT] && chord.delta () && count == 2)
+ {
+ /* FIXME. -> UP */
+ Direction d = (Direction) (sign (chord.delta ()) * UP);
+ pos[d] = get_beam_thickness (me) / 2;
+ pos[-d] = -pos[d];
+ }
+ else
+ pos = ideal;
+
+ /*
+ For broken beams this doesn't work well. In this case, the
+ slope esp. of the first part of a broken beam should predict
+ where the second part goes.
+ */
+ ldy = pos[RIGHT] - pos[LEFT];
+ }
+ else
+ {
+ vector<Offset> ideals;
+ for (vsize i = 0; i < stems.size (); i++)
+ {
+ Grob *s = stems[i];
+ ideals.push_back (Offset (x_posns[i],
+ Stem::get_stem_info (s).ideal_y_
+ + s->relative_coordinate (commony, Y_AXIS)
+ - my_y));
+ }
+
+ minimise_least_squares (&slope, &y, ideals);
+
+ dy = slope * dx;
+
+ set_minimum_dy (me, &dy);
+
+ ldy = dy;
+ pos = Interval (y, (y + dy));
+ }
+
+ /*
+ "position" is relative to the staff.
+ */
+ scale_drul (&pos, 1 / Staff_symbol_referencer::staff_space (me));
+
+ me->set_property ("least-squares-dy", scm_from_double (ldy));
+ return ly_interval2scm (pos);
+}
+
+/* This neat trick is by Werner Lemberg,
+ damped = tanh (slope)
+ corresponds with some tables in [Wanske] CHECKME */
+MAKE_SCHEME_CALLBACK (Beam, slope_damping, 2);
+SCM
+Beam::slope_damping (SCM smob, SCM posns)
+{
+ Grob *me = unsmob_grob (smob);
+ Drul_array<Real> pos = ly_scm2interval (posns);
+
+ if (normal_stem_count (me) <= 1)
+ return posns;
+
+ SCM s = me->get_property ("damping");
+ Real damping = scm_to_double (s);
+ Real concaveness = robust_scm2double (me->get_property ("concaveness"), 0.0);
+ if (concaveness >= 10000)
+ {
+ pos[LEFT] = pos[RIGHT];
+ me->set_property ("least-squares-dy", scm_from_double (0));
+ damping = 0;
+ }
+
+ if (damping)
+ {
+ scale_drul (&pos, Staff_symbol_referencer::staff_space (me));
+
+ Real dy = pos[RIGHT] - pos[LEFT];
+
+ Grob *fvs = first_normal_stem (me);
+ Grob *lvs = last_normal_stem (me);
+
+ Grob *commonx = fvs->common_refpoint (lvs, X_AXIS);
+
+ Real dx = last_normal_stem (me)->relative_coordinate (commonx, X_AXIS)
+ - first_normal_stem (me)->relative_coordinate (commonx, X_AXIS);
+
+ Real slope = dy && dx ? dy / dx : 0;
+
+ slope = 0.6 * tanh (slope) / (damping + concaveness);
+
+ Real damped_dy = slope * dx;
+
+ set_minimum_dy (me, &damped_dy);
+
+ pos[LEFT] += (dy - damped_dy) / 2;
+ pos[RIGHT] -= (dy - damped_dy) / 2;
+
+ scale_drul (&pos, 1 / Staff_symbol_referencer::staff_space (me));
+ }
+
+ return ly_interval2scm (pos);
+}
+
+/*
+ We can't combine with previous function, since check concave and
+ slope damping comes first.
+
+ TODO: we should use the concaveness to control the amount of damping
+ applied.
+*/
+MAKE_SCHEME_CALLBACK (Beam, shift_region_to_valid, 2);
+SCM
+Beam::shift_region_to_valid (SCM grob, SCM posns)
+{
+ Grob *me = unsmob_grob (grob);
+
+ /*
+ Code dup.
+ */
+ vector<Real> x_posns;
+ extract_grob_set (me, "stems", stems);
+ extract_grob_set (me, "covered-grobs", covered);
+
+ Grob *common[NO_AXES] = { me, me };
+ for (Axis a = X_AXIS; a < NO_AXES; incr (a))
+ {
+ common[a] = common_refpoint_of_array (stems, me, a);
+ common[a] = common_refpoint_of_array (covered, common[a], a);
+ }
+ Grob *fvs = first_normal_stem (me);
+
+ if (!fvs)
+ return posns;
+ Interval x_span;
+ x_span[LEFT] = fvs->relative_coordinate (common[X_AXIS], X_AXIS);
+ for (vsize i = 0; i < stems.size (); i++)
+ {
+ Grob *s = stems[i];
+
+ Real x = s->relative_coordinate (common[X_AXIS], X_AXIS) - x_span[LEFT];
+ x_posns.push_back (x);
+ }
+
+ Grob *lvs = last_normal_stem (me);
+ x_span[RIGHT] = lvs->relative_coordinate (common[X_AXIS], X_AXIS);
+
+ Drul_array<Real> pos = ly_scm2interval (posns);
+
+ scale_drul (&pos, Staff_symbol_referencer::staff_space (me));
+
+ Real beam_dy = pos[RIGHT] - pos[LEFT];
+ Real beam_left_y = pos[LEFT];
+ Real slope = x_span.delta () ? (beam_dy / x_span.delta ()) : 0.0;
+
+ /*
+ Shift the positions so that we have a chance of finding good
+ quants (i.e. no short stem failures.)
+ */
+ Interval feasible_left_point;
+ feasible_left_point.set_full ();
+
+ for (vsize i = 0; i < stems.size (); i++)
+ {
+ Grob *s = stems[i];
+ if (Stem::is_invisible (s))
+ continue;
+
+ Direction d = get_grob_direction (s);
+ Real left_y
+ = Stem::get_stem_info (s).shortest_y_
+ - slope * x_posns [i];
+
+ /*
+ left_y is now relative to the stem S. We want relative to
+ ourselves, so translate:
+ */
+ left_y
+ += + s->relative_coordinate (common[Y_AXIS], Y_AXIS)
+ - me->relative_coordinate (common[Y_AXIS], Y_AXIS);
+
+ Interval flp;
+ flp.set_full ();
+ flp[-d] = left_y;
+
+ feasible_left_point.intersect (flp);
+ }
+
+ vector<Grob *> filtered;
+ /*
+ We only update these for objects that are too large for quanting
+ to find a workaround. Typically, these are notes with
+ stems, and timesig/keysig/clef, which take out the entire area
+ inside the staff as feasible.
+
+ The code below disregards the thickness and multiplicity of the
+ beam. This should not be a problem, as the beam quanting will
+ take care of computing the impact those exactly.
+ */
+ Real min_y_size = 2.0;
+
+ // A list of intervals into which beams may not fall
+ vector<Interval> forbidden_intervals;
+
+ for (vsize i = 0; i < covered.size (); i++)
+ {
+ if (!covered[i]->is_live ())
+ continue;
+
+ if (Beam::has_interface (covered[i]) && is_cross_staff (covered[i]))
+ continue;
+
+ Box b;
+ for (Axis a = X_AXIS; a < NO_AXES; incr (a))
+ b[a] = covered[i]->extent (common[a], a);
+
+ if (b[X_AXIS].is_empty () || b[Y_AXIS].is_empty ())
+ continue;
+
+ if (intersection (b[X_AXIS], x_span).is_empty ())
+ continue;
+
+ filtered.push_back (covered[i]);
+ Grob *head_stem = Rhythmic_head::get_stem (covered[i]);
+ if (head_stem && Stem::is_normal_stem (head_stem)
+ && Note_head::has_interface (covered[i]))
+ {
+ if (Stem::get_beam (head_stem))
+ {
+ /*
+ We must assume that stems are infinitely long in this
+ case, as asking for the length of the stem typically
+ leads to circular dependencies.
+
+ This strategy assumes that we don't want to handle the
+ collision of beams in opposite non-forced directions
+ with this code, where shortening the stems of both
+ would resolve the problem, eg.
+
+ x x
+ | |
+ =====
+
+ =====
+ | |
+ x x
+
+ Such beams would need a coordinating grob to resolve
+ the collision, since both will likely want to occupy
+ the centerline.
+ */
+ Direction stemdir = get_grob_direction (head_stem);
+ b[Y_AXIS][stemdir] = stemdir * infinity_f;
+ }
+ else
+ {
+ // TODO - should we include the extent of the stem here?
+ }
+ }
+
+ if (b[Y_AXIS].length () < min_y_size)
+ continue;
+
+ Direction d = LEFT;
+ do
+ {
+ Real x = b[X_AXIS][d] - x_span[LEFT];
+ Real dy = slope * x;
+
+ Direction yd = DOWN;
+ Interval disallowed;
+ do
+ {
+ Real left_y = b[Y_AXIS][yd];
+
+ left_y -= dy;
+
+ // Translate back to beam as ref point.
+ left_y -= me->relative_coordinate (common[Y_AXIS], Y_AXIS);
+
+ disallowed[yd] = left_y;
+ }
+ while (flip (&yd) != DOWN);
+
+ forbidden_intervals.push_back (disallowed);
+ }
+ while (flip (&d) != LEFT);
+ }
+
+ Grob_array *arr
+ = Pointer_group_interface::get_grob_array (me,
+ ly_symbol2scm ("covered-grobs"));
+ arr->set_array (filtered);
+
+ vector_sort (forbidden_intervals, Interval::left_less);
+ Real epsilon = 1.0e-10;
+ Interval feasible_beam_placements (beam_left_y, beam_left_y);
+
+ /*
+ forbidden_intervals contains a vector of intervals in which
+ the beam cannot start. it iterates through these intervals,
+ pushing feasible_beam_placements epsilon over or epsilon under a
+ collision. when this type of change happens, the loop is marked
+ as "dirty" and re-iterated.
+
+ TODO: figure out a faster ways that this loop can happen via
+ a better search algorithm and/or OOP.
+ */
+
+ bool dirty = false;
+ do
+ {
+ dirty = false;
+ for (vsize i = 0; i < forbidden_intervals.size (); i++)
+ {
+ Direction d = DOWN;
+ do
+ {
+ if (forbidden_intervals[i][d] == d * infinity_f)
+ feasible_beam_placements[d] = d * infinity_f;
+ else if (forbidden_intervals[i].contains (feasible_beam_placements[d]))
+ {
+ feasible_beam_placements[d] = d * epsilon + forbidden_intervals[i][d];
+ dirty = true;
+ }
+ }
+ while (flip (&d) != DOWN);
+ }
+ }
+ while (dirty);
+
+ // if the beam placement falls out of the feasible region, we push it
+ // to infinity so that it can never be a feasible candidate below
+ Direction d = DOWN;
+ do
+ {
+ if (!feasible_left_point.contains (feasible_beam_placements[d]))
+ feasible_beam_placements[d] = d * infinity_f;
+ }
+ while (flip (&d) != DOWN);
+
+ if ((feasible_beam_placements[UP] == infinity_f && feasible_beam_placements[DOWN] == -infinity_f) && !feasible_left_point.is_empty ())
+ {
+ // We are somewhat screwed: we have a collision, but at least
+ // there is a way to satisfy stem length constraints.
+ beam_left_y = point_in_interval (feasible_left_point, 2.0);
+ }
+ else if (!feasible_left_point.is_empty ())
+ {
+ // Only one of them offers is feasible solution. Pick that one.
+ if (abs (beam_left_y - feasible_beam_placements[DOWN]) > abs (beam_left_y - feasible_beam_placements[UP]))
+ beam_left_y = feasible_beam_placements[UP];
+ else
+ beam_left_y = feasible_beam_placements[DOWN];
+ }
+ else
+ {
+ // We are completely screwed.
+ me->warning (_ ("no viable initial configuration found: may not find good beam slope"));
+ }
+
+ pos = Drul_array<Real> (beam_left_y, (beam_left_y + beam_dy));
+ scale_drul (&pos, 1 / Staff_symbol_referencer::staff_space (me));
+
+ return ly_interval2scm (pos);
+}
+
void
Beam_scoring_problem::generate_quants (vector<Beam_configuration *> *scores) const
{
- int region_size = (int) parameters.REGION_SIZE;
+ int region_size = (int) parameters_.REGION_SIZE;
// Knees and collisions are harder, lets try some more possibilities
- if (is_knee)
+ if (is_knee_)
region_size += 2;
if (collisions_.size ())
region_size += 2;
Real straddle = 0.0;
- Real sit = (beam_thickness - line_thickness) / 2;
+ Real sit = (beam_thickness_ - line_thickness_) / 2;
Real inter = 0.5;
- Real hang = 1.0 - (beam_thickness - line_thickness) / 2;
+ Real hang = 1.0 - (beam_thickness_ - line_thickness_) / 2;
Real base_quants [] = {straddle, sit, inter, hang};
int num_base_quants = int (sizeof (base_quants) / sizeof (Real));
for (vsize j = 0; j < unshifted_quants.size (); j++)
{
Beam_configuration *c
- = Beam_configuration::new_config (unquanted_y,
+ = Beam_configuration::new_config (unquanted_y_,
Interval (unshifted_quants[i],
unshifted_quants[j]));
Direction d = LEFT;
do
{
- if (!quant_range[d].contains (c->y[d]))
+ if (!quant_range_[d].contains (c->y[d]))
{
delete c;
c = NULL;
if (configs.empty ())
{
programming_error ("No viable beam quanting found. Using unquanted y value.");
- return unquanted_y;
+ return unquanted_y_;
}
Beam_configuration *best = NULL;
bool debug
- = to_boolean (beam->layout ()->lookup_variable (ly_symbol2scm ("debug-beam-scoring")));
- SCM inspect_quants = beam->get_property ("inspect-quants");
+ = to_boolean (beam_->layout ()->lookup_variable (ly_symbol2scm ("debug-beam-scoring")));
+ SCM inspect_quants = beam_->get_property ("inspect-quants");
if (scm_is_pair (inspect_quants))
{
debug = true;
}
string card = best->score_card_ + to_string (" c%d/%d", completed, configs.size ());
- beam->set_property ("annotation", ly_string2scm (card));
+ beam_->set_property ("annotation", ly_string2scm (card));
}
#endif
void
Beam_scoring_problem::score_stem_lengths (Beam_configuration *config) const
{
- Real limit_penalty = parameters.STEM_LENGTH_LIMIT_PENALTY;
+ Real limit_penalty = parameters_.STEM_LENGTH_LIMIT_PENALTY;
Drul_array<Real> score (0, 0);
Drul_array<int> count (0, 0);
- for (vsize i = 0; i < stem_xpositions.size (); i++)
+ for (vsize i = 0; i < stem_xpositions_.size (); i++)
{
- Real x = stem_xpositions[i];
- Real dx = x_span.delta ();
+ Real x = stem_xpositions_[i];
+ Real dx = x_span_.delta ();
Real beam_y = dx
- ? config->y[RIGHT] * (x - x_span[LEFT]) / dx + config->y[LEFT] * (x_span[RIGHT] - x) / dx
+ ? config->y[RIGHT] * (x - x_span_[LEFT]) / dx + config->y[LEFT] * (x_span_[RIGHT] - x) / dx
: (config->y[RIGHT] + config->y[LEFT]) / 2;
- Real current_y = beam_y + base_lengths[i];
- Real length_pen = parameters.STEM_LENGTH_DEMERIT_FACTOR;
+ Real current_y = beam_y + base_lengths_[i];
+ Real length_pen = parameters_.STEM_LENGTH_DEMERIT_FACTOR;
- Stem_info info = stem_infos[i];
+ Stem_info info = stem_infos_[i];
Direction d = info.dir_;
score[d] += limit_penalty * max (0.0, (d * (info.shortest_y_ - current_y)));
/* We introduce a power, to make the scoring strictly
convex. Otherwise a symmetric knee beam (up/down/up/down)
does not have an optimum in the middle. */
- if (is_knee)
+ if (is_knee_)
ideal_score = pow (ideal_score, 1.1);
score[d] += length_pen * ideal_score;
Beam_scoring_problem::score_slope_direction (Beam_configuration *config) const
{
Real dy = config->y.delta ();
- Real damped_dy = unquanted_y.delta ();
+ Real damped_dy = unquanted_y_.delta ();
Real dem = 0.0;
/*
DAMPING_DIRECTION_PENALTY is a very harsh measure, while for
{
if (!dy)
{
- if (fabs (damped_dy / x_span.delta ()) > parameters.ROUND_TO_ZERO_SLOPE)
- dem += parameters.DAMPING_DIRECTION_PENALTY;
+ if (fabs (damped_dy / x_span_.delta ()) > parameters_.ROUND_TO_ZERO_SLOPE)
+ dem += parameters_.DAMPING_DIRECTION_PENALTY;
else
- dem += parameters.HINT_DIRECTION_PENALTY;
+ dem += parameters_.HINT_DIRECTION_PENALTY;
}
else
- dem += parameters.DAMPING_DIRECTION_PENALTY;
+ dem += parameters_.DAMPING_DIRECTION_PENALTY;
}
config->add (dem, "Sd");
Beam_scoring_problem::score_slope_musical (Beam_configuration *config) const
{
Real dy = config->y.delta ();
- Real dem = parameters.MUSICAL_DIRECTION_FACTOR
- * max (0.0, (fabs (dy) - fabs (musical_dy)));
+ Real dem = parameters_.MUSICAL_DIRECTION_FACTOR
+ * max (0.0, (fabs (dy) - fabs (musical_dy_)));
config->add (dem, "Sm");
}
Beam_scoring_problem::score_slope_ideal (Beam_configuration *config) const
{
Real dy = config->y.delta ();
- Real damped_dy = unquanted_y.delta ();
+ Real damped_dy = unquanted_y_.delta ();
Real dem = 0.0;
- Real slope_penalty = parameters.IDEAL_SLOPE_FACTOR;
+ Real slope_penalty = parameters_.IDEAL_SLOPE_FACTOR;
/* Xstaff beams tend to use extreme slopes to get short stems. We
put in a penalty here. */
- if (is_xstaff)
+ if (is_xstaff_)
slope_penalty *= 10;
/* Huh, why would a too steep beam be better than a too flat one ? */
Beam_scoring_problem::score_horizontal_inter_quants (Beam_configuration *config) const
{
if (config->y.delta () == 0.0
- && abs (config->y[LEFT]) < staff_radius * staff_space)
+ && abs (config->y[LEFT]) < staff_radius_ * staff_space_)
{
- Real yshift = config->y[LEFT] - 0.5 * staff_space;
- if (fabs (my_round (yshift) - yshift) < 0.01 * staff_space)
- config->add (parameters.HORIZONTAL_INTER_QUANT_PENALTY, "H");
+ Real yshift = config->y[LEFT] - 0.5 * staff_space_;
+ if (fabs (my_round (yshift) - yshift) < 0.01 * staff_space_)
+ config->add (parameters_.HORIZONTAL_INTER_QUANT_PENALTY, "H");
}
}
{
Real dy = config->y.delta ();
- Real extra_demerit = parameters.SECONDARY_BEAM_DEMERIT
- / max (edge_beam_counts[LEFT], edge_beam_counts[RIGHT]);
+ Real extra_demerit = parameters_.SECONDARY_BEAM_DEMERIT
+ / max (edge_beam_counts_[LEFT], edge_beam_counts_[RIGHT]);
Direction d = LEFT;
Real dem = 0.0;
- Real eps = parameters.BEAM_EPS;
+ Real eps = parameters_.BEAM_EPS;
do
{
- for (int j = 1; j <= edge_beam_counts[d]; j++)
+ for (int j = 1; j <= edge_beam_counts_[d]; j++)
{
- Direction stem_dir = edge_dirs[d];
+ Direction stem_dir = edge_dirs_[d];
/*
The 2.2 factor is to provide a little leniency for
will be in the gap of the (2, sit) quant, leading to a
false demerit.
*/
- Real gap1 = config->y[d] - stem_dir * ((j - 1) * beam_translation + beam_thickness / 2 - line_thickness / 2.2);
- Real gap2 = config->y[d] - stem_dir * (j * beam_translation - beam_thickness / 2 + line_thickness / 2.2);
+ Real gap1 = config->y[d] - stem_dir * ((j - 1) * beam_translation_ + beam_thickness_ / 2 - line_thickness_ / 2.2);
+ Real gap2 = config->y[d] - stem_dir * (j * beam_translation_ - beam_thickness_ / 2 + line_thickness_ / 2.2);
Interval gap;
gap.add_point (gap1);
gap.add_point (gap2);
- for (Real k = -staff_radius;
- k <= staff_radius + eps; k += 1.0)
+ for (Real k = -staff_radius_;
+ k <= staff_radius_ + eps; k += 1.0)
if (gap.contains (k))
{
Real dist = min (fabs (gap[UP] - k), fabs (gap[DOWN] - k));
}
while ((flip (&d)) != LEFT);
- if (max (edge_beam_counts[LEFT], edge_beam_counts[RIGHT]) >= 2)
+ if (max (edge_beam_counts_[LEFT], edge_beam_counts_[RIGHT]) >= 2)
{
Real straddle = 0.0;
- Real sit = (beam_thickness - line_thickness) / 2;
+ Real sit = (beam_thickness_ - line_thickness_) / 2;
Real inter = 0.5;
- Real hang = 1.0 - (beam_thickness - line_thickness) / 2;
+ Real hang = 1.0 - (beam_thickness_ - line_thickness_) / 2;
Direction d = LEFT;
do
{
- if (edge_beam_counts[d] >= 2
- && fabs (config->y[d] - edge_dirs[d] * beam_translation) < staff_radius + inter)
+ if (edge_beam_counts_[d] >= 2
+ && fabs (config->y[d] - edge_dirs_[d] * beam_translation_) < staff_radius_ + inter)
{
// TODO up/down symmetry.
- if (edge_dirs[d] == UP && dy <= eps
+ if (edge_dirs_[d] == UP && dy <= eps
&& fabs (my_modf (config->y[d]) - sit) < eps)
dem += extra_demerit;
- if (edge_dirs[d] == DOWN && dy >= eps
+ if (edge_dirs_[d] == DOWN && dy >= eps
&& fabs (my_modf (config->y[d]) - hang) < eps)
dem += extra_demerit;
}
- if (edge_beam_counts[d] >= 3
- && fabs (config->y[d] - 2 * edge_dirs[d] * beam_translation) < staff_radius + inter)
+ if (edge_beam_counts_[d] >= 3
+ && fabs (config->y[d] - 2 * edge_dirs_[d] * beam_translation_) < staff_radius_ + inter)
{
// TODO up/down symmetry.
- if (edge_dirs[d] == UP && dy <= eps
+ if (edge_dirs_[d] == UP && dy <= eps
&& fabs (my_modf (config->y[d]) - straddle) < eps)
dem += extra_demerit;
- if (edge_dirs[d] == DOWN && dy >= eps
+ if (edge_dirs_[d] == DOWN && dy >= eps
&& fabs (my_modf (config->y[d]) - straddle) < eps)
dem += extra_demerit;
}
beam_y.distance (collision_y[UP]));
Real scale_free
- = max (parameters.COLLISION_PADDING - dist, 0.0) /
- parameters.COLLISION_PADDING;
+ = max (parameters_.COLLISION_PADDING - dist, 0.0) /
+ parameters_.COLLISION_PADDING;
demerits
+= collisions_[i].base_penalty_ *
- pow (scale_free, 3) * parameters.COLLISION_PENALTY;
+ pow (scale_free, 3) * parameters_.COLLISION_PENALTY;
}
config->add (demerits, "C");
#include "international.hh"
#include "interval-set.hh"
#include "item.hh"
-#include "least-squares.hh"
#include "lookup.hh"
#include "main.hh"
#include "misc.hh"
}
}
-/* Set stem's shorten property if unset.
-
-TODO:
-take some y-position (chord/beam/nearest?) into account
-scmify forced-fraction
-
-This is done in beam because the shorten has to be uniform over the
-entire beam.
-*/
-
-void
-set_minimum_dy (Grob *me, Real *dy)
-{
- if (*dy)
- {
- /*
- If dy is smaller than the smallest quant, we
- get absurd direction-sign penalties.
- */
-
- Real ss = Staff_symbol_referencer::staff_space (me);
- Real beam_thickness = Beam::get_beam_thickness (me) / ss;
- Real slt = Staff_symbol_referencer::line_thickness (me) / ss;
- Real sit = (beam_thickness - slt) / 2;
- Real inter = 0.5;
- Real hang = 1.0 - (beam_thickness - slt) / 2;
-
- *dy = sign (*dy) * max (fabs (*dy),
- min (min (sit, inter), hang));
- }
-}
-
MAKE_SCHEME_CALLBACK (Beam, calc_stem_shorten, 1)
SCM
Beam::calc_stem_shorten (SCM smob)
return scm_from_double (0.0);
}
-Interval
-Beam::no_visible_stem_positions (Grob *me, Interval default_value)
-{
- extract_grob_set (me, "stems", stems);
- if (stems.empty ())
- return default_value;
-
- Interval head_positions;
- Slice multiplicity;
- for (vsize i = 0; i < stems.size (); i++)
- {
- head_positions.unite (Stem::head_positions (stems[i]));
- multiplicity.unite (Stem::beam_multiplicity (stems[i]));
- }
-
- Direction dir = get_grob_direction (me);
-
- if (!dir)
- programming_error ("The beam should have a direction by now.");
-
- Real y = head_positions.linear_combination (dir)
- * 0.5 * Staff_symbol_referencer::staff_space (me)
- + dir * get_beam_translation (me) * (multiplicity.length () + 1);
-
- y /= Staff_symbol_referencer::staff_space (me);
- return Interval (y, y);
-}
-
-/*
- Compute a first approximation to the beam slope.
-*/
-MAKE_SCHEME_CALLBACK (Beam, calc_least_squares_positions, 2);
-SCM
-Beam::calc_least_squares_positions (SCM smob, SCM /* posns */)
-{
- Grob *me = unsmob_grob (smob);
-
- int count = normal_stem_count (me);
- Interval pos (0, 0);
- if (count < 1)
- return ly_interval2scm (no_visible_stem_positions (me, pos));
-
- vector<Real> x_posns;
- extract_grob_set (me, "normal-stems", stems);
- Grob *commonx = common_refpoint_of_array (stems, me, X_AXIS);
- Grob *commony = common_refpoint_of_array (stems, me, Y_AXIS);
-
- Real my_y = me->relative_coordinate (commony, Y_AXIS);
-
- Grob *fvs = first_normal_stem (me);
- Grob *lvs = last_normal_stem (me);
-
- Interval ideal (Stem::get_stem_info (fvs).ideal_y_
- + fvs->relative_coordinate (commony, Y_AXIS) - my_y,
- Stem::get_stem_info (lvs).ideal_y_
- + lvs->relative_coordinate (commony, Y_AXIS) - my_y);
-
- Real x0 = first_normal_stem (me)->relative_coordinate (commonx, X_AXIS);
- for (vsize i = 0; i < stems.size (); i++)
- {
- Grob *s = stems[i];
-
- Real x = s->relative_coordinate (commonx, X_AXIS) - x0;
- x_posns.push_back (x);
- }
- Real dx = last_normal_stem (me)->relative_coordinate (commonx, X_AXIS) - x0;
-
- Real y = 0;
- Real slope = 0;
- Real dy = 0;
- Real ldy = 0.0;
- if (!ideal.delta ())
- {
- Interval chord (Stem::chord_start_y (stems[0]),
- Stem::chord_start_y (stems.back ()));
-
- /* Simple beams (2 stems) on middle line should be allowed to be
- slightly sloped.
-
- However, if both stems reach middle line,
- ideal[LEFT] == ideal[RIGHT] and ideal.delta () == 0.
-
- For that case, we apply artificial slope */
- if (!ideal[LEFT] && chord.delta () && count == 2)
- {
- /* FIXME. -> UP */
- Direction d = (Direction) (sign (chord.delta ()) * UP);
- pos[d] = get_beam_thickness (me) / 2;
- pos[-d] = -pos[d];
- }
- else
- pos = ideal;
-
- /*
- For broken beams this doesn't work well. In this case, the
- slope esp. of the first part of a broken beam should predict
- where the second part goes.
- */
- ldy = pos[RIGHT] - pos[LEFT];
- }
- else
- {
- vector<Offset> ideals;
- for (vsize i = 0; i < stems.size (); i++)
- {
- Grob *s = stems[i];
- ideals.push_back (Offset (x_posns[i],
- Stem::get_stem_info (s).ideal_y_
- + s->relative_coordinate (commony, Y_AXIS)
- - my_y));
- }
-
- minimise_least_squares (&slope, &y, ideals);
-
- dy = slope * dx;
-
- set_minimum_dy (me, &dy);
-
- ldy = dy;
- pos = Interval (y, (y + dy));
- }
-
- /*
- "position" is relative to the staff.
- */
- scale_drul (&pos, 1 / Staff_symbol_referencer::staff_space (me));
-
- me->set_property ("least-squares-dy", scm_from_double (ldy));
- return ly_interval2scm (pos);
-}
-
-// Assuming V is not empty, pick a 'reasonable' point inside V.
-static Real
-point_in_interval (Interval v, Real dist)
-{
- if (isinf (v[DOWN]))
- return v[UP] - dist;
- else if (isinf (v[UP]))
- return v[DOWN] + dist;
- else
- return v.center ();
-}
-
-/*
- We can't combine with previous function, since check concave and
- slope damping comes first.
-
- TODO: we should use the concaveness to control the amount of damping
- applied.
-*/
-MAKE_SCHEME_CALLBACK (Beam, shift_region_to_valid, 2);
-SCM
-Beam::shift_region_to_valid (SCM grob, SCM posns)
-{
- Grob *me = unsmob_grob (grob);
-
- /*
- Code dup.
- */
- vector<Real> x_posns;
- extract_grob_set (me, "stems", stems);
- extract_grob_set (me, "covered-grobs", covered);
-
- Grob *common[NO_AXES] = { me, me };
- for (Axis a = X_AXIS; a < NO_AXES; incr (a))
- {
- common[a] = common_refpoint_of_array (stems, me, a);
- common[a] = common_refpoint_of_array (covered, common[a], a);
- }
- Grob *fvs = first_normal_stem (me);
-
- if (!fvs)
- return posns;
- Interval x_span;
- x_span[LEFT] = fvs->relative_coordinate (common[X_AXIS], X_AXIS);
- for (vsize i = 0; i < stems.size (); i++)
- {
- Grob *s = stems[i];
-
- Real x = s->relative_coordinate (common[X_AXIS], X_AXIS) - x_span[LEFT];
- x_posns.push_back (x);
- }
-
- Grob *lvs = last_normal_stem (me);
- x_span[RIGHT] = lvs->relative_coordinate (common[X_AXIS], X_AXIS);
-
- Drul_array<Real> pos = ly_scm2interval (posns);
-
- scale_drul (&pos, Staff_symbol_referencer::staff_space (me));
-
- Real beam_dy = pos[RIGHT] - pos[LEFT];
- Real beam_left_y = pos[LEFT];
- Real slope = x_span.delta () ? (beam_dy / x_span.delta ()) : 0.0;
-
- /*
- Shift the positions so that we have a chance of finding good
- quants (i.e. no short stem failures.)
- */
- Interval feasible_left_point;
- feasible_left_point.set_full ();
-
- for (vsize i = 0; i < stems.size (); i++)
- {
- Grob *s = stems[i];
- if (Stem::is_invisible (s))
- continue;
-
- Direction d = get_grob_direction (s);
- Real left_y
- = Stem::get_stem_info (s).shortest_y_
- - slope * x_posns [i];
-
- /*
- left_y is now relative to the stem S. We want relative to
- ourselves, so translate:
- */
- left_y
- += + s->relative_coordinate (common[Y_AXIS], Y_AXIS)
- - me->relative_coordinate (common[Y_AXIS], Y_AXIS);
-
- Interval flp;
- flp.set_full ();
- flp[-d] = left_y;
-
- feasible_left_point.intersect (flp);
- }
-
- vector<Grob *> filtered;
- /*
- We only update these for objects that are too large for quanting
- to find a workaround. Typically, these are notes with
- stems, and timesig/keysig/clef, which take out the entire area
- inside the staff as feasible.
-
- The code below disregards the thickness and multiplicity of the
- beam. This should not be a problem, as the beam quanting will
- take care of computing the impact those exactly.
- */
- Real min_y_size = 2.0;
-
- // A list of intervals into which beams may not fall
- vector<Interval> forbidden_intervals;
-
- for (vsize i = 0; i < covered.size (); i++)
- {
- if (!covered[i]->is_live ())
- continue;
-
- if (Beam::has_interface (covered[i]) && is_cross_staff (covered[i]))
- continue;
-
- Box b;
- for (Axis a = X_AXIS; a < NO_AXES; incr (a))
- b[a] = covered[i]->extent (common[a], a);
-
- if (b[X_AXIS].is_empty () || b[Y_AXIS].is_empty ())
- continue;
-
- if (intersection (b[X_AXIS], x_span).is_empty ())
- continue;
-
- filtered.push_back (covered[i]);
- Grob *head_stem = Rhythmic_head::get_stem (covered[i]);
- if (head_stem && Stem::is_normal_stem (head_stem)
- && Note_head::has_interface (covered[i]))
- {
- if (Stem::get_beam (head_stem))
- {
- /*
- We must assume that stems are infinitely long in this
- case, as asking for the length of the stem typically
- leads to circular dependencies.
-
- This strategy assumes that we don't want to handle the
- collision of beams in opposite non-forced directions
- with this code, where shortening the stems of both
- would resolve the problem, eg.
-
- x x
- | |
- =====
-
- =====
- | |
- x x
-
- Such beams would need a coordinating grob to resolve
- the collision, since both will likely want to occupy
- the centerline.
- */
- Direction stemdir = get_grob_direction (head_stem);
- b[Y_AXIS][stemdir] = stemdir * infinity_f;
- }
- else
- {
- // TODO - should we include the extent of the stem here?
- }
- }
-
- if (b[Y_AXIS].length () < min_y_size)
- continue;
-
- Direction d = LEFT;
- do
- {
- Real x = b[X_AXIS][d] - x_span[LEFT];
- Real dy = slope * x;
-
- Direction yd = DOWN;
- Interval disallowed;
- do
- {
- Real left_y = b[Y_AXIS][yd];
-
- left_y -= dy;
-
- // Translate back to beam as ref point.
- left_y -= me->relative_coordinate (common[Y_AXIS], Y_AXIS);
-
- disallowed[yd] = left_y;
- }
- while (flip (&yd) != DOWN);
-
- forbidden_intervals.push_back (disallowed);
- }
- while (flip (&d) != LEFT);
- }
-
- Grob_array *arr
- = Pointer_group_interface::get_grob_array (me,
- ly_symbol2scm ("covered-grobs"));
- arr->set_array (filtered);
-
- vector_sort (forbidden_intervals, Interval::left_less);
- Real epsilon = 1.0e-10;
- Interval feasible_beam_placements (beam_left_y, beam_left_y);
-
- /*
- forbidden_intervals contains a vector of intervals in which
- the beam cannot start. it iterates through these intervals,
- pushing feasible_beam_placements epsilon over or epsilon under a
- collision. when this type of change happens, the loop is marked
- as "dirty" and re-iterated.
-
- TODO: figure out a faster ways that this loop can happen via
- a better search algorithm and/or OOP.
- */
-
- bool dirty = false;
- do
- {
- dirty = false;
- for (vsize i = 0; i < forbidden_intervals.size (); i++)
- {
- Direction d = DOWN;
- do
- {
- if (forbidden_intervals[i][d] == d * infinity_f)
- feasible_beam_placements[d] = d * infinity_f;
- else if (forbidden_intervals[i].contains (feasible_beam_placements[d]))
- {
- feasible_beam_placements[d] = d * epsilon + forbidden_intervals[i][d];
- dirty = true;
- }
- }
- while (flip (&d) != DOWN);
- }
- }
- while (dirty);
-
- // if the beam placement falls out of the feasible region, we push it
- // to infinity so that it can never be a feasible candidate below
- Direction d = DOWN;
- do
- {
- if (!feasible_left_point.contains (feasible_beam_placements[d]))
- feasible_beam_placements[d] = d * infinity_f;
- }
- while (flip (&d) != DOWN);
-
- if ((feasible_beam_placements[UP] == infinity_f && feasible_beam_placements[DOWN] == -infinity_f) && !feasible_left_point.is_empty ())
- {
- // We are somewhat screwed: we have a collision, but at least
- // there is a way to satisfy stem length constraints.
- beam_left_y = point_in_interval (feasible_left_point, 2.0);
- }
- else if (!feasible_left_point.is_empty ())
- {
- // Only one of them offers is feasible solution. Pick that one.
- if (abs (beam_left_y - feasible_beam_placements[DOWN]) > abs (beam_left_y - feasible_beam_placements[UP]))
- beam_left_y = feasible_beam_placements[UP];
- else
- beam_left_y = feasible_beam_placements[DOWN];
- }
- else
- {
- // We are completely screwed.
- me->warning (_ ("no viable initial configuration found: may not find good beam slope"));
- }
-
- pos = Drul_array<Real> (beam_left_y, (beam_left_y + beam_dy));
- scale_drul (&pos, 1 / Staff_symbol_referencer::staff_space (me));
-
- return ly_interval2scm (pos);
-}
-
-/* This neat trick is by Werner Lemberg,
- damped = tanh (slope)
- corresponds with some tables in [Wanske] CHECKME */
-MAKE_SCHEME_CALLBACK (Beam, slope_damping, 2);
-SCM
-Beam::slope_damping (SCM smob, SCM posns)
-{
- Grob *me = unsmob_grob (smob);
- Drul_array<Real> pos = ly_scm2interval (posns);
-
- if (normal_stem_count (me) <= 1)
- return posns;
-
- SCM s = me->get_property ("damping");
- Real damping = scm_to_double (s);
- Real concaveness = robust_scm2double (me->get_property ("concaveness"), 0.0);
- if (concaveness >= 10000)
- {
- pos[LEFT] = pos[RIGHT];
- me->set_property ("least-squares-dy", scm_from_double (0));
- damping = 0;
- }
-
- if (damping)
- {
- scale_drul (&pos, Staff_symbol_referencer::staff_space (me));
-
- Real dy = pos[RIGHT] - pos[LEFT];
-
- Grob *fvs = first_normal_stem (me);
- Grob *lvs = last_normal_stem (me);
-
- Grob *commonx = fvs->common_refpoint (lvs, X_AXIS);
-
- Real dx = last_normal_stem (me)->relative_coordinate (commonx, X_AXIS)
- - first_normal_stem (me)->relative_coordinate (commonx, X_AXIS);
-
- Real slope = dy && dx ? dy / dx : 0;
-
- slope = 0.6 * tanh (slope) / (damping + concaveness);
-
- Real damped_dy = slope * dx;
-
- set_minimum_dy (me, &damped_dy);
-
- pos[LEFT] += (dy - damped_dy) / 2;
- pos[RIGHT] -= (dy - damped_dy) / 2;
-
- scale_drul (&pos, 1 / Staff_symbol_referencer::staff_space (me));
- }
-
- return ly_interval2scm (pos);
-}
-
MAKE_SCHEME_CALLBACK (Beam, quanting, 2);
SCM
Beam::quanting (SCM smob, SCM posns)
}
/**
- Assuming AX is X_AXIS, and D is UP, finds the
- maximum value of curve_coordinate(t, Y_AXIS) subject to
- l <= curve_coordinate(t, X_AXIS) <= r.
+ For the portion of the curve between L and R along axis AX,
+ return the bounding box limit in direction D along the cross axis to AX.
+ If there is no portion between L and R, return 0.0 and report error.
*/
Real
Bezier::minmax (Axis ax, Real l, Real r, Direction d) const
{
- Axis other = other_axis (ax);
- Interval lr (l, r);
- vector<Real> solutions;
-
- // Possible solutions are:
- // t = 0 or 1, or...
- solutions.push_back (0);
- solutions.push_back (1);
+ Axis bx = other_axis (ax);
+
+ // The curve could hit its bounding box limit along BX at:
+ // points where the curve is parallel to AX,
+ Offset vec (0.0, 0.0);
+ vec[ax] = 1.0;
+ vector<Real> sols (solve_derivative (vec));
+ // or endpoints of the curve,
+ sols.push_back (0.999);
+ sols.push_back (0.001);
+ // (using points just inside the ends, so that an endpoint is evaulated
+ // if it falls within rounding error of L or R and the curve lies inside)
- // t is a critical point for the other-axis polynomial, or...
- Polynomial p_prime (polynomial (other));
- p_prime.differentiate ();
- vector<Real> criticals = p_prime.solve ();
- solutions.insert (solutions.end (), criticals.begin (), criticals.end ());
+ Interval iv;
+ for (vsize i = sols.size (); i--;)
+ {
+ Offset p (curve_point (sols[i]));
+ if (p[ax] >= l && p[ax] <= r)
+ iv.add_point (p[bx]);
+ }
- // t solves curve_coordinate(t, X_AXIS) = l or r.
+ // or intersections of the curve with the bounding lines at L and R.
+ Interval lr (l, r);
Direction dir = LEFT;
do
{
- Polynomial p (polynomial (ax));
- p.coefs_[0] -= lr[dir];
-
- vector<Real> sol = p.solve ();
- solutions.insert (solutions.end (), sol.begin (), sol.end ());
+ vector<Real> v = get_other_coordinates (ax, lr[dir]);
+ for (vsize i = v.size (); i--;)
+ iv.add_point (v[i]);
}
while (flip (&dir) != LEFT);
- Polynomial p (polynomial (ax));
- Polynomial other_p (polynomial (other));
- vector<Real> values;
- for (vsize i = solutions.size (); i--;)
- {
- Real t = solutions[i];
- if (t >= 0 && t <= 1
- // FIXME: floating point comparison for equality
- // Two of the t in solutions were found by solving
- // p(t) = l, bzw. r, and we want this test to pass for these t,
- // but it can easily fail if floating point internal precision
- // differs from storage precision.
- // Better to store separately the two t for which p(t) = l and r
- && p.eval (t) >= l && p.eval (t) <= r)
- values.push_back (other_p.eval (t));
- }
-
- if (values.empty ())
+ if (iv.is_empty ())
{
- programming_error ("no solution found for Bezier intersection");
+ programming_error ("Bezier curve does not cross region of concern");
return 0.0;
}
- vector_sort (values, less<Real> ());
- return (d == DOWN) ? values[0] : values.back ();
+ return iv.at (d);
}
/**
if (span_events_[START])
{
- span_dynamic_ = new Audio_span_dynamic ();
+ span_dynamic_ = new Audio_span_dynamic (equalize_volume (0.1), equalize_volume (1.0));
announce_element (Audio_element_info (span_dynamic_, span_events_[START]));
span_dynamic_->grow_dir_ = grow_dir_[START];
private:
vector<Spanner *> lines_;
vector<Spanner *> kill_me_;
- bool start_glissandi;
- bool stop_glissandi;
+ bool start_glissandi_;
+ bool stop_glissandi_;
Stream_event *event_;
vector<vsize> note_column_1;
Glissando_engraver::Glissando_engraver ()
{
event_ = 0;
- start_glissandi = false;
- stop_glissandi = false;
+ start_glissandi_ = false;
+ stop_glissandi_ = false;
}
IMPLEMENT_TRANSLATOR_LISTENER (Glissando_engraver, glissando);
Glissando_engraver::process_music ()
{
if (event_)
- start_glissandi = true;
+ start_glissandi_ = true;
}
void
Glissando_engraver::acknowledge_note_column (Grob_info info)
{
Grob *g = info.grob ();
- if (stop_glissandi)
+ if (to_boolean (g->get_property ("glissando-skip")))
+ return;
+
+ if (stop_glissandi_)
{
extract_grob_set (g, "note-heads", note_heads);
int glissando_index = 0;
lines_.clear ();
note_column_1.clear ();
note_column_2.clear ();
- stop_glissandi = false;
+ stop_glissandi_ = false;
}
- if (start_glissandi)
+ if (start_glissandi_)
{
extract_grob_set (g, "note-heads", note_heads);
SCM map = get_property ("glissandoMap");
void
Glissando_engraver::stop_translation_timestep ()
{
-
- if (start_glissandi)
+ if (start_glissandi_)
{
- if (stop_glissandi)
+ if (stop_glissandi_)
programming_error ("overwriting glissando");
- stop_glissandi = true;
- start_glissandi = false;
+ stop_glissandi_ = true;
+ start_glissandi_ = false;
}
event_ = 0;
}
public:
Direction grow_dir_;
vector<Audio_dynamic *> dynamics_;
+ Real min_volume_;
+ Real max_volume_;
virtual void render ();
void add_absolute (Audio_dynamic *);
- Audio_span_dynamic ();
+ Audio_span_dynamic (Real min_volume, Real max_volume);
};
class Audio_key : public Audio_item
Drul_array<Real> solve () const;
private:
- Grob *beam;
+ Grob *beam_;
- Interval unquanted_y;
+ Interval unquanted_y_;
- Real staff_space;
- Real beam_thickness;
- Real line_thickness;
- Real musical_dy;
+ Real staff_space_;
+ Real beam_thickness_;
+ Real line_thickness_;
+ Real musical_dy_;
- Interval x_span;
+ Interval x_span_;
- vector<Stem_info> stem_infos;
+ vector<Stem_info> stem_infos_;
/*
Do stem computations. These depend on YL and YR linearly, so we can
affine linear in YL and YR. If YL == YR == 0, then we might have
stem_y != 0.0, when we're cross staff.
*/
- vector<Real> base_lengths;
- vector<Real> stem_xpositions;
+ vector<Real> base_lengths_;
+ vector<Real> stem_xpositions_;
- Grob *common[2];
- bool is_xstaff;
- bool is_knee;
+ Grob *common_[2];
+ bool is_xstaff_;
+ bool is_knee_;
- Beam_quant_parameters parameters;
+ Beam_quant_parameters parameters_;
- Real staff_radius;
- Drul_array<int> edge_beam_counts;
- Drul_array<Direction> edge_dirs;
+ Real staff_radius_;
+ Drul_array<int> edge_beam_counts_;
+ Drul_array<Direction> edge_dirs_;
// Half-open intervals, representing allowed positions for the beam,
// starting from close to the notehead to the direction of the stem
// end. This is used for quickly weeding out invalid
// Beam_configurations.
- Drul_array<Interval> quant_range;
- Real beam_translation;
+ Drul_array<Interval> quant_range_;
+ Real beam_translation_;
vector<Beam_collision> collisions_;
vector<Beam_segment> segments_;
bool is_empty () const;
void print () const;
void print_points () const;
+
+ DECLARE_SCHEME_CALLBACK (skyline, (SCM, SCM));
};
#endif /* SKYLINE_PAIR_HH */
void raise (Real);
void shift (Real);
Real distance (Skyline const &, Real horizon_padding = 0) const;
+ Real touching_point (Skyline const &, Real horizon_padding = 0) const;
Real height (Real airplane) const;
Real max_height () const;
+ Real max_height_position () const;
void set_minimum_height (Real height);
void clear ();
bool is_empty () const;
+
+ DECLARE_SCHEME_CALLBACK (get_touching_point, (SCM, SCM, SCM));
+ DECLARE_SCHEME_CALLBACK (get_distance, (SCM, SCM, SCM));
+ DECLARE_SCHEME_CALLBACK (get_max_height, (SCM));
+ DECLARE_SCHEME_CALLBACK (get_max_height_position, (SCM));
+ DECLARE_SCHEME_CALLBACK (get_height, (SCM, SCM));
+
+protected:
+ Real internal_distance (Skyline const &, Real horizon_padding, Real *touch_point) const;
};
extern bool debug_skylines;
Real head_encompass_penalty_;
Real stem_encompass_penalty_;
- Real closeness_factor_;
Real edge_attraction_factor_;
Real same_slope_penalty_;
Real steeper_slope_factor_;
DECLARE_SCHEME_CALLBACK (calc_pure_relevant_grobs, (SCM));
DECLARE_SCHEME_CALLBACK (height, (SCM));
DECLARE_SCHEME_CALLBACK (calc_pure_height, (SCM, SCM, SCM));
+ DECLARE_SCHEME_CALLBACK (get_staves, (SCM));
+ DECLARE_SCHEME_CALLBACK (get_spaceable_staves, (SCM));
+ DECLARE_SCHEME_CALLBACK (get_nonspaceable_staves, (SCM));
System (SCM);
System (System const &);
--- /dev/null
+/*
+ This file is part of LilyPond, the GNU music typesetter.
+
+ Copyright (C) 2011 Joe Neeman <joeneeman@gmail.com>
+
+ LilyPond is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LilyPond is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "lily-guile.hh"
+#include "grob.hh"
+#include "page-layout-problem.hh"
+
+LY_DEFINE (ly_get_spacing_spec, "ly:get-spacing-spec", 2, 0, 0,
+ (SCM from_scm, SCM to_scm),
+ "Return the spacing spec going between the two given grobs,"
+ " @var{from_scm} and @var{to_scm}.")
+{
+ LY_ASSERT_SMOB (Grob, from_scm, 1);
+ LY_ASSERT_SMOB (Grob, to_scm, 2);
+
+ Grob *from = unsmob_grob (from_scm);
+ Grob *to = unsmob_grob (to_scm);
+
+ return Page_layout_problem::get_spacing_spec (from, to, false, 0, 0);
+}
Moment start_moment_;
SCM split_list_;
+ SCM direction_;
+ SCM directionOne_;
+ SCM directionTwo_;
+ SCM horizontalShiftOne_;
+ SCM horizontalShiftTwo_;
Stream_event *unisono_event_;
Stream_event *solo_one_event_;
first_iter_ = 0;
second_iter_ = 0;
split_list_ = SCM_EOL;
+ direction_ = SCM_BOOL_F;
+ directionOne_ = scm_from_int (1);
+ directionTwo_ = scm_from_int (-1);
+ horizontalShiftOne_ = scm_from_int (0);
+ horizontalShiftTwo_ = scm_from_int (1);
state_ = APART;
playing_state_ = APART;
last_playing_ = APART;
{
start_moment_ = get_outlet ()->now_mom ();
split_list_ = get_music ()->get_property ("split-list");
+ direction_ = get_music ()->get_property ("direction");
+ if (is_direction (direction_))
+ {
+ directionOne_ = direction_;
+ directionTwo_ = direction_;
+ if (scm_is_true (scm_negative_p (direction_)))
+ {
+ horizontalShiftOne_ = scm_from_int (1);
+ horizontalShiftTwo_ = scm_from_int (0);
+ }
+ }
Context *c = get_outlet ();
Context *two = handles_[CONTEXT_TWO].get_context ();
set_context (two);
second_iter_ = unsmob_iterator (get_iterator (unsmob_music (scm_cadr (lst))));
+ Context *shared = handles_[CONTEXT_SHARED].get_context ();
+ set_context (shared);
/* Mimic all settings of voiceOne/voiceTwo for the two separate voices...*/
/* FIXME: Is there any way to use the definition of \voiceOne/\voiceTwo
{
SCM sym = ly_symbol2scm (*p);
execute_pushpop_property (one, sym,
- ly_symbol2scm ("direction"), scm_from_int (1));
+ ly_symbol2scm ("direction"), directionOne_);
execute_pushpop_property (two, sym,
- ly_symbol2scm ("direction"), scm_from_int (-1));
+ ly_symbol2scm ("direction"), directionTwo_);
+
+ if (scm_is_number (direction_))
+ execute_pushpop_property (shared, sym,
+ ly_symbol2scm ("direction"), direction_);
}
/* Handle horizontal shifts for crossing notes */
execute_pushpop_property (one, ly_symbol2scm ("NoteColumn"),
- ly_symbol2scm ("horizontal-shift"), scm_from_int (0));
+ ly_symbol2scm ("horizontal-shift"), horizontalShiftOne_);
execute_pushpop_property (two, ly_symbol2scm ("NoteColumn"),
- ly_symbol2scm ("horizontal-shift"), scm_from_int (1));
+ ly_symbol2scm ("horizontal-shift"), horizontalShiftTwo_);
/* Also handle MultiMeasureRest positions for voice 1/2 */
execute_pushpop_property (one, ly_symbol2scm ("MultiMeasureRest"),
ly_symbol2scm ("staff-position"), scm_from_int (4));
/* properties */
"elements-filtered "
+ "pure-relevant-grobs "
+ "pure-Y-common "
);
/* properties */
"dot "
"duration-log "
+ "glissando-skip "
"stem "
);
#include "skyline-pair.hh"
+#include "international.hh"
#include "ly-smobs.icc"
Skyline_pair::Skyline_pair ()
scm_puts ("#<Skyline-pair>", port);
return 1;
}
+
+MAKE_SCHEME_CALLBACK (Skyline_pair, skyline, 2);
+SCM
+Skyline_pair::skyline (SCM smob, SCM dir_scm)
+{
+ Skyline_pair *sp = Skyline_pair::unsmob (smob);
+ Direction dir = robust_scm2dir (dir_scm, UP);
+
+ if (dir == CENTER)
+ {
+ warning (_f ("direction must not be CENTER in ly:skyline-pair::skyline"));
+ dir = UP;
+ }
+
+ return (*sp)[dir].smobbed_copy ();
+}
Real
Skyline::distance (Skyline const &other, Real horizon_padding) const
+{
+ Real dummy;
+ return internal_distance (other, horizon_padding, &dummy);
+}
+
+Real
+Skyline::touching_point (Skyline const &other, Real horizon_padding) const
+{
+ Real touch;
+ internal_distance (other, horizon_padding, &touch);
+ return touch;
+}
+
+Real
+Skyline::internal_distance (Skyline const &other, Real horizon_padding, Real *touch_point) const
{
assert (sky_ == -other.sky_);
Real dist = -infinity_f;
Real start = -infinity_f;
+ Real touch = -infinity_f;
while (i != padded_this->buildings_.end () && j != padded_other->buildings_.end ())
{
Real end = min (i->end_, j->end_);
Real start_dist = i->height (start) + j->height (start);
Real end_dist = i->height (end) + j->height (end);
dist = max (dist, max (start_dist, end_dist));
+
+ if (end_dist == dist)
+ touch = end;
+ else if (start_dist == dist)
+ touch = start;
+
if (i->end_ <= j->end_)
i++;
else
delete padded_other;
}
+ *touch_point = touch;
return dist;
}
return sky_ * distance (s);
}
+Real
+Skyline::max_height_position () const
+{
+ Skyline s (-sky_);
+ s.set_minimum_height (0);
+ return touching_point (s);
+}
+
void
Skyline::set_minimum_height (Real h)
{
return 1;
}
+
+MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Skyline, get_touching_point, 3, 1, "")
+SCM
+Skyline::get_touching_point (SCM skyline_scm, SCM other_skyline_scm, SCM horizon_padding_scm)
+{
+ LY_ASSERT_SMOB (Skyline, other_skyline_scm, 1);
+
+ Real horizon_padding = 0;
+ if (horizon_padding_scm != SCM_UNDEFINED)
+ {
+ LY_ASSERT_TYPE (scm_is_number, horizon_padding_scm, 3);
+ horizon_padding = scm_to_double (horizon_padding_scm);
+ }
+
+ Skyline *skyline = Skyline::unsmob (skyline_scm);
+ Skyline *other_skyline = Skyline::unsmob (other_skyline_scm);
+ return scm_from_double (skyline->touching_point (*other_skyline, horizon_padding));
+}
+
+MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Skyline, get_distance, 3, 1, "")
+SCM
+Skyline::get_distance (SCM skyline_scm, SCM other_skyline_scm, SCM horizon_padding_scm)
+{
+ LY_ASSERT_SMOB (Skyline, other_skyline_scm, 1);
+
+ Real horizon_padding = 0;
+ if (horizon_padding_scm != SCM_UNDEFINED)
+ {
+ LY_ASSERT_TYPE (scm_is_number, horizon_padding_scm, 3);
+ horizon_padding = scm_to_double (horizon_padding_scm);
+ }
+
+ Skyline *skyline = Skyline::unsmob (skyline_scm);
+ Skyline *other_skyline = Skyline::unsmob (other_skyline_scm);
+ return scm_from_double (skyline->distance (*other_skyline, horizon_padding));
+}
+
+MAKE_SCHEME_CALLBACK (Skyline, get_max_height, 1)
+SCM
+Skyline::get_max_height (SCM skyline_scm)
+{
+ return scm_from_double (Skyline::unsmob (skyline_scm)->max_height ());
+}
+
+MAKE_SCHEME_CALLBACK (Skyline, get_max_height_position, 1)
+SCM
+Skyline::get_max_height_position (SCM skyline_scm)
+{
+ return scm_from_double (Skyline::unsmob (skyline_scm)->max_height_position ());
+}
+
+MAKE_SCHEME_CALLBACK (Skyline, get_height, 2)
+SCM
+Skyline::get_height (SCM skyline_scm, SCM x_scm)
+{
+ Real x = robust_scm2double (x_scm, 0.0);
+ return scm_from_double (Skyline::unsmob (skyline_scm)->height (x));
+}
demerit += stem_dem;
}
- else if (!edge)
- {
- Interval ext;
- ext.add_point (state.encompass_infos_[j].stem_);
- ext.add_point (state.encompass_infos_[j].head_);
-
- // ?
- demerit += -state.parameters_.closeness_factor_
- * min (state.dir_
- * (y - (ext[state.dir_] + state.dir_ * state.parameters_.free_head_distance_)), 0.0)
- / state.encompass_infos_.size ();
- }
}
add_score (demerit, "encompass");
= get_detail (details, ly_symbol2scm ("head-encompass-penalty"));
stem_encompass_penalty_
= get_detail (details, ly_symbol2scm ("stem-encompass-penalty"));
- closeness_factor_
- = get_detail (details, ly_symbol2scm ("closeness-factor"));
edge_attraction_factor_
= get_detail (details, ly_symbol2scm ("edge-attraction-factor"));
same_slope_penalty_
"Demerit to apply when note heads collide with a slur.\n"
"@item stem-encompass-penalty\n"
"Demerit to apply when stems collide with a slur.\n"
- "@item closeness-factor\n"
- "Additional demerit used when scoring encompasses.\n"
"@item edge-attraction-factor\n"
"Factor used to calculate the demerit for distances"
" between slur endpoints and their corresponding base"
/* properties */
"annotation "
- "avoid-slur " /* UGH. */
+ "avoid-slur " /* UGH. */
"control-points "
"dash-definition "
"details "
{
if (spanbar_)
{
- vector_sort (bars_, Grob::vertical_less);
- for (vsize i = 0; i < bars_.size (); i++)
- Span_bar::add_bar (spanbar_, bars_[i]);
-
SCM vissym = ly_symbol2scm ("break-visibility");
SCM vis = bars_[0]->internal_get_property (vissym);
if (ly_is_equal (spanbar_->internal_get_property (vissym), vis))
if (!model_bar)
model_bar = me;
- vector_sort (extents, Interval::left_less);
-
Stencil span_bar;
for (vsize i = 1; i < extents.size (); i++)
{
pl->set_property ("page-break-penalty", right_bound->get_property ("page-break-penalty"));
pl->set_property ("page-turn-penalty", right_bound->get_property ("page-turn-penalty"));
+ if (right_bound->original () == dynamic_cast<System*> (original ())->get_bound (RIGHT))
+ pl->set_property ("last-in-score", SCM_BOOL_T);
+
Interval staff_refpoints;
if (Grob *align = get_vertical_alignment ())
{
return pure ? get_pure_bound (d, start, end) : get_bound (d);
}
+enum {
+ SPACEABLE_STAVES,
+ NONSPACEABLE_STAVES,
+ ALL_STAVES
+};
+
+static SCM
+get_maybe_spaceable_staves (SCM smob, int filter)
+{
+ System *me = dynamic_cast<System*> (unsmob_grob (smob));
+ Grob *align = me->get_vertical_alignment ();
+ SCM ret = SCM_EOL;
+
+ if (align)
+ {
+ SCM *tail = &ret;
+ extract_grob_set (align, "elements", staves);
+
+ for (vsize i = 0; i < staves.size (); ++i)
+ {
+ bool spaceable = Page_layout_problem::is_spaceable (staves[i]);
+ if (staves[i]->is_live () &&
+ ((filter == ALL_STAVES)
+ || (filter == SPACEABLE_STAVES && spaceable)
+ || (filter == NONSPACEABLE_STAVES && !spaceable)))
+ {
+ *tail = scm_cons (staves[i]->self_scm (), SCM_EOL);
+ tail = SCM_CDRLOC (*tail);
+ }
+ }
+ }
+
+ return ret;
+}
+
+MAKE_SCHEME_CALLBACK (System, get_staves, 1)
+SCM
+System::get_staves (SCM smob)
+{
+ return get_maybe_spaceable_staves (smob, ALL_STAVES);
+}
+
+MAKE_SCHEME_CALLBACK (System, get_spaceable_staves, 1)
+SCM
+System::get_spaceable_staves (SCM smob)
+{
+ return get_maybe_spaceable_staves (smob, SPACEABLE_STAVES);
+}
+
+MAKE_SCHEME_CALLBACK (System, get_nonspaceable_staves, 1)
+SCM
+System::get_nonspaceable_staves (SCM smob)
+{
+ return get_maybe_spaceable_staves (smob, NONSPACEABLE_STAVES);
+}
+
+
ADD_INTERFACE (System,
"This is the top-level object: Each object in a score"
" ultimately has a @code{System} object as its X and"
Spanner *me = unsmob_spanner (smob);
Spanner *tuplet = unsmob_spanner (me->get_object ("bracket"));
- Interval positions = robust_scm2interval (tuplet->get_property ("positions"), Interval (0.0, 0.0));
-
- return scm_from_double (positions.center ());
+ Drul_array<Real> positions = robust_scm2drul (tuplet->get_property ("positions"), Drul_array<Real> (0.0, 0.0));
+ return scm_from_double ((positions[LEFT] + positions[RIGHT]) / 2.0);
}
MAKE_SCHEME_CALLBACK (Tuplet_number, calc_cross_staff, 1)
(_i "Take the music in @var{part1} and @var{part2} and typeset so
that they share a staff.")
(make-part-combine-music parser
- (list part1 part2)))
+ (list part1 part2) #f))
+
+partcombineUp =
+#(define-music-function (parser location part1 part2) (ly:music? ly:music?)
+ (_i "Take the music in @var{part1} and @var{part2} and typeset so
+that they share a staff with stems directed upward.")
+ (make-part-combine-music parser
+ (list part1 part2) UP))
+
+partcombineDown =
+#(define-music-function (parser location part1 part2) (ly:music? ly:music?)
+ (_i "Take the music in @var{part1} and @var{part2} and typeset so
+that they share a staff with stems directed downward.")
+ (make-part-combine-music parser
+ (list part1 part2) DOWN))
partcombineForce =
#(define-music-function (location parser type once) (symbol-or-boolean? boolean?)
if re.match ('.*[\r\n]+.*', retstring):
rx = re.compile (r'[\n\r]+')
strings = rx.split (retstring)
- retstring = "\\markup { \\column { "
+ retstring = "\\markup { \\center-column { "
for s in strings:
retstring += "\\line {\"" + s + "\"} "
retstring += "} }"
return base * dot_fact * self.factor
+# implement the midi command line option '-m' and '--midi'
+# if TRUE add midi-block to .ly file (see below)
+def set_create_midi (option):
+ global midi_option
+ midi_option = option
+
+def get_create_midi ():
+ try:
+ return midi_option
+ except:
+ return False
# Implement the different note names for the various languages
def pitch_generic (pitch, notenames, accidentals):
self.contents.set_part_information (part_id, staves_info)
def print_ly (self, printer):
+ self.create_midi = get_create_midi ()
printer.dump ("\\score {");
printer.newline ()
if self.contents:
ret.append (r.get_text ())
return string.join (ret, "\n")
+ # get contents of the source-element (usually used for publishing information). (These contents are saved in a custom variable named "source" in the header of the .ly file.)
+ def get_source (self):
+ source = self.get_named_children ('source')
+ ret = []
+ for r in source:
+ ret.append (r.get_text ())
+ return string.join (ret, "\n")
+
def get_creator (self, type):
creators = self.get_named_children ('creator')
# return the first creator tag that has the particular type
return mf.get_text ()
return None
-
-
class Duration (Music_xml_node):
def get_length (self):
dur = int (self.get_text ()) * Rational (1,4)
;;
(gap ,ly:dimension? "Size of a gap in a variable symbol.")
(gap-count ,integer? "Number of gapped beams for tremolo.")
+ (glissando-skip ,boolean? "Should this @code{NoteHead} be skipped
+by glissandi?")
(glyph ,string? "A string determining what @q{style} of glyph is
typeset. Valid choices depend on the function that is reading this
property.")
(ly:eval-simple-closure (car args) unpure start end)
(if (not (procedure? unpure))
unpure
- (apply (cdr pure)
+ (apply unpure
(append
(list (car args) start end)
(cdr args))))))
'((region-size . 4)
(head-encompass-penalty . 1000.0)
(stem-encompass-penalty . 30.0)
- (closeness-factor . 10)
(edge-attraction-factor . 4)
(same-slope-penalty . 20)
(steeper-slope-factor . 50)
(define-module (scm paper-system))
-(use-modules (lily))
+(use-modules (lily)
+ (srfi srfi-1)
+ (ice-9 optargs))
(define-public (paper-system-title? system)
(equal? #t (ly:prob-property system 'is-title)
stencil)
))
-; TODO: annotate the spacing for every spaceable staff within the system.
+
+;; Y-ext and next-Y-ext are either skyline-pairs or extents
+(define*-public (annotate-padding system-Y system-X Y-ext X-ext
+ next-system-Y next-system-X next-Y-ext next-X-ext
+ layout horizon-padding padding #:key (base-color blue))
+ (let* ((eps 0.001)
+ (skyline (and (ly:skyline-pair? Y-ext)
+ (ly:skyline-pair::skyline Y-ext DOWN)))
+ (next-skyline (and (ly:skyline-pair? next-Y-ext)
+ (ly:skyline-pair::skyline next-Y-ext UP)))
+ (annotation-X (cond
+ ((and skyline next-skyline)
+ (-
+ (ly:skyline::get-touching-point skyline next-skyline horizon-padding)
+ horizon-padding))
+ (skyline
+ (ly:skyline::get-max-height-position skyline))
+ (next-skyline
+ (ly:skyline::get-max-height-position next-skyline))
+ (else
+ (max (cdr X-ext)
+ (cdr next-X-ext)))))
+ (annotation-Y (if skyline
+ (ly:skyline::get-height skyline annotation-X)
+ (car Y-ext)))
+ (next-annotation-Y (if next-skyline
+ (- (+ (ly:skyline::get-height next-skyline
+ (- (+ annotation-X system-X)
+ next-system-X))
+ next-system-Y)
+ system-Y)
+ (cdr next-Y-ext)))
+ (padding-blocks (>= next-annotation-Y (- annotation-Y padding eps)))
+ (contrast-color (append (cdr base-color) (list (car base-color))))
+ (color (if padding-blocks contrast-color base-color))
+ (annotation (ly:stencil-translate-axis
+ (annotate-y-interval
+ layout
+ "padding"
+ `(,(- annotation-Y padding). ,annotation-Y)
+ #t
+ #:color color)
+ annotation-X X)))
+ (if (> padding 0.0)
+ annotation
+ empty-stencil)))
+
+
(define-public (paper-system-annotate system next-system layout)
"Add arrows and texts to indicate which lengths are set."
- (let* ((annotations (list))
- (grob (ly:prob-property system 'system-grob))
+
+ (let* ((grob (ly:prob-property system 'system-grob))
+ (paper-height (ly:output-def-lookup layout 'paper-height))
+ (bottom-margin (ly:output-def-lookup layout 'bottom-margin))
+ (top-margin (ly:output-def-lookup layout 'top-margin))
+ (spaceable-staves (if (ly:grob? grob) (ly:system::get-spaceable-staves grob) '()))
+ (all-staves (if (ly:grob? grob) (ly:system::get-staves grob) '()))
+ (spaceable-staff-annotate
+ (lambda (before-staff after-staff)
+ (let ((before-Y (ly:grob-relative-coordinate before-staff grob Y))
+ (after-Y (ly:grob-relative-coordinate after-staff grob Y)))
+ (annotate-spacing-spec
+ layout
+ (ly:get-spacing-spec before-staff after-staff)
+ before-Y
+ after-Y))))
+
+ (staff-padding-annotate
+ (lambda (before-staff after-staff)
+ (let ((before-Y (ly:grob-relative-coordinate before-staff grob Y))
+ (before-X (ly:grob-relative-coordinate before-staff grob X))
+ (before-X-ext (ly:grob-extent before-staff before-staff X))
+ (after-Y (ly:grob-relative-coordinate after-staff grob Y))
+ (after-X (ly:grob-relative-coordinate after-staff grob X))
+ (after-X-ext (ly:grob-extent after-staff after-staff X))
+ (skylines (ly:grob-property before-staff 'vertical-skylines))
+ (after-skylines (ly:grob-property after-staff 'vertical-skylines))
+ (padding (assoc-get 'padding
+ (ly:get-spacing-spec before-staff after-staff)
+ 0.0))
+ (horizon-padding (ly:grob-property before-staff
+ 'skyline-horizontal-padding
+ 0.0)))
+ (ly:stencil-translate
+ (annotate-padding
+ before-Y before-X skylines before-X-ext
+ after-Y after-X after-skylines after-X-ext
+ layout horizon-padding padding)
+ (cons before-X before-Y)))))
+
+ (staff-annotations (if (< 1 (length spaceable-staves))
+ (map spaceable-staff-annotate
+ (drop-right spaceable-staves 1)
+ (drop spaceable-staves 1))
+ '()))
+ (staff-padding-annotations (if (< 1 (length all-staves))
+ (map staff-padding-annotate
+ (drop-right all-staves 1)
+ (drop all-staves 1))
+ '()))
(estimate-extent (if (ly:grob? grob)
(annotate-y-interval layout
"extent-estimate"
(ly:grob-property grob 'pure-Y-extent)
#f)
- #f)))
- (let* ((spacing-spec (cond ((and next-system
- (paper-system-title? system)
- (paper-system-title? next-system))
- (ly:output-def-lookup layout 'markup-markup-spacing))
- ((paper-system-title? system)
- (ly:output-def-lookup layout 'markup-system-spacing))
- ((and next-system
- (paper-system-title? next-system))
- (ly:output-def-lookup layout 'score-markup-spacing))
- ((not next-system)
- (ly:output-def-lookup layout 'last-bottom-spacing))
- (else
- (ly:output-def-lookup layout 'system-system-spacing))))
- (last-staff-Y (car (paper-system-staff-extents system))))
-
- (set! annotations
- (annotate-spacing-spec layout spacing-spec last-staff-Y (car (paper-system-extent system Y)))))
- (if estimate-extent
+ #f))
+
+ (spacing-spec (cond ((and next-system
+ (paper-system-title? system)
+ (paper-system-title? next-system))
+ (ly:output-def-lookup layout 'markup-markup-spacing))
+ ((paper-system-title? system)
+ (ly:output-def-lookup layout 'markup-system-spacing))
+ ((and next-system
+ (paper-system-title? next-system))
+ (ly:output-def-lookup layout 'score-markup-spacing))
+ ((not next-system)
+ (ly:output-def-lookup layout 'last-bottom-spacing))
+ ((ly:prob-property system 'last-in-score #f)
+ (ly:output-def-lookup layout 'score-system-spacing))
+ (else
+ (ly:output-def-lookup layout 'system-system-spacing))))
+ (last-staff-Y (car (paper-system-staff-extents system)))
+ (system-Y (ly:prob-property system 'Y-offset 0.0))
+ (system-X (ly:prob-property system 'X-offset 0.0))
+ (next-system-Y (and next-system
+ (ly:prob-property next-system 'Y-offset 0.0)))
+ (next-system-X (and next-system
+ (ly:prob-property next-system 'X-offset 0.0)))
+ (first-staff-next-system-Y (if next-system
+ (- (+ (cdr (paper-system-staff-extents next-system))
+ system-Y)
+ next-system-Y)
+ (+ system-Y top-margin bottom-margin (- paper-height))))
+
+ (skyline (or
+ (ly:prob-property system 'vertical-skylines #f)
+ (paper-system-extent system Y)))
+ (next-skyline (and next-system
+ (or
+ (ly:prob-property next-system 'vertical-skylines #f)
+ (paper-system-extent next-system Y))))
+ (horizon-padding (and
+ (ly:grob? grob)
+ (ly:grob-property grob 'skyline-horizontal-padding 0)))
+ (padding-annotation (if next-system
+ (annotate-padding
+ (- system-Y) system-X skyline (paper-system-extent system X)
+ (- next-system-Y) next-system-X next-skyline (paper-system-extent next-system X)
+ layout
+ horizon-padding
+ (assoc-get 'padding spacing-spec 0.0)
+ #:base-color blue)
+ empty-stencil))
+
+ (system-annotation (annotate-spacing-spec
+ layout spacing-spec
+ last-staff-Y
+ first-staff-next-system-Y))
+ (annotations (ly:stencil-add
+ padding-annotation
+ (stack-stencils Y DOWN 0.0 staff-padding-annotations)
+ (stack-stencils Y DOWN 0.0 (append staff-annotations (list system-annotation))))))
+
+ (if estimate-extent
(set! annotations
- (stack-stencils X RIGHT 0.5
+ (stack-stencils X RIGHT 5.5
(list annotations
estimate-extent))))
-
- (if (not (null? annotations))
- (set! (ly:prob-property system 'stencil)
- (ly:stencil-add
- (ly:prob-property system 'stencil)
- (ly:make-stencil
- (ly:stencil-expr annotations)
- (ly:stencil-extent empty-stencil X)
- (ly:stencil-extent empty-stencil Y)))))
- (ly:prob-property system 'stencil)))
+
+ (if (not (null? annotations))
+ (set! (ly:prob-property system 'stencil)
+ (ly:stencil-add
+ (ly:prob-property system 'stencil)
+ (ly:make-stencil
+ (ly:stencil-expr annotations)
+ (ly:stencil-extent empty-stencil X)
+ (ly:stencil-extent empty-stencil Y)))))
+ (ly:prob-property system 'stencil)))
(ly:interpret-music-expression (make-non-relative-music music) global)
context-list))
-(define-public (make-part-combine-music parser music-list)
+(define-public (make-part-combine-music parser music-list direction)
(let* ((m (make-music 'PartCombineMusic))
(m1 (make-non-relative-music (context-spec-music (first music-list) 'Voice "one")))
(m2 (make-non-relative-music (context-spec-music (second music-list) 'Voice "two")))
(evs1 (recording-group-emulate m1 listener)))
(set! (ly:music-property m 'elements) (list m1 m2))
+ (set! (ly:music-property m 'direction) direction)
(set! (ly:music-property m 'split-list)
(if (and (assoc "one" evs1) (assoc "two" evs2))
(determine-split-list (reverse! (assoc-get "one" evs1) '())
(center-stencil-on-extent dim-stencil)
0.5))
(set! annotation
- (ly:make-stencil (list 'color color (ly:stencil-expr annotation))
- (ly:stencil-extent annotation X)
- (cons 10000 -10000)))))
+ (stencil-with-color annotation color))))
annotation))
-(define*-public (annotate-spacing-spec layout spacing-spec start-Y-offset prev-system-end
+;; TODO: figure out how to annotate padding nicely
+;; TODO: emphasize either padding or min-dist depending on which constraint was active
+(define*-public (annotate-spacing-spec layout spacing-spec start-Y-offset next-staff-Y
#:key (base-color blue))
- (let* ((get-spacing-var (lambda (sym) (assoc-get sym spacing-spec 0.0)))
- (space (get-spacing-var 'space))
+ (let* ((get-spacing-var (lambda (sym) (assoc-get sym spacing-spec 0.0)))
+ (space (get-spacing-var 'basic-distance))
(padding (get-spacing-var 'padding))
(min-dist (get-spacing-var 'minimum-distance))
- (contrast-color (append (cdr base-color) (list (car base-color)))))
+ (contrast-color (append (cdr base-color) (list (car base-color))))
+ (min-dist-blocks (<= (- start-Y-offset min-dist) next-staff-Y))
+ (min-dist-color (if min-dist-blocks contrast-color base-color))
+ (basic-annotation (annotate-y-interval layout
+ "basic-dist"
+ (cons (- start-Y-offset space) start-Y-offset)
+ #t
+ #:color (map (lambda (x) (* x 0.25)) base-color)))
+ (min-annotation (annotate-y-interval layout
+ "min-dist"
+ (cons (- start-Y-offset min-dist) start-Y-offset)
+ #t
+ #:color min-dist-color))
+ (extra-annotation (annotate-y-interval layout
+ "extra dist"
+ (cons next-staff-Y (- start-Y-offset min-dist))
+ #t
+ #:color (map (lambda (x) (* x 0.5)) min-dist-color))))
+
(stack-stencils X RIGHT 0.0
(list
- (annotate-y-interval layout
- "space"
- (cons (- start-Y-offset space) start-Y-offset)
- #t
- #:color (map (lambda (x) (* x 0.25)) base-color))
- (annotate-y-interval layout
- "min-dist"
- (cons (- start-Y-offset min-dist) start-Y-offset)
- #t
- #:color (map (lambda (x) (* x 0.5)) base-color))
- (ly:stencil-add
- (annotate-y-interval layout
- "bottom-of-extent"
- (cons prev-system-end start-Y-offset)
- #t
- #:color base-color)
- (annotate-y-interval layout
- "padding"
- (cons (- prev-system-end padding) prev-system-end)
- #t
- #:color contrast-color))))))
-
+ basic-annotation
+ (if min-dist-blocks
+ min-annotation
+ (ly:stencil-add min-annotation extra-annotation))))))
(define-public (eps-file->stencil axis size file-name)
(let*
if value:
header.set_field (field, musicxml.escape_ly_output_string (value))
- movement_title = tree.get_maybe_exist_named_child ('movement-title')
- if movement_title:
- set_if_exists ('title', movement_title.get_text ())
work = tree.get_maybe_exist_named_child ('work')
if work:
- # Overwrite the title from movement-title with work->title
- set_if_exists ('title', work.get_work_title ())
set_if_exists ('worknumber', work.get_work_number ())
set_if_exists ('opus', work.get_opus ())
+ movement_title = tree.get_maybe_exist_named_child ('movement-title')
+
+ # use either work-title or movement-title as title.
+ # if both exist use movement-title as subtitle.
+ # if there is only a movement-title (or work-title is empty or missing) the movement-title should be typeset as a title
+ if work:
+ work_title = work.get_work_title ()
+ set_if_exists ('title', work_title)
+ if work_title == '':
+ set_if_exists ('title', movement_title.get_text ())
+ elif movement_title:
+ set_if_exists ('subtitle', movement_title.get_text ())
+ elif movement_title:
+ set_if_exists ('title', movement_title.get_text ())
+
identifications = tree.get_named_children ('identification')
for ids in identifications:
set_if_exists ('copyright', ids.get_rights ())
set_if_exists ('editor', ids.get_editor ())
set_if_exists ('poet', ids.get_poet ())
- set_if_exists ('tagline', ids.get_encoding_software ())
set_if_exists ('encodingsoftware', ids.get_encoding_software ())
set_if_exists ('encodingdate', ids.get_encoding_date ())
set_if_exists ('encoder', ids.get_encoding_person ())
set_if_exists ('encodingdescription', ids.get_encoding_description ())
+ set_if_exists ('source', ids.get_source ())
+
+ # miscellaneous --> texidoc
set_if_exists ('texidoc', ids.get_file_description ());
# Finally, apply the required compatibility modes
type = 'string',
dest = 'output_name',
help = _ ("set output filename to FILE, stdout if -"))
+
+ p.add_option ('-m', '--midi',
+ action = "store_true",
+ default = False,
+ dest = "midi",
+ help = _("add midi-block to .ly file"))
+
p.add_option_group ('',
description = (
_ ("Report bugs via %s")
def print_ly_preamble (printer, filename):
printer.dump_version ()
- printer.print_verbatim ('%% automatically converted from %s\n' % filename)
+ printer.print_verbatim ('%% automatically converted by musicxml2ly from %s\n' % filename)
def print_ly_additional_definitions (printer, filename):
if needed_additional_definitions:
opt_parser.print_usage()
sys.exit (2)
+ if options.midi:
+ musicexp.set_create_midi (options.midi)
+
if options.language:
musicexp.set_pitch_language (options.language)
needed_additional_definitions.append (options.language)
endif
touch $@
+# Copy files while tracking their dependencies.
$(outdir)/%.texi: $(src-dir)/%.texi
- cp -p $< $@
+ mkdir -p $(dir $@)
+ $(DO_TEXI_DEP) cp -f $< $@
+
+$(outdir)/%.itexi: $(src-dir)/%.itexi
+ mkdir -p $(dir $@)
+ $(DO_TEXI_DEP) cp -f $< $@
$(outdir)/%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep $(outdir)/version.itexi $(outdir)/weblinks.itexi
ifeq ($(WEB_VERSION),yes)
$(outdir)/weblinks.%: $(top-src-dir)/VERSION
$(PYTHON) $(top-src-dir)/scripts/build/create-weblinks-itexi.py > $@
-.SECONDARY: $(outdir)/version.itexi $(outdir)/version.texi \
- $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep \
- $(outdir)/*.texi
+# Keep this empty to prevent make from removing intermediate files.
+.SECONDARY:
GENERATE_OMF = $(buildscript-dir)/texi2omf --format $(1) --location $(webdir)$(tree-dir)/$(notdir $(basename $@)) --version $(TOPLEVEL_VERSION) $< > $@
+# Find the file $(1) within the texinfo include dirs and return its path.
+# If not found, return $(outdir)/$(1) assuming that it is a generated file.
+find-texi = \
+$(firstword \
+ $(wildcard $(src-dir)/$(1)) \
+ $(wildcard $(top-src-dir)/Documentation/$(1)) \
+ $(outdir)/$(1) \
+)
+
+# Recursively scan the file $(1) for @include, search for included files
+# within the texinfo include dirs, and return all dependencies.
+scan-texi = \
+$(foreach f, $(shell sed -ne "/^@include[[:space:]]/s/@include//p" $(1)), \
+ $(call find-texi,$(f)) \
+ $(call scan-texi,$(call find-texi,$(f))) \
+)
+
+# Find dependencies for the target $@, based on the texinfo source file $<,
+# and write the dependencies to a .dep file.
+DO_TEXI_DEP = ( echo ./$@: $(call scan-texi,$<) > $(basename $@).dep ) &&
+
TEXINFO_PAPERSIZE_OPTION= $(if $(findstring $(PAPERSIZE),a4),,-t @afourpaper)
DOCUMENTATION_INCLUDES += -I $(top-src-dir)/Documentation