@c -*- coding: utf-8; mode: texinfo; documentlanguage: es -*-
@ignore
- Translation of GIT committish: 42f15d2fa4de88b8ed1a3fed30570cde0ab03f5f
+ Translation of GIT committish: 2055f35c47a045a50a01ff4dba8524322cfc3b48
When revising a translation, copy the HEAD committish of the
version that you are working on. For details, see the Contributors'
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.12.0"
+@c \version "2.14.0"
@node Conceptos fundamentales
@example
\version @w{"@version{}"}
+
\header @{ @}
+
\score @{
@var{...expresión musical compuesta...} % toda la música viene aquí
\layout @{ @}
combinarán todos juntos en un archivo de salida único. No se necesita
ninguna instrucción @code{\book}, se creará una implícitamente. Sin
embargo, si quiere archivos de salida separados a partir de un único
-archivo @code{.ly}, entonces es necesario utilizar la instrucción
+archivo @file{.ly}, entonces es necesario utilizar la instrucción
@code{\book} para separar las distintas secciones: cada bloque
@code{\book} produce un archivo de salida distinto.
@cindex variables
-Otro atajo genial es la posibilidad de definir variables (véase
-@ref{Organizar las piezas mediante variables}). Todas las
+Otro magnífico atajo es la posibilidad de definir variables como
+se muestra en @ref{Organizar las piezas mediante variables}. Todas las
plantillas emplean lo siguiente:
@example
Cuando LilyPond examina este archivo, toma el valor de @code{melodia}
(todo lo que está después del signo igual) y lo inserta dondequiera
-que ve @code{\melodia}. No se requiere un cuidado especial con los
-nombres (puede ser @code{melodia}, @code{global},
+que ve @code{\melodia}. No se requiere un cuidado especial con el
+nombre (puede ser @code{melodia}, @code{global},
@code{CompasArmadura}, @code{manoderechadelpiano} o
-@code{fulanomengano}). Para ver más detalles, consulte @ref{Ahorrar
-tecleo mediante variables y funciones}. Recuerde que puede usar casi
+@code{fulanomengano} o cualquier otro). Recuerde que puede usar casi
cualquier nombre que se le ocurra, en la medida en que contenga
solamente caracteres alfabéticos y sea diferente de cualquiera de los
-nombres de instrucción de LilyPond. Las limitaciones exactas que
+nombres de instrucción de LilyPond. Para ver más detalles, consulte @ref{Ahorrar
+tecleo mediante variables y funciones}. Las limitaciones exactas que
afectan a los nombres de variable se detallan en @ruser{Estructura del
archivo}.
melody = \relative c'' { r4 d8\noBeam g, c4 r }
text = \lyricmode { And God said, }
upper = \relative c'' { <g d g,>2~ <g d g,> }
-lower = \relative c { b2 e2 }
+lower = \relative c { b2 e }
\score {
<<
r4 g8 g c4 c8 d |
e4 r8
<<
- { f c c }
+ { f8 c c }
\new Staff {
f8 f c
}
r4 g8 g c4 c8 d |
e4 r8
<<
- { f c c }
+ { f8 c c }
\new Staff \with {
- alignAboveContext = #"main" }
- { f8 f c }
+ alignAboveContext = #"main"
+ } { f8 f c }
>>
r4 |
}
antes de una barra insertada manualmente, y acabar antes de que acabe
la barra (algo que quizá no sea muy musical, pero es posible):
-@lilypond[quote,verbatim,fragment,ragged-right,relative=2]
- { g8\( a b[ c b\) a] }
+@lilypond[quote,verbatim,ragged-right,relative=2]
+g8\( a b[ c b\) a] g4
@end lilypond
En general, los distintos tipos de corchete, y los implicados en
unión que atraviesa dos grupos especiales, y una ligadura de fraseo
que sale del interior de un grupo especial (líneas 3 y 4).
-@lilypond[quote,verbatim,fragment,ragged-right]
-{
- r16[ g16 \times 2/3 {r16 e'8] }
- g16( a \times 2/3 {b d) e' }
- g8[( a \times 2/3 {b d') e'~]}
- \times 4/5 {e'32\( a b d' e'} a'4.\)
-}
+@lilypond[quote,verbatim,ragged-right,relative=1]
+r16[ g \times 2/3 { r16 e'8] }
+g,16( a \times 2/3 { b16 d) e }
+g,8[( a \times 2/3 { b8 d) e~] } |
+\times 4/5 { e32\( a, b d e } a4.\)
@end lilypond
supuesto; entonces ¿cuándo, exactamente, se necesitan varias voces?
En primer lugar observe este ejemplo de cuatro acordes:
-@lilypond[quote,verbatim,fragment,ragged-right,relative=1]
+@lilypond[quote,verbatim,ragged-right,relative=1]
\key g \major
<d g>4 <d fis> <d a'> <d g>
@end lilypond
He aquí cómo dividimos los acordes anteriores en dos voces y añadimos
la nota de paso y la ligadura:
-@lilypond[quote,verbatim,fragment,ragged-right,relative=2]
+@lilypond[quote,verbatim,ragged-right,relative=2]
\key g \major
-% Voice "1" Voice "2"
-<< { g4 fis8( g) a4 g } \\ { d4 d d d } >> |
+% Voice "1" Voice "2"
+<< { g4 fis8( g) a4 g } \\ { d4 d d d } >>
@end lilypond
Observe cómo las plicas de la segunda voz ahora se dirigen hacia
A continuación veamos otro ejemplo sencillo:
-@lilypond[quote,verbatim,fragment,ragged-right,relative=2]
+@lilypond[quote,verbatim,ragged-right,relative=2]
\key d \minor
% Voice "1" Voice "2"
<< { r4 g g4. a8 } \\ { d,2 d4 g } >> |
hay muchas notas en cada compás podría ser mejor dividirlo en dos
voces separadas, de la siguiente manera:
-@lilypond[quote,verbatim,fragment,ragged-right,relative=2]
+@lilypond[quote,verbatim,ragged-right,relative=2]
\key d \minor
<< {
% Voice "1"
ligaduras, plicas, matices dinámicos, etc., se ajusta de la forma
correcta.
-@lilypond[quote,verbatim,fragment]
+@lilypond[quote,verbatim]
\new Staff \relative c' {
% Main voice
c16 d e f
- % Voice "1" Voice "2" Voice "3"
- << { g4 f e } \\ { r8 e4 d c8 ~ } >> |
- << { d2 e2 } \\ { c8 b16 a b8 g ~ g2 } \\ { s4 b4 c2 } >> |
+ % Voice "1" Voice "2" Voice "3"
+ << { g4 f e } \\ { r8 e4 d c8~ } >> |
+ << { d2 e } \\ { c8 b16 a b8 g~ g2 } \\ { s4 b c2 } >> |
}
@end lilypond
\new Staff \relative c' {
% Main voice
c16 d e f
- << % Bar 1
+ << % Bar 1
{
\voiceOneStyle
g4 f e
\\
{
\voiceTwoStyle
- r8 e4 d c8 ~
+ r8 e4 d c8~
}
- >>
- << % Bar 2
+ >> |
+ << % Bar 2
% Voice 1 continues
- { d2 e2 }
+ { d2 e }
\\
% Voice 2 continues
- { c8 b16 a b8 g ~ g2 }
+ { c8 b16 a b8 g~ g2 }
\\
{
\voiceThreeStyle
- s4 b4 c2
+ s4 b c2
}
- >>
+ >> |
}
@end lilypond
@cindex relativo, modo, polifonía y
La polifonía no cambia la relación de las notas dentro de un bloque
-@code{\relative @{ @}}. La altura de cada nota aún se calcula con
+@code{\relative}. La altura de cada nota aún se calcula con
relación a la nota que le precede inmediatamente, o a la primera nota
del acorde precedente. Así, en
@lilypond[quote,ragged-right]
\new Staff \relative c'' {
\key aes \major
- << % Voice one
+ << % Voice one
{ c2 aes4. bes8 }
- \\ % Voice two
+ \\ % Voice two
{ aes2 f4 fes }
- \\ % No voice three
- \\ % Voice four
+ \\ % No voice three
+ \\ % Voice four
{
% Ignore these for now - they are explained in Ch 4
\once \override NoteColumn #'force-hshift = #0
\new Staff \relative c'' {
\key aes \major
<<
- { % Voice one
+ { % Voice one
\voiceOneStyle
c2 aes4. bes8
}
hemos aprendido, usando la construcción @code{<< \\ >>} para
introducir la música del primer compás en tres voces:
-@lilypond[quote,verbatim,fragment,ragged-right]
+@lilypond[quote,verbatim,ragged-right]
\new Staff \relative c'' {
\key aes \major
<<
- { c2 aes4. bes8 } \\ { aes2 f4 fes } \\ { <ees c>2 des2 }
- >>
- <c ees aes c>1
+ { c2 aes4. bes8 } \\ { aes2 f4 fes } \\ { <ees c>2 des }
+ >> |
+ <c ees aes c>1 |
}
@end lilypond
olvidándonos de la voz tres y situando la música en la voz cuatro.
Esto se hace escribiendo otro par de barras invertidas (@code{\\}).
-@lilypond[quote,verbatim,fragment,ragged-right]
+@lilypond[quote,verbatim,ragged-right]
\new Staff \relative c'' {
\key aes \major
- << % Voice one
+ << % Voice one
{ c2 aes4. bes8 }
- \\ % Voice two
- { aes2 f4 fes }
- \\ % Omit Voice three
- \\ % Voice four
- { <ees c>2 des2 }
+ \\ % Voice two
+ { aes2 f4 fes }
+ \\ % Omit Voice three
+ \\ % Voice four
+ { <ees c>2 des }
>> |
<c ees aes c>1 |
}
las ligaduras de unión y de expresión y las indicaciones de dinámica:
@lilypond[quote,ragged-right,verbatim]
-\relative c'{
+\relative c' {
% Default behavior or behavior after \oneVoice
- c d8 ~ d e4 ( f g a ) b-> c
+ c4 d8~ d e4( f | g4 a) b-> c |
}
@end lilypond
@lilypond[quote,ragged-right,verbatim]
-\relative c'{
+\relative c' {
\voiceOne
- c d8 ~ d e4 ( f g a ) b-> c
+ c4 d8~ d e4( f | g4 a) b-> c |
\oneVoice
- c, d8 ~ d e4 ( f g a ) b-> c
+ c,4 d8~ d e4( f | g4 a) b-> c |
}
@end lilypond
@lilypond[quote,ragged-right,verbatim]
-\relative c'{
+\relative c' {
\voiceTwo
- c d8 ~ d e4 ( f g a ) b-> c
+ c4 d8~ d e4( f | g4 a) b-> c |
\oneVoice
- c, d8 ~ d e4 ( f g a ) b-> c
+ c,4 d8~ d e4( f | g4 a) b-> c |
}
@end lilypond
% Start simultaneous section of three voices
<<
% Continue the main voice in parallel
- { g4 f e | d2 e2) }
+ { g4 f e | d2 e) | }
% Initiate second voice
\new Voice {
- % Set stems, etc, down
+ % Set stems, etc., down
\voiceTwo
- r8 e4 d c8 ~ | c8 b16 a b8 g ~ g2
+ r8 e4 d c8~ | c8 b16 a b8 g~ g2 |
}
% Initiate third voice
\new Voice {
% Set stems, etc, up
\voiceThree
- s2. | s4 b4 c2
+ s2. | s4 b c2 |
}
>>
}
\new Staff \relative c' {
c16^( d e f
<<
- { g4 f e | d2 e2) }
+ { g4 f e | d2 e) | }
\new Voice {
\voiceTwo
- r8 e4 d c8 ~ |
+ r8 e4 d c8~ |
<<
- {c8 b16 a b8 g ~ g2}
+ { c8 b16 a b8 g~ g2 | }
\new Voice {
\voiceThree
- s4 b4 c2
+ s4 b c2 |
}
>>
}
% Initiate first voice
\new Voice {
\voiceOne
- c16^( d e f g4 f e | d2 e2) |
+ c16^( d e f g4 f e | d2 e) |
}
% Initiate second voice
\new Voice {
% Set stems, etc, down
\voiceTwo
- s4 r8 e4 d c8 ~ | c8 b16 a b8 g ~ g2 |
+ s4 r8 e4 d c8~ | c8 b16 a b8 g~ g2 |
}
% Initiate third voice
\new Voice {
% Set stems, etc, up
\voiceThree
- s1 | s4 b4 c2 |
+ s1 | s4 b c2 |
}
>>
@end lilypond
explícitamente la letra y las notas mediante @code{\lyricsto@{@}},
usando el nombre asignado a la voz.
-@lilypond[quote,verbatim,fragment]
+@lilypond[quote,verbatim]
<<
- \new Voice = "one" \relative c'' {
- \autoBeamOff
- \time 2/4
- c4 b8. a16 g4. f8 e4 d c2
+ \new Voice = "one" {
+ \relative c'' {
+ \autoBeamOff
+ \time 2/4
+ c4 b8. a16 | g4. f8 | e4 d | c2 |
+ }
}
\new Lyrics \lyricsto "one" {
- No more let sins and sor -- rows grow.
+ No more let | sins and | sor -- rows | grow. |
}
>>
@end lilypond
no como música.
@lilypond[quote,verbatim]
-global = { \time 6/8 \partial 8 \key f \major}
+global = { \key f \major \time 6/8 \partial 8 }
+
SopOneMusic = \relative c'' {
- c8 | c([ bes)] a a([ g)] f | f'4. b, | c4.~ c4 }
-SopTwoMusic = \relative c' {
- r8 | r4. r4 c8 | a'([ g)] f f([ e)] d | e([ d)] c bes' }
+ c8 | c8([ bes)] a a([ g)] f | f'4. b, | c4.~ c4
+}
SopOneLyrics = \lyricmode {
- Let | flee -- cy flocks the | hills a -- dorn, __ }
+ Let | flee -- cy flocks the | hills a -- dorn, __
+}
+SopTwoMusic = \relative c' {
+ r8 | r4. r4 c8 | a'8([ g)] f f([ e)] d | e8([ d)] c bes'
+}
SopTwoLyrics = \lyricmode {
- Let | flee -- cy flocks the | hills a -- dorn, }
+ Let | flee -- cy flocks the | hills a -- dorn,
+}
\score {
\new ChoirStaff <<
@lilypond[quote,verbatim]
-TimeKey = { \time 4/4 \partial 4 \key c \major}
-SopMusic = \relative c' { c4 | e4. e8 g4 g | a a g }
-AltoMusic = \relative c' { c4 | c4. c8 e4 e | f f e }
-TenorMusic = \relative c { e4 | g4. g8 c4. b8 | a8 b c d e4 }
-BassMusic = \relative c { c4 | c4. c8 c4 c | f8 g a b c4 }
-VerseOne = \lyricmode {
- E -- | ter -- nal fa -- ther, | strong to save, }
-VerseTwo = \lyricmode {
- O | Christ, whose voice the | wa -- ters heard, }
-VerseThree = \lyricmode {
- O | Ho -- ly Spi -- rit, | who didst brood }
-VerseFour = \lyricmode {
- O | Tri -- ni -- ty of | love and pow'r }
+keyTime = { \key c \major \time 4/4 \partial 4 }
+
+SopMusic = \relative c' { c4 | e4. e8 g4 g | a4 a g }
+AltoMusic = \relative c' { c4 | c4. c8 e4 e | f4 f e }
+TenorMusic = \relative c { e4 | g4. g8 c4. b8 | a8 b c d e4 }
+BassMusic = \relative c { c4 | c4. c8 c4 c | f8 g a b c4 }
+
+VerseOne =
+ \lyricmode { E -- | ter -- nal fa -- ther, | strong to save, }
+VerseTwo =
+ \lyricmode { O | Christ, whose voice the | wa -- ters heard, }
+VerseThree =
+ \lyricmode { O | Ho -- ly Spi -- rit, | who didst brood }
+VerseFour =
+ \lyricmode { O | Tri -- ni -- ty of | love and pow'r }
\score {
\new ChoirStaff <<
\new Staff <<
\clef "treble"
- \new Voice = "Sop" { \voiceOne \TimeKey \SopMusic }
+ \new Voice = "Sop" { \voiceOne \keyTime \SopMusic }
\new Voice = "Alto" { \voiceTwo \AltoMusic }
\new Lyrics \lyricsto "Sop" { \VerseOne }
\new Lyrics \lyricsto "Sop" { \VerseTwo }
>>
\new Staff <<
\clef "bass"
- \new Voice = "Tenor" { \voiceOne \TimeKey \TenorMusic }
- \new Voice = "Bass" { \voiceTwo \BassMusic }
- >>
- >>
-}
-@end lilypond
-
-@cindex estrofa y estribillo
-
-Finalizamos con un ejemplo que muestra cómo podemos codificar una
-estrofa para solista seguida de un estribillo en dos partes sobre dos
-pentagramas. El posicionado de las secciones secuencial y simultánea
-para conseguirlo dentro de una sola partitura es un poco enrevesado,
-por tanto siga esta explicación con todo cuidado.
-
-Comenzamos el ejemplo con un bloque de partitura que contiene un
-@code{ChoirStaff}, pues queremos que aparezca un corchete al comienzo
-de la parte de coro. Normalmente necesitaríamos dobles ángulos
-después de @code{\new ChoirStaff} para meter dentro todos los
-pentagramas en paralelo, pero aquí queremos posponer el paralelismo
-mientras dura el solo y por ello usaremos llaves, aunque aquí unos
-ángulos dobles no harían daño. Dentro del @code{ChoirStaff} queremos
-en primer lugar el pentagrama que va a contener la estrofa. Debe
-contener notas y letra en paralelo, así que necesitamos dobles ángulos
-encerrando el @code{\new Voice} y el @code{\new Lyrics} para que den
-comienzo al mismo tiempo:
-
-@lilypond[quote,verbatim,ragged-right]
-versenotes = \relative c'' {
- \clef "treble"
- \key g \major
- \time 3/4 g g g b b b
-}
-versewords = \lyricmode {
- One two three four five six
-}
-\score {
- \new ChoirStaff {
- \new Staff <<
- \new Voice = "verse" {
- \versenotes \break
- }
- \new Lyrics \lyricsto verse {
- \versewords
- }
- >>
- }
-}
-@end lilypond
-
-Con esto tenemos la línea de la estrofa.
-
-Ahora deseamos continuar con estribilloA (la primera parte del
-estribillo) sobre el mismo pentagrama, mientras un segundo pentagrama
-aparece en paralelo con él para estribilloB (estribillo, segunda parte),
-por lo que ésta es una sección paralela que se debe situar
-inmediatamente a continuación del salto de línea @code{\break} en la
-voz de la estrofa. ¡Sí, @emph{dentro} de la voz de la estrofa! He
-aquí dicha sección paralela. Se podrían introducir más pentagramas de
-la misma forma.
-
-@example
-<<
- \notas_estribilloA
- \new Lyrics \lyricsto estrofa @{
- \letra_estribilloA
- @}
- \new Staff <<
- \new Voice = "estribilloB" @{
- \notas_estribilloB
- @}
- \new Lyrics \lyricsto "estribilloB" @{
- \letra_estribilloB
- @}
- >>
->>
-@end example
-
-Aquí tenemos el resultado final con dos pentagramas en el estribillo
-mostrando cómo la sección paralela se posiciona dentro de la voz de la
-estrofa:
-
-@lilypond[quote,verbatim, ragged-right]
-versenotes = \relative c'' {
- \clef "treble"
- \key g \major
- \time 3/4 g g g b b b
-}
-refrainnotesA = \relative c'' {
- \time 2/4
- c c g g \bar "|."
-}
-refrainnotesB = \relative c {
- \clef "bass"
- \key g \major
- c e d d
-}
-versewords = \lyricmode {
- One two three four five six
-}
-refrainwordsA = \lyricmode {
- la la la la
-}
-refrainwordsB = \lyricmode {
- dum dum dum dum
-}
-\score {
- \new ChoirStaff {
- \new Staff <<
- \new Voice = "verse" {
- \versenotes \break
- <<
- \refrainnotesA
- \new Lyrics \lyricsto "verse" {
- \refrainwordsA
- }
- \new Staff <<
- \new Voice = "refrainB" {
- \refrainnotesB
- }
- \new Lyrics \lyricsto "refrainB" {
- \refrainwordsB
- }
- >>
- >>
- }
- \new Lyrics \lyricsto "verse" {
- \versewords
- }
- >>
- }
-}
-@end lilypond
-
-@cindex libro
-@cindex book, ejemplo de su uso
-@funindex \book
-@funindex book
-
-Sin embargo, y aunque esto es un interesante y útil ejercicio
-destinado a ayudarle a comprender cómo funcionan los bloques
-secuenciales y simultáneos, en la práctica quizá nos decidiríamos por
-codificarlo como dos bloques @code{\score} dentro de un bloque
-@code{\book} implícito, como sigue:
-
-@lilypond[quote,verbatim,ragged-right]
-versenotes = \relative c'' {
- \clef "treble"
- \key g \major
- \time 3/4 g g g b b b
-}
-refrainnotesA = \relative c'' {
- \time 2/4
- c c g g \bar "|."
-}
-refrainnotesB = \relative c {
- \clef "bass"
- \key g \major
- c e d d
-}
-versewords = \lyricmode {
- One two three four five six
-}
-refrainwordsA = \lyricmode {
- la la la la
-}
-refrainwordsB = \lyricmode {
- dum dum dum dum
-}
-\score {
- \new Staff <<
- \new Voice = "verse" {
- \versenotes
- }
- \new Lyrics \lyricsto "verse" {
- \versewords
- }
- >>
-}
-
-\score {
- \new ChoirStaff <<
- \new Staff <<
- \new Voice = "refrainA" {
- \refrainnotesA
- }
- \new Lyrics \lyricsto "refrainA" {
- \refrainwordsA
- }
- >>
- \new Staff <<
- \new Voice = "refrainB" {
- \refrainnotesB
- }
- \new Lyrics \lyricsto "refrainB" {
- \refrainwordsB
- }
+ \new Voice = "Tenor" { \voiceOne \keyTime \TenorMusic }
+ \new Voice = "Bass" { \voiceTwo \BassMusic }
>>
>>
}
el archivo de entrada. Por ejemplo, compare la entrada y la salida
del siguiente ejemplo:
-@lilypond[quote,verbatim,relative=2,fragment]
-cis4 cis2. g4
+@lilypond[quote,verbatim,relative=2]
+cis4 cis2. | a4 a2. |
@end lilypond
La entrada es bastante escueta, pero en la salida se han añadido las
interpretar la @var{expresión_musical} que está dentro de ese
contexto.
-(Observe que normalmente no se necesita una instrucción @code{\new
-Score}, pues el contexto esencial del nivel superior, @code{Score}, se
-crea automáticamente cuando se interpreta la expresión musical que
-está dentro del bloque @code{\score}. La única razón para crear un
-contexto @code{Score} explícitamente utilizando @code{\new Score} es
-introducir un bloque @code{\with} en el que se pueden especificar uno
-o más valores predeterminados de propiedades de contexto para toda la
-partitura. Se puede encontrar más información sobre el uso de los
-bloques @code{\with} bajo el epígrafe @qq{Setting context properties
-with @code{\\with} } en @ref{Modificar las propiedades de los
-contextos}).
-
+@warning{No se debe usar @bs{}@code{new Score} porque el contexto
+@code{Score} esencial del nivel superior ya se crea automáticamente al
+interpretarse la expresión musical que está dentro del bloque
+@bs{}@code{score}. Los valores predeterminados de propiedades de
+contexto válidos para toda la partitura se pueden cambiar dentro del
+bloque @bs{}@code{layout}. Véase @ref{Modificar las propiedades de
+los contextos}.}
En las secciones anteriores ha podido ver muchos ejemplos prácticos que
creaban nuevos contextos de @code{Staff} y de @code{Voice}, pero para
<< % start of simultaneous staves section
\time 2/4
\new Staff { % create RH staff
- \key g \minor
\clef "treble"
+ \key g \minor
\new Voice { % create voice for RH notes
\relative c'' { % start of RH notes
d4 ees16 c8. |
} % end of RH voice
} % end of RH staff
\new Staff << % create LH staff; needs two simultaneous voices
- \key g \minor
\clef "bass"
+ \key g \minor
\new Voice { % create LH voice one
\voiceOne
\relative g { % start of LH voice one notes
<<
\new Staff \relative c'' {
\set Staff.instrumentName = #"Soprano"
- c4 c
- }
+ c2 c
+ }
\new Staff \relative c' {
- \set instrumentName = #"Alto" % Wrong!
- d4 d
- }
+ \set instrumentName = #"Alto" % Wrong!
+ d2 d
+ }
>>
@end lilypond
@lilypond[quote,verbatim,ragged-right]
<<
\new Staff \relative c'' {
- ais4 aes
- }
+ ais2 aes
+ }
\new Staff \relative c'' {
\set Staff.extraNatural = ##f
- ais4 aes
- }
+ ais2 aes
+ }
>>
@end lilypond
@lilypond[quote,verbatim,ragged-right]
<<
\new Staff \relative c'' {
- ais4 aes
- }
+ ais2 aes
+ }
\new Staff \relative c'' {
\set Score.extraNatural = ##f
- ais4 aes
- }
+ ais2 aes
+ }
>>
@end lilypond
(entre otras cosas) varias veces. El cambio se toma a partir del
valor predeterminado, no el valor en curso.
-@lilypond[quote,verbatim,ragged-right,relative=1,fragment]
-c4
+@lilypond[quote,verbatim,ragged-right,relative=1]
+c4 d
% make note heads smaller
\set fontSize = #-4
-d e
+e4 f |
% make note heads larger
\set fontSize = #2.5
-f g
+g4 a
% return to default size
\unset fontSize
-a b
+b4 c |
@end lilypond
Hemos podido ver cómo establecer los valores de diversos tipos de
@lilypond[quote,verbatim,ragged-right]
<<
- \new Staff
- \relative c'' {
- gis ges aes ais
+ \new Staff {
+ \relative c'' {
+ gis4 ges aes ais
+ }
}
- \new Staff \with { extraNatural = ##f }
- \relative c'' {
- gis ges aes ais
+ \new Staff \with { extraNatural = ##f } {
+ \relative c'' {
+ gis4 ges aes ais
+ }
}
>>
@end lilypond
-O bien, si la sobreescritura de la propiedad se va a aplicar a todos
-los pentagramas de la partitura, se puede añadir a una instrucción
-@code{\new Score} explícita, como se ve a continuación:
-
-@lilypond[quote,verbatim,ragged-right]
-\score {
- \new Score \with { extraNatural = ##f } <<
- \new Staff {
- \relative c'' {
- gis ges aes ais
- }
- }
- \new Staff {
- \relative c'' {
- gis ges aes ais
- }
- }
- >>
-}
-@end lilypond
-
Las propiedades ajustadas de esta manera aún pueden cambiarse
dinámicamente utilizando @code{\set} y ser devueltas al valor
predeterminados que se estableció en el bloque @code{\with} mediante
}
}
\layout {
- \context { \Staff
+ \context {
+ \Staff
extraNatural = ##t
}
}
}
@end lilypond
+Si se quiere aplicar la sobreescritura de propiedades a todos los
+pentagramas de la partitura:
+
+@lilypond[quote,verbatim]
+\score {
+ <<
+ \new Staff {
+ \relative c'' {
+ gis4 ges aes ais
+ }
+ }
+ \new Staff {
+ \relative c'' {
+ gis4 ges aes ais
+ }
+ }
+ >>
+ \layout {
+ \context {
+ \Score extraNatural = ##f
+ }
+ }
+}
+@end lilypond
+
@noindent
Las propiedades de contexto establecidas de esta forma se pueden
sobreescribir para ejemplares concretos de contextos mediante
@seealso
Referencia de la notación:
-@ruser{Cambiar los valores por omisión de los contextos}.
+@ruser{Cambiar los valores por omisión de los contextos},
@c FIXME
@c uncomment when backslash-node-name issue is resolved -pm
-@c @ruser{La instrucción set}.
+@ruser{La instrucción set}.
Referencia de funcionamiento interno:
@rinternals{Contexts},
\remove Staff_symbol_engraver
}
\relative c' {
- c4
+ c4 d
\set fontSize = #-4 % make note heads smaller
- d e
+ e4 f |
\set fontSize = #2.5 % make note heads larger
- f g
+ g4 a
\unset fontSize % return to default size
- a b
+ b4 c |
}
@end lilypond
\new Staff <<
\new Voice \with {
\consists Ambitus_engraver
+ } {
+ \relative c'' {
+ \voiceOne
+ c4 a b g
+ }
}
- \relative c'' {
- \voiceOne
- c a b g
- }
- \new Voice
- \relative c' {
- \voiceTwo
- c e d f
+ \new Voice {
+ \relative c' {
+ \voiceTwo
+ c4 e d f
+ }
}
>>
@end lilypond
@lilypond[quote,verbatim,ragged-right]
\new Staff \with {
- \consists Ambitus_engraver
- }
- <<
- \new Voice
- \relative c'' {
- \voiceOne
- c a b g
+ \consists Ambitus_engraver
+}
+<<
+ \new Voice {
+ \relative c'' {
+ \voiceOne
+ c4 a b g
+ }
}
- \new Voice
- \relative c' {
- \voiceTwo
- c e d f
+ \new Voice {
+ \relative c' {
+ \voiceTwo
+ c4 e d f
+ }
}
>>
@end lilypond
@lilypond[quote,verbatim,ragged-right]
\score {
<<
- \new Staff <<
- \relative c'' { c a b g }
- >>
- \new Staff <<
- \relative c' { c a b g }
- >>
- \new Staff <<
+ \new Staff {
+ \relative c'' {
+ c4 a b g
+ }
+ }
+ \new Staff {
+ \relative c' {
+ c4 a b g
+ }
+ }
+ \new Staff {
\clef "G_8"
- \relative c' { c a b g }
- >>
- \new Staff <<
+ \relative c' {
+ c4 a b g
+ }
+ }
+ \new Staff {
\clef "bass"
- \relative c { c a b g }
- >>
+ \relative c {
+ c4 a b g
+ }
+ }
>>
\layout {
- \context { \Staff
+ \context {
+ \Staff
\consists Ambitus_engraver
}
}
@ruser{Modificar los complementos (plug-ins) de contexto},
@ruser{Cambiar los valores por omisión de los contextos}.
+@knownissues
+Los grabadores @code{Stem_engraver} y @code{Beam_engraver}
+(de plica y de barra) adjuntan a la cabeza de las notas
+los objetos que crean. Si se suprime el grabador de cabezas de nota
+@code{Note_heads_engraver}, no se produce ninguna cabeza y por tanto
+no se crean tampoco plicas ni barras.
+
@node Extender las plantillas
@section Extender las plantillas
@example
\version @w{"@version{}"}
melodia = \relative c' @{
- \clef treble
+ \clef "treble"
\key c \major
\time 4/4
a4 b c d
@example
\version @w{"@version{}"}
melodia = \relative c' @{
- \clef treble
+ \clef "treble"
\key c \major
\time 4/4
a4 b c d
@example
\version @w{"@version{}"}
musicaSoprano = \relative c' @{
- \clef treble
+ \clef "treble"
\key c \major
\time 4/4
a4 b c d
@}
musicaCello = \relative c @{
- \clef bass
+ \clef "bass"
\key c \major
\time 4/4
d4 g fis8 e d4
@c Indentation in this example is deliberately poor
@example
-\score@{
+\score @{
<<
<<
\new Voice = "uno" @{
@lilypond[quote,verbatim,ragged-right,addversion]
sopranoMusic = \relative c' {
- \clef treble
+ \clef "treble"
\key c \major
\time 4/4
a4 b c d
}
celloMusic = \relative c {
- \clef bass
+ \clef "bass"
\key c \major
\time 4/4
d4 g fis8 e d4
@c The following should appear as music without code
@lilypond[quote,ragged-right]
global = { \key d \major \time 4/4 }
+
sopranoMusic = \relative c'' {
\clef "treble"
r4 d2 a4 | d4. d8 a2 | cis4 d cis2 |
}
sopranoWords = \lyricmode {
- Wor -- thy is the lamb that was slain
+ Wor -- thy | is the lamb | that was slain |
}
+
altoMusic = \relative a' {
\clef "treble"
r4 a2 a4 | fis4. fis8 a2 | g4 fis e2 |
}
altoWords = \sopranoWords
+
tenorMusic = \relative c' {
\clef "G_8"
r4 fis2 e4 | d4. d8 d2 | e4 a, cis2 |
}
tenorWords = \sopranoWords
+
bassMusic = \relative c' {
\clef "bass"
r4 d2 cis4 | b4. b8 fis2 | e4 d a'2 |
}
bassWords = \sopranoWords
+
upper = \relative a' {
\clef "treble"
\global
<d fis d'>4. <d fis d'>8 <a d a'>2 |
<g cis g'>4 <a d fis> <a cis e>2 |
}
+
lower = \relative c, {
\clef "bass"
\global
\new ChoirStaff <<
\new Staff = "sopranos" <<
\set Staff.instrumentName = #"Soprano"
- \new Voice = "sopranos" { \global \sopranoMusic }
+ \new Voice = "sopranos" {
+ \global
+ \sopranoMusic
+ }
>>
- \new Lyrics \lyricsto "sopranos" { \sopranoWords }
+ \new Lyrics \lyricsto "sopranos" {
+ \sopranoWords
+ }
\new Staff = "altos" <<
\set Staff.instrumentName = #"Alto"
- \new Voice = "altos" { \global \altoMusic }
+ \new Voice = "altos" {
+ \global
+ \altoMusic
+ }
>>
\new Lyrics \lyricsto "altos" { \altoWords }
\new Staff = "tenors" <<
\set Staff.instrumentName = #"Tenor"
- \new Voice = "tenors" { \global \tenorMusic }
+ \new Voice = "tenors" {
+ \global
+ \tenorMusic
+ }
>>
\new Lyrics \lyricsto "tenors" { \tenorWords }
\new Staff = "basses" <<
\set Staff.instrumentName = #"Bass"
- \new Voice = "basses" { \global \bassMusic }
+ \new Voice = "basses" {
+ \global
+ \bassMusic
+ }
>>
- \new Lyrics \lyricsto "basses" { \bassWords }
+ \new Lyrics \lyricsto "basses" {
+ \bassWords
+ }
>> % end ChoirStaff
-
\new PianoStaff <<
\set PianoStaff.instrumentName = #"Piano"
\new Staff = "upper" \upper
Al hacerlo así obtenemos el ChoirStaff siguiente:
@example
- \new ChoirStaff <<
- \new Staff = "sopranos" <<
- \set Staff.instrumentName = #"Soprano"
- \new Voice = "sopranos" @{ \global \musicaSoprano @}
- >>
- \new Lyrics \lyricsto "sopranos" @{ \latraSoprano @}
- \new Staff = "altos" <<
- \set Staff.instrumentName = #"Alto"
- \new Voice = "altos" @{ \global \musicaAlto @}
- >>
- \new Lyrics \lyricsto "altos" @{ \letraAlto @}
- \new Staff = "tenores" <<
- \set Staff.instrumentName = #"Tenor"
- \new Voice = "tenores" @{ \global \musicaTenor @}
- >>
- \new Lyrics \lyricsto "tenores" @{ \letraTenor @}
- \new Staff = "bajos" <<
- \set Staff.instrumentName = #"Bass"
- \new Voice = "bajos" @{ \global \musicaBajo @}
- >>
- \new Lyrics \lyricsto "bajos" @{ \letraBajo @}
- >> % fin del ChoirStaff
+\new ChoirStaff <<
+ \new Staff = "sopranos" <<
+ \set Staff.instrumentName = #"Soprano"
+ \new Voice = "sopranos" @{
+ \global
+ \musicaSoprano
+ @}
+ >>
+ \new Lyrics \lyricsto "sopranos" @{
+ \letraSoprano
+ @}
+ \new Staff = "altos" <<
+ \set Staff.instrumentName = #"Alto"
+ \new Voice = "altos" @{
+ \global
+ \musicaAlto
+ @}
+ >>
+ \new Lyrics \lyricsto "altos" @{
+ \letraAlto
+ @}
+ \new Staff = "tenors" <<
+ \set Staff.instrumentName = #"Tenor"
+ \new Voice = "tenors" @{
+ \global
+ \musicaTenor
+ @}
+ >>
+ \new Lyrics \lyricsto "tenors" @{
+ \letraTenor
+ @}
+ \new Staff = "bajos" <<
+ \set Staff.instrumentName = #"Bajo"
+ \new Voice = "bajos" @{
+ \global
+ \musicaBajo
+ @}
+ >>
+ \new Lyrics \lyricsto "bajos" @{
+ \letraBajo
+ @}
+>> % fin del ChoirStaff
@end example
A continuación debemos trabajar sobre la parte de piano. Es fácil:
<< % combinar los grupos ChoirStaff y PianoStaff uno sobre el otro
\new ChoirStaff <<
\new Staff = "sopranos" <<
- \new Voice = "sopranos" @{ \global \musicaSoprano @}
+ \new Voice = "sopranos" @{
+ \global
+ \musicaSoprano
+ @}
>>
- \new Lyrics \lyricsto "sopranos" @{ \letraSoprano @}
+ \new Lyrics \lyricsto "sopranos" @{
+ \letraSoprano
+ @}
\new Staff = "altos" <<
- \new Voice = "altos" @{ \global \musicaAlto @}
+ \new Voice = "altos" @{
+ \global
+ \musicaAlto
+ @}
>>
- \new Lyrics \lyricsto "altos" @{ \letraAlto @}
+ \new Lyrics \lyricsto "altos" @{
+ \letraAlto
+ @}
\new Staff = "tenores" <<
\clef "G_8" % clave de tenor
- \new Voice = "tenores" @{ \global \musicaTenor @}
+ \new Voice = "tenores" @{
+ \global
+ \musicaTenor
+ @}
>>
- \new Lyrics \lyricsto "tenores" @{ \letraTenor @}
+ \new Lyrics \lyricsto "tenores" @{
+ \letraTenor
+ @}
\new Staff = "bajos" <<
\clef "bass"
- \new Voice = "bajos" @{ \global \musicaBajo @}
+ \new Voice = "bajos" @{
+ \global
+ \musicaBajo
+ @}
>>
- \new Lyrics \lyricsto "bajos" @{ \letraBajo @}
+ \new Lyrics \lyricsto "bajos" @{
+ \letraBajo
+ @}
>> % fin del ChoirStaff
\new PianoStaff <<
r4 d2 a4 | d4. d8 a2 | cis4 d cis2 |
}
sopranoWords = \lyricmode {
- Wor -- thy is the lamb that was slain
+ Wor -- thy | is the lamb | that was slain |
}
altoMusic = \relative a' {
\clef "treble"
\new ChoirStaff <<
\new Staff = "sopranos" <<
\set Staff.instrumentName = #"Soprano"
- \new Voice = "sopranos" { \global \sopranoMusic }
+ \new Voice = "sopranos" {
+ \global
+ \sopranoMusic
+ }
>>
- \new Lyrics \lyricsto "sopranos" { \sopranoWords }
+ \new Lyrics \lyricsto "sopranos" {
+ \sopranoWords
+ }
\new Staff = "altos" <<
\set Staff.instrumentName = #"Alto"
- \new Voice = "altos" { \global \altoMusic }
+ \new Voice = "altos" {
+ \global
+ \altoMusic
+ }
>>
- \new Lyrics \lyricsto "altos" { \altoWords }
+ \new Lyrics \lyricsto "altos" {
+ \altoWords
+ }
\new Staff = "tenors" <<
\set Staff.instrumentName = #"Tenor"
- \new Voice = "tenors" { \global \tenorMusic }
+ \new Voice = "tenors" {
+ \global
+ \tenorMusic
+ }
>>
- \new Lyrics \lyricsto "tenors" { \tenorWords }
+ \new Lyrics \lyricsto "tenors" {
+ \tenorWords
+ }
\new Staff = "basses" <<
\set Staff.instrumentName = #"Bass"
- \new Voice = "basses" { \global \bassMusic }
+ \new Voice = "basses" {
+ \global
+ \bassMusic
+ }
>>
- \new Lyrics \lyricsto "basses" { \bassWords }
+ \new Lyrics \lyricsto "basses" {
+ \bassWords
+ }
>> % end ChoirStaff
\new PianoStaff <<
title = "Jesu, meine Freude"
composer = "J S Bach"
@}
-TimeKey = @{ \time 4/4 \key c \minor @}
-MusicaManualUnoVozUno = @{s1@}
-MusicaManualUnoVozDos = @{s1@}
-MusicaManualDos = @{s1@}
-MusicaPedal = @{s1@}
+keyTime = @{ \key c \minor \time 4/4 @}
+MusicaManualUnoVozUno = @{ s1 @}
+MusicaManualUnoVozDos = @{ s1 @}
+MusicaManualDos = @{ s1 @}
+MusicaPedal = @{ s1 @}
\score @{
@}
segunda sólo una.
@example
- \new PianoStaff <<
- \new Staff = "ManualUno" <<
- \new Voice @{ \MusicaManualUnoVozUno @}
- \new Voice @{ \MusicaManualUnoVozDos @}
- >> % fin del contexto de Staff ManualUno
- \new Staff = "ManualDos" <<
- \new Voice @{ \MusicaManualDos @}
- >> % fin del contexto de Staff ManualDos
- >> % fin del contexto de PianoStaff
+\new PianoStaff <<
+ \new Staff = "ManualUno" <<
+ \new Voice @{
+ \MusicaManualUnoVozUno
+ @}
+ \new Voice @{
+ \MusicaManualUnoVozDos
+ @}
+ >> % fin del contexto de Staff ManualUno
+ \new Staff = "ManualDos" <<
+ \new Voice @{
+ \MusicaManualDos
+ @}
+ >> % fin del contexto de Staff ManualDos
+>> % fin del contexto de PianoStaff
@end example
Después, tenemos que añadir un pentagrama para el órgano de pedal.
<< % el grupo PianoStaff y el pentagrama de Pedal son simultáneos
\new PianoStaff <<
\new Staff = "ManualUno" <<
- \new Voice @{ \MusicaManualUnoVozUno @}
- \new Voice @{ \MusicaManualUnoVozDos @}
+ \new Voice @{
+ \MusicaManualUnoVozUno
+ @}
+ \new Voice @{
+ \MusicaManualUnoVozDos
+ @}
>> % fin del contexto de Staff ManualUno
\new Staff = "ManualDos" <<
- \new Voice @{ \MusicaManualDos @}
+ \new Voice @{
+ \MusicaManualDos
+ @}
>> % fin del contexto de Staff ManualDos
>> % fin del contexto de PianoStaff
\new Staff = "OrganoPedal" <<
- \new Voice @{ \MusicaOrganoPedal @}
+ \new Voice @{
+ \MusicaOrganoPedal
+ @}
>>
>>
@end example
<< % el grupo PianoStaff y el pentagrama de Pedal son simultáneos
\new PianoStaff <<
\new Staff = "ManualUno" <<
- \TimeKey % establecer compás y tonalidad
+ \keyTime % establecer compás y tonalidad
\clef "treble"
- \new Voice @{ \voiceOne \MusicaManualUnoVozUno @}
- \new Voice @{ \voiceTwo \MusicaManualUnoVozDos @}
+ \new Voice @{
+ \voiceOne
+ \MusicaManualUnoVozUno
+ @}
+ \new Voice @{
+ \voiceTwo
+ \MusicaManualUnoVozDos
+ @}
>> % fin del contexto de Staff ManualUno
\new Staff = "ManualDos" <<
- \TimeKey
+ \keyTime
+ \clef "bass"
+ \new Voice @{
+ \MusicaManualDos
+ @}
+ >> % fin del contexto de Staff ManualDos
+ >> % fin del contexto de PianoStaff
+ \new Staff = "OrganoPedal" <<
+ \keyTime
+ \clef "bass"
+ \new Voice @{
+ \MusicaOrganoPedal
+ @}
+ >> % fin del pentagrama de OrganoPedal
+ >>
+@} % fin del contexto Score
+@end example
+
+@cindex ampliabilidad de las pautas
+@cindex pautas, ampliabilidad
+
+La disposición anterior de los pentagramas de órgano es casi perfecta;
+sin embargo, existe un ligero defecto que no es visible cuando se
+observa un solo sistema: la distancia entre el pentagrama de pedal y
+el de la mano izquierda debiera ser aproximadamente la misma que la
+que existe entre los pentagramas de las manos izquierda y derecha.
+Concretamente, la ampliabilidad de los pentagramas dentro de un
+contexto @code{PianoStaff} es limitada (de forma que la distancia
+entre los pentagramas de las manos izquierda y derecha nunca crezcan
+excesivamente), y el pentagrama de los pedales debería comportarse de
+una forma similar.
+
+@cindex sub-propiedades
+@cindex propiedades, sub-propiedades
+@cindex objetos gráficos
+@cindex gráficos, objetos
+@cindex grobs
+
+El grado de ampliabilidad o separabilidad de los pentagramas se puede
+controlar con la propiedad @code{staff-staff-spacing} del @q{objeto
+gráfico} @code{VerticalAxisGroup} (los objetos gráficos reciben por lo
+general el nombre de @q{grob}s en la documentación de lilypond); no se
+preocupe por el momento de los detalles, pues esto se explica más
+tarde de forma exhaustiva. Los más curiosos pueden echar un vistazo a
+@ruser{Panorámica de la modificación de las propiedades}. En este
+caso, queremos modificar solamente la sub-propiedad
+@code{stretchability}.
+De nuevo, los curiosos encontrarán los valores
+predeterminados para la propiedad staff-staff-spacing
+en el archivo @file{scm/define-grobs.scm}
+examinando la definición del grob @code{VerticalAxisGroup} grob. El
+valor de @code{stretchability} se toma de la definición del contexto
+@code{PianoStaff} (en el archivo @file{ly/engraver-init.ly}) de
+forma que los valores sean idénticos.
+
+@example
+\score @{
+ << % el grupo PianoStaff y el pentagrama de Pedal son simultáneos
+ \new PianoStaff <<
+ \new Staff = "ManualUno" <<
+ \keyTime % establecer compás y tonalidad
+ \clef "treble"
+ \new Voice @{
+ \voiceOne
+ \MusicaManualUnoVozUno
+ @}
+ \new Voice @{
+ \voiceTwo
+ \MusicaManualUnoVozDos
+ @}
+ >> % % fin del contexto de Staff ManualUno
+ \new Staff = "ManualDos" \with @{
+ \override VerticalAxisGroup
+ #'staff-staff-spacing #'stretchability = 5
+ @} <<
+ \keyTime
\clef "bass"
- \new Voice @{ \MusicaManualDos @}
+ \new Voice @{
+ \MusicaManualDos
+ @}
>> % fin del contexto de Staff ManualDos
>> % fin del contexto de PianoStaff
\new Staff = "OrganoPedal" <<
- \TimeKey
+ \keyTime
\clef "bass"
- \new Voice @{ \MusicaOrganoPedal @}
+ \new Voice @{
+ \MusicaOrganoPedal
+ @}
>> % fin del pentagrama de OrganoPedal
>>
-@} % end Score context
+@} % fin del contexto Score
@end example
Con esto se completa la estructura. Toda música para órgano de tres
title = "Jesu, meine Freude"
composer = "J S Bach"
}
-TimeKey = { \time 4/4 \key c \minor }
+keyTime = { \key c \minor \time 4/4 }
ManualOneVoiceOneMusic = \relative g' {
- g4 g f ees | d2 c2 |
+ g4 g f ees |
+ d2 c |
}
ManualOneVoiceTwoMusic = \relative c' {
ees16 d ees8~ ees16 f ees d c8 d~ d c~ |
- c c4 b8 c8. g16 c b c d |
+ c8 c4 b8 c8. g16 c b c d |
}
ManualTwoMusic = \relative c' {
c16 b c8~ c16 b c g a8 g~ g16 g aes ees |
- f ees f d g aes g f ees d e8~ ees16 f ees d |
+ f16 ees f d g aes g f ees d e8~ ees16 f ees d |
}
PedalOrganMusic = \relative c {
r8 c16 d ees d ees8~ ees16 a, b g c b c8 |
r16 g ees f g f g8 c,2 |
- }
+}
\score {
<< % PianoStaff and Pedal Staff must be simultaneous
\new PianoStaff <<
\new Staff = "ManualOne" <<
- \TimeKey % set time signature and key
+ \keyTime % set key and time signature
\clef "treble"
- \new Voice { \voiceOne \ManualOneVoiceOneMusic }
- \new Voice { \voiceTwo \ManualOneVoiceTwoMusic }
+ \new Voice {
+ \voiceOne
+ \ManualOneVoiceOneMusic
+ }
+ \new Voice {
+ \voiceTwo
+ \ManualOneVoiceTwoMusic
+ }
>> % end ManualOne Staff context
- \new Staff = "ManualTwo" <<
- \TimeKey
+ \new Staff = "ManualTwo" \with {
+ \override VerticalAxisGroup
+ #'staff-staff-spacing #'stretchability = 5
+ } <<
+ \keyTime
\clef "bass"
- \new Voice { \ManualTwoMusic }
+ \new Voice {
+ \ManualTwoMusic
+ }
>> % end ManualTwo Staff context
>> % end PianoStaff context
\new Staff = "PedalOrgan" <<
- \TimeKey
+ \keyTime
\clef "bass"
- \new Voice { \PedalOrganMusic }
+ \new Voice {
+ \PedalOrganMusic
+ }
>> % end PedalOrgan Staff context
>>
} % end Score context
@end lilypond
+@seealso
+Glosario musical:
+@rglos{system}.
@node Ahorrar tecleo mediante variables y funciones
@subsection Ahorrar tecleo mediante variables y funciones
@lilypond[quote,verbatim,ragged-right]
hornNotes = \relative c'' { c4 b dis c }
+
\score {
{
\hornNotes
@lilypond[quote,verbatim,ragged-right]
fragmentA = \relative c'' { a4 a8. b16 }
fragmentB = \relative c'' { a8. gis16 ees4 }
-violin = \new Staff { \fragmentA \fragmentA \fragmentB \fragmentA }
+
+violin = \new Staff {
+ \fragmentA \fragmentA |
+ \fragmentB \fragmentA |
+}
+
\score {
{
\violin
@c TODO Avoid padtext - not needed with skylining
@lilypond[quote,verbatim,ragged-right]
-dolce = \markup{ \italic \bold dolce }
+dolce = \markup { \italic \bold dolce }
+
padText = { \once \override TextScript #'padding = #5.0 }
-fthenp=_\markup{ \dynamic f \italic \small { 2nd } \hspace #0.1 \dynamic p }
+fthenp =_\markup {
+ \dynamic f \italic \small { 2nd } \hspace #0.1 \dynamic p
+}
+
violin = \relative c'' {
\repeat volta 2 {
c4._\dolce b8 a8 g a b |
c,4.\fthenp b8 c4 c-. |
}
}
+
\score {
{
\violin
}
-\layout{ragged-right=##t}
+ \layout { ragged-right = ##t }
}
@end lilypond
@example
violin = \relative c'' @{
\repeat volta 2 @{
- c4._\markup@{ \italic \bold dolce @} b8 a8 g a b |
+ c4._\markup @{ \italic \bold dolce @} b8 a8 g a b |
\once \override TextScript #'padding = #5.0
c4.^"hi there!" d8 e' f g d |
- c,4.\markup@{ \dynamic f \italic \small @{ 2nd @}
- \hspace #0.1 \dynamic p @} b8 c4 c-. |
+ c,4.\markup @{
+ \dynamic f \italic \small @{ 2nd @} \hspace #0.1 \dynamic p
+ @}
+ b8 c4 c-. |
@}
@}
@end example
@lilypond[quote,verbatim,ragged-right]
padText =
-#(define-music-function (parser location padding) (number?)
- #{
- \once \override TextScript #'padding = #$padding
- #})
+#(define-music-function
+ (parser location padding)
+ (number?)
+ #{
+ \once \override TextScript #'padding = $padding
+ #})
\relative c''' {
- c4^"piu mosso" b a b
+ c4^"piu mosso" b a b |
\padText #1.8
- c4^"piu mosso" d e f
+ c4^"piu mosso" d e f |
\padText #2.6
- c4^"piu mosso" fis a g
+ c4^"piu mosso" fis a g |
}
@end lilypond
La utilización de identificadores también es una buena forma de
reducir el trabajo si la sintaxis de entrada de LilyPond cambia (véase
-@ref{Actualizar ficheros con convert-ly}). Si tiene una sola
+@rprogram{Actualizar ficheros con convert-ly}). Si tiene una sola
definición (como p.ej. @code{\dolce}) para todos sus archivos (ver
@ref{Hojas de estilo}), y después la sintaxis se modifica, sólo tendrá
que actualizar su definición @code{\dolce} única, en lugar de tener
-que hacer cambios en cada uno de los archivos @code{.ly}.
+que hacer cambios en cada uno de los archivos @file{.ly}.
@node Partituras y particellas
-@section Partituras y particellas
+@subsection Partituras y particellas
@translationof Scores and parts
En música orquestal, todas las notas se imprimen dos veces. Una vez
@example
notasTrompa = \relative c @{
\time 2/4
- r4 f8 a cis4 f e d
+ r4 f8 a | cis4 f | e4 d |
@}
@end example
@example
\include "trompa.ly"
+
\header @{
instrument = "Trompa en Fa"
@}
@lilypond[quote,ragged-right]
\transpose f c' \relative c {
\time 2/4
- r4 f8 a cis4 f e d
+ r4 f8 a | cis4 f | e4 d |
}
@end lilypond
\transpose f c' \relative c {
\time 2/4
\set Score.skipBars = ##t
- R2*3
- r4 f8 a cis4 f e d
+ R2*3 |
+ r4 f8 a | cis4 f | e4 d |
}
@end lilypond
@lilypond[quote,ragged-right]
\relative c <<
\new Staff {
- \time 2/4 R2*3
- r4 f8 a cis4 f e d
+ \clef "treble"
+ \time 2/4
+ R2*3 |
+ r4 f8 a | cis4 f | e4 d |
}
\new Staff {
- \clef bass
- r4 d,8 f | gis4 c | b bes |
- a8 e f4 | g d | gis f
+ \clef "bass"
+ \time 2/4
+ r4 d,8 f | gis4 c | b4 bes |
+ a8 e f4 | g4 d | gis4 f |
}
>>
@end lilypond