[ << Text ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Top ] | [ > ] |
Vocal music
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < Vocal music ] | [ Subir : Vocal music ] | [ > ] |
Añadir un ámbito por voz
Se puede añadir un ámbito por cada voz. En este caso, el ámbito se debe desplazar manualmente para evitar colisiones.
\new Staff << \new Voice \with { \consists "Ambitus_engraver" } \relative c'' { \override Ambitus.X-offset = #2.0 \voiceOne c4 a d e f1 } \new Voice \with { \consists "Ambitus_engraver" } \relative c' { \voiceTwo es4 f g as b1 } >>
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Añadir indicadoes a los pentagramas que se dividen después de un salto de línea
Este fragmento de código define las instrucciones
\splitStaffBarLine
, convUpStaffBarLine
y
convDownStaffBarLine
, que añaden flechas en las sobre una línea
divisoria, para denotar que cada una de las voces que comparten un
pentagrama continúan en su propio pentagrama en el siguiente sistema,
o que las voces así divididas se recombinan.
#(define-markup-command (arrow-at-angle layout props angle-deg length fill) (number? number? boolean?) (let* ( (PI-OVER-180 (/ (atan 1 1) 34)) (degrees->radians (lambda (degrees) (* degrees PI-OVER-180))) (angle-rad (degrees->radians angle-deg)) (target-x (* length (cos angle-rad))) (target-y (* length (sin angle-rad)))) (interpret-markup layout props (markup #:translate (cons (/ target-x 2) (/ target-y 2)) #:rotate angle-deg #:translate (cons (/ length -2) 0) #:concat (#:draw-line (cons length 0) #:arrow-head X RIGHT fill))))) splitStaffBarLineMarkup = \markup \with-dimensions #'(0 . 0) #'(0 . 0) { \combine \arrow-at-angle #45 #(sqrt 8) ##t \arrow-at-angle #-45 #(sqrt 8) ##t } splitStaffBarLine = { \once \override Staff.BarLine.stencil = #(lambda (grob) (ly:stencil-combine-at-edge (ly:bar-line::print grob) X RIGHT (grob-interpret-markup grob splitStaffBarLineMarkup) 0)) \break } convDownStaffBarLine = { \once \override Staff.BarLine.stencil = #(lambda (grob) (ly:stencil-combine-at-edge (ly:bar-line::print grob) X RIGHT (grob-interpret-markup grob #{ \markup\with-dimensions #'(0 . 0) #'(0 . 0) { \translate #'(0 . -.13)\arrow-at-angle #-45 #(sqrt 8) ##t }#}) 0)) \break } convUpStaffBarLine = { \once \override Staff.BarLine.stencil = #(lambda (grob) (ly:stencil-combine-at-edge (ly:bar-line::print grob) X RIGHT (grob-interpret-markup grob #{ \markup\with-dimensions #'(0 . 0) #'(0 . 0) { \translate #'(0 . .14)\arrow-at-angle #45 #(sqrt 8) ##t }#}) 0)) \break } \paper { ragged-right = ##t short-indent = 10\mm } separateSopranos = { \set Staff.instrumentName = "AI AII" \set Staff.shortInstrumentName = "AI AII" \splitStaffBarLine \change Staff = "up" } convSopranos = { \convDownStaffBarLine \change Staff = "shared" \set Staff.instrumentName = "S A" \set Staff.shortInstrumentName = "S A" } sI = { \voiceOne \repeat unfold 4 f''2 \separateSopranos \repeat unfold 4 g''2 \convSopranos \repeat unfold 4 c''2 } sII = { s1*2 \voiceTwo \change Staff = "up" \repeat unfold 4 d''2 } aI = { \voiceTwo \repeat unfold 4 a'2 \voiceOne \repeat unfold 4 b'2 \convUpStaffBarLine \voiceTwo \repeat unfold 4 g'2 } aII = { s1*2 \voiceTwo \repeat unfold 4 g'2 } ten = { \voiceOne \repeat unfold 4 c'2 \repeat unfold 4 d'2 \repeat unfold 4 c'2 } bas = { \voiceTwo \repeat unfold 4 f2 \repeat unfold 4 g2 \repeat unfold 4 c2 } \score { << \new ChoirStaff << \new Staff = up \with { instrumentName = "SI SII" shortInstrumentName = "SI SII" } { s1*4 } \new Staff = shared \with { instrumentName = "S A" shortInstrumentName = "S A" } << \new Voice = sopI \sI \new Voice = sopII \sII \new Voice = altI \aI \new Voice = altII \aII >> \new Lyrics \with { alignBelowContext = up } \lyricsto sopII { e f g h } \new Lyrics \lyricsto altI { a b c d e f g h i j k l } \new Staff = men \with { instrumentName = "T B" shortInstrumentName = "T B" } << \clef F \new Voice = ten \ten \new Voice = bas \bas >> \new Lyrics \lyricsto bas { a b c d e f g h i j k l } >> >> \layout { \context { \Staff \RemoveEmptyStaves \override VerticalAxisGroup.remove-first = ##t } } }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Añadir notas guía orquestales a una partitura vocal
Este ejemplo muestra una forma de simplificar la adición de muchas
notas guía orquestales a la reducción de piano en una partitura vocal.
La función musical \cueWhile
toma cuatro argumentos: la música
de la que se toma la cita, como viene definida por \addQuote
,
el nombre que insertar antes de las notas guía, y después #UP
o
#DOWN
para especificar \voiceOne
con el nombre encima
del pentagrama o bien \voiceTwo
con el nombre debajo del
pentagrama, y finalmente la música de piano con la que las notas guía
deben aparecer en paralelo. El nombre del instrumento citado se
posiciona a la izquierda de las notas guía. Se pueden citar muchos
pasajes como guía, pero no se pueden superponer en el tiempo entre
ellos.
cueWhile = #(define-music-function (instrument name dir music) (string? string? ly:dir? ly:music?) #{ \cueDuring $instrument #dir { \once \override TextScript.self-alignment-X = #RIGHT \once \override TextScript.direction = $dir <>-\markup { \tiny #name } $music } #}) flute = \relative c'' { \transposition c' s4 s4 e g } \addQuote "flute" { \flute } clarinet = \relative c' { \transposition bes fis4 d d c } \addQuote "clarinet" { \clarinet } singer = \relative c'' { c4. g8 g4 bes4 } words = \lyricmode { here's the lyr -- ics } pianoRH = \relative c'' { \transposition c' \cueWhile "clarinet" "Clar." #DOWN { c4. g8 } \cueWhile "flute" "Flute" #UP { g4 bes4 } } pianoLH = \relative c { c4 <c' e> e, <g c> } \score { << \new Staff { \new Voice = "singer" { \singer } } \new Lyrics { \lyricsto "singer" \words } \new PianoStaff << \new Staff { \new Voice { \pianoRH } } \new Staff { \clef "bass" \pianoLH } >> >> }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Ajuste del especiado vertical de la letra
Este fragmento de código muestra cómo situar la línea de base de la letra más cerca del pentagrama.
% Default layout: << \new Staff \new Voice = melody \relative c' { c4 d e f g4 f e d c1 } \new Lyrics \lyricsto melody { aa aa aa aa aa aa aa aa aa } \new Staff { \new Voice = melody \relative c' { c4 d e f g4 f e d c1 } } % Reducing the minimum space below the staff and above the lyrics: \new Lyrics \with { \override VerticalAxisGroup.nonstaff-relatedstaff-spacing = #'((basic-distance . 1)) } \lyricsto melody { aa aa aa aa aa aa aa aa aa } >>
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Alineación de sílabas con melisma
De forma predeterminada, las sílabas de la letra que comienzan un
melisma se alinean a la izquierda sobre su nota correspondiente. Se
puede alterar la alineación usando la propiedad
lyricMelismaAlignment
.
\score { << \new Staff { \relative c'' \new Voice = "vocal" { c d~^\markup default d e c d~^\markup "right aligned" d e c d~^\markup "center aligned" d e c d~^\markup "reset to default" d e } } \new Lyrics \lyricsto "vocal" { word word word \set lyricMelismaAlignment = #RIGHT word word word \set lyricMelismaAlignment = #CENTER word word word \unset lyricMelismaAlignment word word word } >> }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Indicaciones de tesitura
Las indicaciones de ámbito o tesitura indican rangos de alturas para las voces.
Las alteraciones accidentales sólo se muestran si no forman parte de
la armadura de tonalidad. Los objetos gráficos AmbitusNoteHead
también tienen líneas adicionales.
\layout { \context { \Voice \consists "Ambitus_engraver" } } << \new Staff { \relative c' { \time 2/4 c4 f' } } \new Staff { \relative c' { \time 2/4 \key d \major cis4 as' } } >>
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Ambitus after key signature
By default, ambitus are positioned at the left of the clef. The
\ambitusAfter
function allows for changing this
placement. Syntax is \ambitusAfter grob-interface
(see
Graphical Object Interfaces for a list of possible values for
grob-interface
.)
A common use case is printing the ambitus between key signature and time signature.
\new Staff \with { \consists Ambitus_engraver } \relative { \ambitusAfter key-signature \key d \major es'8 g bes cis d2 }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Ámbitos con varias voces
La adición del grabador Ambitus_engraver
al contexto de
Staff
crea un solo ámbito por pentagrama, incluso en el caso de
pentagramas con varias voces.
\new Staff \with { \consists "Ambitus_engraver" } << \new Voice \relative c'' { \voiceOne c4 a d e f1 } \new Voice \relative c' { \voiceTwo es4 f g as b1 } >>
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Plantilla para notación de música antigua (transcripción moderna de canto gregoriano)
Este ejemplo muestra cómo hacer una transcripción moderna de canto gregoriano. El canto gregoriano no tiene compás ni plicas; utiliza solamente cabezas de nota de blanca y de negra, y unas marcas especiales que indican silencios de distintas longitudes.
\include "gregorian.ly" chant = \relative c' { \set Score.timing = ##f f4 a2 \divisioMinima g4 b a2 f2 \divisioMaior g4( f) f( g) a2 \finalis } verba = \lyricmode { Lo -- rem ip -- sum do -- lor sit a -- met } \score { \new GregorianTranscriptionStaff << \new GregorianTranscriptionVoice = "melody" \chant \new GregorianTranscriptionLyrics = "one" \lyricsto melody \verba >> }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Plantilla de salmo del canto anglicano
Esta plantilla muestra una forma de preparar un cántico salmódico anglicano. También muestra cómo se pueden añadir estrofas adicionales como texto independiente por debajo de la música. Las dos estrofas se codifican en estilos diferentes para ilustrar más posibilidades.
SopranoMusic = \relative g' { g1 | c2 b | a1 | \bar "||" a1 | d2 c | c b | c1 | \bar "||" } AltoMusic = \relative c' { e1 | g2 g | f1 | f1 | f2 e | d d | e1 | } TenorMusic = \relative a { c1 | c2 c | c1 | d1 | g,2 g | g g | g1 | } BassMusic = \relative c { c1 | e2 e | f1 | d1 | b2 c | g' g | c,1 | } global = { \time 2/2 } dot = \markup { \raise #0.7 \musicglyph "dots.dot" } tick = \markup { \raise #1 \fontsize #-5 \musicglyph "scripts.rvarcomma" } % Use markup to center the chant on the page \markup { \fill-line { \score { % centered << \new ChoirStaff << \new Staff << \global \clef "treble" \new Voice = "Soprano" << \voiceOne \SopranoMusic >> \new Voice = "Alto" << \voiceTwo \AltoMusic >> >> \new Staff << \clef "bass" \global \new Voice = "Tenor" << \voiceOne \TenorMusic >> \new Voice = "Bass" << \voiceTwo \BassMusic >> >> >> >> \layout { \context { \Score \override SpacingSpanner.base-shortest-duration = #(ly:make-moment 1/2) } \context { \Staff \remove "Time_signature_engraver" } } } % End score } } % End markup \markup { \fill-line { \column { \left-align { \null \null \null \line { \fontsize #5 O \fontsize #3 come let us \bold sing | unto \dot the | Lord : let } \line { us heartily \concat { re \bold joice } in the | strength of | our } \line { sal | vation. } \null \line { \hspace #2.5 8. Today if ye will hear his voice * } \line { \concat { \bold hard en } \tick not your \tick hearts : as in the pro- } \line { vocation * and as in the \bold day of tempt- \tick } \line { -ation \tick in the \tick wilderness. } } } } }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Arranging separate lyrics on a single line
Sometimes you may want to put lyrics for different performers on a
single line: where there is rapidly alternating text, for
example. This snippet shows how this can be done with
\override VerticalAxisGroup.nonstaff-nonstaff-spacing.minimum-distance = ##f
.
\layout { \context { \Lyrics \override VerticalAxisGroup.nonstaff-nonstaff-spacing.minimum-distance = ##f } } aliceSings = \markup { \smallCaps "Alice" } eveSings = \markup { \smallCaps "Eve" } << \new Staff << \new Voice = "alice" { f'4^\aliceSings g' r2 | s1 | f'4^\aliceSings g' r2 | s1 | \break % ... \voiceOne s2 a'8^\aliceSings a' b'4 | \oneVoice g'1 } \new Voice = "eve" { s1 | a'2^\eveSings g' | s1 | a'2^\eveSings g' % ... \voiceTwo f'4^\eveSings a'8 g' f'4 e' | \oneVoice s1 } >> \new Lyrics \lyricsto "alice" { may -- be sec -- ond % ... Shut up, you fool! } \new Lyrics \lyricsto "eve" { that the words are % ... …and then I was like– } >>
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Modificar la tipografía para cada estrofa
Se pueden cambiar las fuentes tipográficas de forma independiente para cada estrofa, incuida la fuente que se usa para imprimir el número de estrofa.
%{ You may have to install additional fonts. Red Hat Fedora dejavu-fonts-all Debian GNU/Linux, Ubuntu fonts-dejavu-core fonts-dejavu-extra %} \relative c'' { \time 3/4 g2 e4 a2 f4 g2. } \addlyrics { \set stanza = #"1. " Hi, my name is Bert. } \addlyrics { \override StanzaNumber.font-name = #"DejaVu Sans" \set stanza = #"2. " \override LyricText.font-family = #'typewriter Oh, ché -- ri, je t'aime }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Notación de responsos o salmos
Este tipo de notación se utiliza para los cantos salmódicos, en que las estrofas no siempre tienen la misma longitud.
stemOff = \hide Staff.Stem stemOn = \undo \stemOff \score { \new Staff \with { \remove "Time_signature_engraver" } { \key g \minor \cadenzaOn \stemOff a'\breve bes'4 g'4 \stemOn a'2 \section \stemOff a'\breve g'4 a'4 \stemOn f'2 \section \stemOff a'\breve^\markup { \italic flexe } \stemOn g'2 \fine } }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Forzar la visibilidad de los guiones separadores de sílabas
Si LilyPond no cree que haya sitio suficiente para un guión separador
de sílabas, lo omitirá. Se puede sobreescribir este comportamiento
con la propiedad minimum-distance
de LyricHyphen
.
\relative c'' { c32 c c c c32 c c c c32 c c c c32 c c c } \addlyrics { syl -- lab word word \override LyricHyphen.minimum-distance = #1.0 syl -- lab word word \override LyricHyphen.minimum-distance = #2.0 syl -- lab word word \revert LyricHyphen.minimum-distance syl -- lab word word }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Dar formato a sílabas de la letra
Es posible usar el modo de marcado para dar formato a sílabas individuales dentro de la letra.
mel = \relative c'' { c4 c c c } lyr = \lyricmode { Lyrics \markup { \italic can } \markup { \with-color #red contain } \markup { \fontsize #8 \bold Markup! } } << \new Voice = melody \mel \new Lyrics \lyricsto melody \lyr >>
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Cómo poner ligaduras entre sílabas de la letra
Se puede hacer separando las sílabas mediante símbolos de tilde curva.
\lyrics { wa~o~a }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Plantilla para himnos
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 añadir los versos como texto independiente debajo de la música.
Timeline = { \time 4/4 \tempo 4=96 \partial 2 s2 | s1 | s2 \breathe s2 | s1 | s2 \caesura \break s2 | s1 | s2 \breathe s2 | s1 | s2 \fine } SopranoMusic = \relative g' { g4 g | g g g g | g g g g | g g g g | g2 g4 g | g g g g | g g g g | g g g g | g2 } AltoMusic = \relative c' { d4 d | d d d d | d d d d | d d d d | d2 d4 d | d d d d | d d d d | d d d d | d2 } TenorMusic = \relative a { b4 b | b b b b | b b b b | b b b b | b2 b4 b | b b b b | b b b b | b b b b | b2 } BassMusic = \relative g { g4 g | g g g g | g g g g | g g g g | g2 g4 g | g g g g | g g g g | g g g g | g2 } global = { \key g \major } \score { % Start score << \new PianoStaff << % Start pianostaff \new Staff << % Start Staff = RH \global \clef "treble" \new Voice = "Soprano" << % Start Voice = "Soprano" \Timeline \voiceOne \SopranoMusic >> % End Voice = "Soprano" \new Voice = "Alto" << % Start Voice = "Alto" \Timeline \voiceTwo \AltoMusic >> % End Voice = "Alto" >> % End Staff = RH \new Staff << % Start Staff = LH \global \clef "bass" \new Voice = "Tenor" << % Start Voice = "Tenor" \Timeline \voiceOne \TenorMusic >> % End Voice = "Tenor" \new Voice = "Bass" << % Start Voice = "Bass" \Timeline \voiceTwo \BassMusic >> % End Voice = "Bass" >> % End Staff = LH >> % End pianostaff >> } % End score \markup { \fill-line { "" { \column { \left-align { "This is line one of the first verse" "This is line two of the same" "And here's line three of the first verse" "And the last line of the same" } } } "" } } \layout { \context { \Score caesuraType = #'((bar-line . "||")) fineBarType = "||" } } \paper { % Start paper block indent = 0 % don't indent first system line-width = 130 % shorten line length to suit music } % End paper block
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Alineación de la letra
La alineación horizontal de la letra se puede ajustar sobreescribiendo
la propiedad self-alignment-X
del objeto LyricText
.
#-1
es izquierda, #0
es centrado y #1
es derecha;
sin embargo, podemos usar también #LEFT
, #CENTER
y
#RIGHT
.
\layout { ragged-right = ##f } \relative c'' { c1 c1 c1 } \addlyrics { \once \override LyricText.self-alignment-X = #LEFT "This is left-aligned" \once \override LyricText.self-alignment-X = #CENTER "This is centered" \once \override LyricText.self-alignment-X = #1 "This is right-aligned" }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Marking notes of spoken parts with a cross on the stem (Sprechstimme)
This example shows how to put crosses on stems. Mark the beginning of
a spoken section with the \speakOn
keyword, and end it with the
\speakOff
keyword.
speakOn = { \override Stem.stencil = #(lambda (grob) (let* ((x-parent (ly:grob-parent grob X)) (is-rest? (ly:grob? (ly:grob-object x-parent 'rest)))) (if is-rest? empty-stencil (ly:stencil-combine-at-edge (ly:stem::print grob) Y (- (ly:grob-property grob 'direction)) (grob-interpret-markup grob (markup #:center-align #:fontsize -4 #:musicglyph "noteheads.s2cross")) -2.3)))) } speakOff = { \revert Stem.stencil \revert Flag.stencil } \score { \new Staff { \relative c'' { a4 b a c \speakOn g4 f r g b4 r d e \speakOff c4 a g f } } }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Conseguir el espaciado de la letra de la versión 2.12
en versiones más recientes
El motor de espaciado vertical cambió en la versión 2.14. Esto puede
hacer que se altere el espaciado de la letra de las canciones. Es
posible fijar propiedades para los contextos Lyric
y
Staff
de forma que el motor de espaciado se comporte como lo
hacía en la versión 2.12.
global = { \key d \major \time 3/4 } sopMusic = \relative c' { % VERSE ONE fis4 fis fis | \break fis4. e8 e4 } altoMusic = \relative c' { % VERSE ONE d4 d d | d4. b8 b4 | } tenorMusic = \relative c' { a4 a a | b4. g8 g4 | } bassMusic = \relative c { d4 d d | g,4. g8 g4 | } words = \lyricmode { Great is Thy faith -- ful -- ness, } \score { \new ChoirStaff << \new Lyrics = sopranos \new Staff = women << \new Voice = "sopranos" { \voiceOne \global \sopMusic } \new Voice = "altos" { \voiceTwo \global \altoMusic } >> \new Lyrics = "altos" \new Lyrics = "tenors" \new Staff = men << \clef bass \new Voice = "tenors" { \voiceOne \global \tenorMusic } \new Voice = "basses" { \voiceTwo \global \bassMusic } >> \new Lyrics = basses \context Lyrics = sopranos \lyricsto sopranos \words \context Lyrics = altos \lyricsto altos \words \context Lyrics = tenors \lyricsto tenors \words \context Lyrics = basses \lyricsto basses \words >> \layout { \context { \Lyrics \override VerticalAxisGroup.staff-affinity = ##f \override VerticalAxisGroup.staff-staff-spacing = #'((basic-distance . 0) (minimum-distance . 2) (padding . 2)) } \context { \Staff \override VerticalAxisGroup.staff-staff-spacing = #'((basic-distance . 0) (minimum-distance . 2) (padding . 2)) } } }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Plantilla de orquesta con coro y piano
Esta plantilla muestra el uso de contextos StaffGroup
y
GrandStaff
anidados para sub-agrupar instrumentos del mismo
tipo, y una forma de usar \transpose
de manera que unas
variables contengan la música para instrumentos transpositores en
afinación de concierto.
#(set-global-staff-size 17) \paper { indent = 3.0\cm % add space for instrumentName short-indent = 1.5\cm % add less space for shortInstrumentName } fluteMusic = \relative c' { \key g \major g'1 b } % Pitches as written on a manuscript for Clarinet in A % are transposed to concert pitch. clarinetMusic = \transpose c' a \relative c'' { \key bes \major bes1 d } trumpetMusic = \relative c { \key g \major g''1 b } % Key signature is often omitted for horns hornMusic = \transpose c' f \relative c { d'1 fis } percussionMusic = \relative c { \key g \major g1 b } sopranoMusic = \relative c'' { \key g \major g'1 b } sopranoLyrics = \lyricmode { Lyr -- ics } altoIMusic = \relative c' { \key g \major g'1 b } altoIIMusic = \relative c' { \key g \major g'1 b } altoILyrics = \sopranoLyrics altoIILyrics = \lyricmode { Ah -- ah } tenorMusic = \relative c' { \clef "treble_8" \key g \major g1 b } tenorLyrics = \sopranoLyrics pianoRHMusic = \relative c { \key g \major g''1 b } pianoLHMusic = \relative c { \clef bass \key g \major g1 b } violinIMusic = \relative c' { \key g \major g'1 b } violinIIMusic = \relative c' { \key g \major g'1 b } violaMusic = \relative c { \clef alto \key g \major g'1 b } celloMusic = \relative c { \clef bass \key g \major g1 b } bassMusic = \relative c { \clef "bass_8" \key g \major g,1 b } \score { << \new StaffGroup = "StaffGroup_woodwinds" << \new Staff = "Staff_flute" \with { instrumentName = "Flute" } \fluteMusic \new Staff = "Staff_clarinet" \with { instrumentName = \markup { \concat { "Clarinet in B" \flat } } } % Declare that written Middle C in the music % to follow sounds a concert B flat, for % output using sounded pitches such as MIDI. %\transposition bes % Print music for a B-flat clarinet \transpose bes c' \clarinetMusic >> \new StaffGroup = "StaffGroup_brass" << \new Staff = "Staff_hornI" \with { instrumentName = "Horn in F" } % \transposition f \transpose f c' \hornMusic \new Staff = "Staff_trumpet" \with { instrumentName = "Trumpet in C" } \trumpetMusic >> \new RhythmicStaff = "RhythmicStaff_percussion" \with { instrumentName = "Percussion" } << \percussionMusic >> \new PianoStaff \with { instrumentName = "Piano" } << \new Staff { \pianoRHMusic } \new Staff { \pianoLHMusic } >> \new ChoirStaff = "ChoirStaff_choir" << \new Staff = "Staff_soprano" \with { instrumentName = "Soprano" } \new Voice = "soprano" \sopranoMusic \new Lyrics \lyricsto "soprano" { \sopranoLyrics } \new GrandStaff = "GrandStaff_altos" \with { \accepts Lyrics } << \new Staff = "Staff_altoI" \with { instrumentName = "Alto I" } \new Voice = "altoI" \altoIMusic \new Lyrics \lyricsto "altoI" { \altoILyrics } \new Staff = "Staff_altoII" \with { instrumentName = "Alto II" } \new Voice = "altoII" \altoIIMusic \new Lyrics \lyricsto "altoII" { \altoIILyrics } >> \new Staff = "Staff_tenor" \with { instrumentName = "Tenor" } \new Voice = "tenor" \tenorMusic \new Lyrics \lyricsto "tenor" { \tenorLyrics } >> \new StaffGroup = "StaffGroup_strings" << \new GrandStaff = "GrandStaff_violins" << \new Staff = "Staff_violinI" \with { instrumentName = "Violin I" } \violinIMusic \new Staff = "Staff_violinII" \with { instrumentName = "Violin II" } \violinIIMusic >> \new Staff = "Staff_viola" \with { instrumentName = "Viola" } \violaMusic \new Staff = "Staff_cello" \with { instrumentName = "Cello" } \celloMusic \new Staff = "Staff_bass" \with { instrumentName = "Double Bass" } \bassMusic >> >> \layout { } }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Plantilla de piano con melodía y letra
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.
melody = \relative c'' { \clef treble \key c \major \time 4/4 a b c d } text = \lyricmode { Aaa Bee Cee Dee } upper = \relative c'' { \clef treble \key c \major \time 4/4 a4 b c d } lower = \relative c { \clef bass \key c \major \time 4/4 a2 c } \score { << \new Voice = "mel" { \autoBeamOff \melody } \new Lyrics \lyricsto mel \text \new PianoStaff << \new Staff = "upper" \upper \new Staff = "lower" \lower >> >> \layout { \context { \Staff \RemoveEmptyStaves } } \midi { } }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Putting lyrics inside the staff
Se pueden mover las líneas de letra verticalmente para imprimirlas
dentro del pentagrama. Las letras se mueven con \override
LyricText.extra-offset = #'(0 . dy)
y hay instrucciones similares
para mover las líneas extensoras y los guiones. El desplazamiento
necesario se establece mediante un proceso de ensayo y error.
<< \new Staff << \new Voice = "voc" \relative c' { \stemDown a bes c8 b c4 } >> \new Lyrics \with { \override LyricText.extra-offset = #'(0 . 8.6) \override LyricExtender.extra-offset = #'(0 . 8.6) \override LyricHyphen.extra-offset = #'(0 . 8.6) } \lyricsto "voc" { La la -- la __ _ la } >>
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Plantilla de coro SATB, a cuatro pentagramas
Plantilla de coro SATB (en cuatro pentagramas)
global = { \key c \major \time 4/4 \dynamicUp } sopranonotes = \relative c'' { c2 \p \< d c d \f } sopranowords = \lyricmode { do do do do } altonotes = \relative c'' { c2\p d c d } altowords = \lyricmode { re re re re } tenornotes = { \clef "G_8" c2\mp d c d } tenorwords = \lyricmode { mi mi mi mi } bassnotes = { \clef bass c2\mf d c d } basswords = \lyricmode { mi mi mi mi } \score { \new ChoirStaff << \new Staff << \new Voice = "soprano" << \global \sopranonotes >> \new Lyrics \lyricsto "soprano" \sopranowords >> \new Staff << \new Voice = "alto" << \global \altonotes >> \new Lyrics \lyricsto "alto" \altowords >> \new Staff << \new Voice = "tenor" << \global \tenornotes >> \new Lyrics \lyricsto "tenor" \tenorwords >> \new Staff << \new Voice = "bass" << \global \bassnotes >> \new Lyrics \lyricsto "bass" \basswords >> >> }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Plantilla de pentagrama único con música, letra y acordes
Esta plantilla facilita la preparación de una canción con melodía, letra y acordes.
melody = \relative c' { \clef treble \key c \major \time 4/4 a4 b c d } text = \lyricmode { Aaa Bee Cee Dee } harmonies = \chordmode { a2 c } \score { << \new ChordNames { \set chordChanges = ##t \harmonies } \new Voice = "one" { \autoBeamOff \melody } \new Lyrics \lyricsto "one" \text >> \layout { } \midi { } }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Plantilla para un pentagrama único con música, letra, acordes y trastes
Presentamos a continuación un ejemplo de plantilla para una hoja guía de acordes con melodía, letra, acordes y diagramas de trastes.
verseI = \lyricmode { \set stanza = #"1." This is the first verse } verseII = \lyricmode { \set stanza = #"2." This is the second verse. } theChords = \chordmode { % insert chords for chordnames and fretboards here c2 g4 c } staffMelody = \relative c' { \key c \major \clef treble % Type notes for melody here c4 d8 e f4 g \bar "|." } \score { << \context ChordNames { \theChords } \context FretBoards { \theChords } \new Staff { \context Voice = "voiceMelody" { \staffMelody } } \new Lyrics = "lyricsI" { \lyricsto "voiceMelody" \verseI } \new Lyrics = "lyricsII" { \lyricsto "voiceMelody" \verseII } >> \layout { } \midi { } }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Plantilla de pentagrama único don notas y letra
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 el barrado automático, que es lo más frecuente en las partes vocales antiguas. Para usar el barrado automático modifique o marque como un comentario la línea correspondiente.
melody = \relative c' { \clef treble \key c \major \time 4/4 a4 b c d } text = \lyricmode { Aaa Bee Cee Dee } \score{ << \new Voice = "one" { \autoBeamOff \melody } \new Lyrics \lyricsto "one" \text >> \layout { } \midi { } }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Silencios de separación en modo de letra
La sintaxis s
para los silencios de desplazamiento solamente
está disponible en los modos de nota y de acorde. En otras
situaciones, por ejemplo al escribir la letra de las canciones, se
recomienda usar la instrucción \skip
.
<< \relative c'' { a1 | a } \new Lyrics \lyricmode { \skip 1 bla1 } >>
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Silencios de separación en modo de letra (2)
Aunque no se pueden usar los silencios de separación s
dentro
de \lyricmode
(se toman como una “s”, literal, no como un
espacio), sí están disponibles las comillas dobles (""
) y el
carácter subrayado (_
). Así por ejemplo:
<< \relative c'' { a4 b c d } \new Lyrics \lyricmode { a4 "" _ gap } >>
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Uso de arpeggioBracket para hacer más visible un divisi
El corchete de arpegios arpeggioBracket
se puede usar para
indicar la división de voces cuando no hay plicas que puedan ofrecer
esta información. Se suele encontrar en la música coral.
\include "english.ly" \score { \relative c'' { \key a \major \time 2/2 << \new Voice = "upper" << { \voiceOne \arpeggioBracket a2( b2 <b d>1\arpeggio) <cs e>\arpeggio ~ <cs e>4 } \addlyrics { \lyricmode { A -- men. } } >> \new Voice = "lower" { \voiceTwo a1 ~ a a ~ a4 \bar "|." } >> } \layout { ragged-right = ##t } }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Using tags to produce mensural and modern music from the same source
Using tags, it is possible to produce both mensural and modern
notation from the same music. In this snippet, a function
menrest
is introduced, allowing mensural rests to be pitched as
in the original, but with modern rests in the standard staff position.
Tags can also be used where other differences are needed: for example
using “whole measure rests” (R1
, R\breve
, etc.) in
modern music, but normal rests (r1
, r\breve
, etc.) in
the mensural version. Converting mensural music to its modern
equivalent is usually referred to as “transcription”.
menrest = #(define-music-function (note) (ly:music?) #{ \tag #'mens $(make-music 'RestEvent note) \tag #'mod $(make-music 'RestEvent note 'pitch '()) #}) MenStyle = { \autoBeamOff \override NoteHead.style = #'petrucci \override Score.BarNumber.transparent = ##t \override Stem.neutral-direction = #up } finalis = \section Music = \relative c'' { \set Score.tempoHideNote = ##t \key f \major \time 4/4 g1 d'2 \menrest bes4 bes2 a2 r4 g4 fis2. \finalis } MenLyr = \lyricmode { So farre, deere life, deare life } ModLyr = \lyricmode { So far, dear life, dear life } \score { \keepWithTag #'mens { << \new MensuralStaff { \new MensuralVoice = Cantus \clef "mensural-c1" \MenStyle \Music } \new Lyrics \lyricsto Cantus \MenLyr >> } } \score { \keepWithTag #'mod { \new ChoirStaff << \new Staff { \new Voice = Sop \with { \remove "Note_heads_engraver" \consists "Completion_heads_engraver" \remove "Rest_engraver" \consists "Completion_rest_engraver" } { \shiftDurations #1 #0 { \autoBeamOff \Music } } } \new Lyrics \lyricsto Sop \ModLyr >> } }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Alineación vertical de la letra y los compases de ossia
Este fragmento de código muestra el uso de las propiedades de
contexto alignBelowContext
y alignAboveContext
para
controlar la posición de la letra y los compases de ossia.
\paper { ragged-right = ##t } \relative c' << \new Staff = "1" { c4 c s2 } \new Staff = "2" { c4 c s2 } \new Staff = "3" { c4 c s2 } { \skip 2 << \lyrics { \set alignBelowContext = #"1" lyrics4 below } \new Staff \with { alignAboveContext = #"3" fontSize = #-2 \override StaffSymbol.staff-space = #(magstep -2) \remove "Time_signature_engraver" } { \tuplet 6/4 { \override TextScript.padding = #3 c8[^"ossia above" d e d e f] } } >> } >>
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Letra común centrada verticalmente
En una pieza vocal en la que hay varias líneas de letra (dos, cuatro o más) y hay letras comunes a todas las voces en algún punto, se puede hacer que las letras comunes se centren verticalmente como se muestra en el siguiente ejemplo:
dropLyrics = { \override LyricText.extra-offset = #'(0 . -4.5) \override LyricHyphen.extra-offset = #'(0 . -4.5) \override LyricExtender.extra-offset = #'(0 . -4.5) \override StanzaNumber.extra-offset = #'(0 . -4.5) } raiseLyrics = { \revert LyricText.extra-offset \revert LyricHyphen.extra-offset \revert LyricExtender.extra-offset \revert StanzaNumber.extra-offset } skipFour = \repeat unfold 4 { \skip 8 } lyricsA = \lyricmode { The first verse has \dropLyrics \set stanza = #" All:" the com -- mon __ words \raiseLyrics used in all four. } lyricsB = \lyricmode { In stan -- za two, \skipFour al -- so ap -- pear. } lyricsC = \lyricmode { By the third verse, \skipFour are get -- ting dull. } lyricsD = \lyricmode { Last stan -- za, and \skipFour get used once more. } melody = \relative c' { c4 d e f | g f e8( e f) d | c4 e d c | } \score { << \new Voice = m \melody \new Lyrics \lyricsto m \lyricsA \new Lyrics \lyricsto m \lyricsB \new Lyrics \lyricsto m \lyricsC \new Lyrics \lyricsto m \lyricsD >> }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Plantilla de conjunto vocal
He aquí una partitura vocal estándar para cuatro voces SATB. Con grupos mayores, suele ser útil incluir una sección que aparezca en todas las partes. Por ejemplo, el compás y la armadura casi siempre son los mismos para todas. Como en la plantilla “Himno”, las cuatro voces se reagrupan en sólo dos pentagramas.
\paper { top-system-spacing.basic-distance = #10 score-system-spacing.basic-distance = #20 system-system-spacing.basic-distance = #20 last-bottom-spacing.basic-distance = #10 } global = { \key c \major \time 4/4 } sopMusic = \relative { c''4 c c8[( b)] c4 } sopWords = \lyricmode { hi hi hi hi } altoMusic = \relative { e'4 f d e } altoWords = \lyricmode { ha ha ha ha } tenorMusic = \relative { g4 a f g } tenorWords = \lyricmode { hu hu hu hu } bassMusic = \relative { c4 c g c } bassWords = \lyricmode { ho ho ho ho } \score { \new ChoirStaff << \new Lyrics = "sopranos" \with { % this is needed for lyrics above a staff \override VerticalAxisGroup.staff-affinity = #DOWN } \new Staff = "women" << \new Voice = "sopranos" { \voiceOne << \global \sopMusic >> } \new Voice = "altos" { \voiceTwo << \global \altoMusic >> } >> \new Lyrics = "altos" \new Lyrics = "tenors" \with { % this is needed for lyrics above a staff \override VerticalAxisGroup.staff-affinity = #DOWN } \new Staff = "men" << \clef bass \new Voice = "tenors" { \voiceOne << \global \tenorMusic >> } \new Voice = "basses" { \voiceTwo << \global \bassMusic >> } >> \new Lyrics = "basses" \context Lyrics = "sopranos" \lyricsto "sopranos" \sopWords \context Lyrics = "altos" \lyricsto "altos" \altoWords \context Lyrics = "tenors" \lyricsto "tenors" \tenorWords \context Lyrics = "basses" \lyricsto "basses" \bassWords >> }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Plantilla de conjunto vocal con reducción de piano automática
Esta plantilla añade una reducción de piano automática a la partitura
vocal SATB estándar que se mostró en la “Plantilla de conjunto
vocal”. Esto presenta uno de los puntos fuertes de LilyPond: podemos
usar una definición de música más de una vez. Si se hace cualquier
cambio en las notas de la parte vocal (digamos tenorMusic
),
entonces los cambios se aplicarán también a la reducción de piano.
\paper { top-system-spacing.basic-distance = #10 score-system-spacing.basic-distance = #20 system-system-spacing.basic-distance = #20 last-bottom-spacing.basic-distance = #10 } global = { \key c \major \time 4/4 } sopMusic = \relative { c''4 c c8[( b)] c4 } sopWords = \lyricmode { hi hi hi hi } altoMusic = \relative { e'4 f d e } altoWords =\lyricmode { ha ha ha ha } tenorMusic = \relative { g4 a f g } tenorWords = \lyricmode { hu hu hu hu } bassMusic = \relative { c4 c g c } bassWords = \lyricmode { ho ho ho ho } \score { << \new ChoirStaff << \new Lyrics = "sopranos" \with { % This is needed for lyrics above a staff \override VerticalAxisGroup.staff-affinity = #DOWN } \new Staff = "women" << \new Voice = "sopranos" { \voiceOne << \global \sopMusic >> } \new Voice = "altos" { \voiceTwo << \global \altoMusic >> } >> \new Lyrics = "altos" \new Lyrics = "tenors" \with { % This is needed for lyrics above a staff \override VerticalAxisGroup.staff-affinity = #DOWN } \new Staff = "men" << \clef bass \new Voice = "tenors" { \voiceOne << \global \tenorMusic >> } \new Voice = "basses" { \voiceTwo << \global \bassMusic >> } >> \new Lyrics = "basses" \context Lyrics = "sopranos" \lyricsto "sopranos" \sopWords \context Lyrics = "altos" \lyricsto "altos" \altoWords \context Lyrics = "tenors" \lyricsto "tenors" \tenorWords \context Lyrics = "basses" \lyricsto "basses" \bassWords >> \new PianoStaff << \new Staff << \set Staff.printPartCombineTexts = ##f \partCombine << \global \sopMusic >> << \global \altoMusic >> >> \new Staff << \clef bass \set Staff.printPartCombineTexts = ##f \partCombine << \global \tenorMusic >> << \global \bassMusic >> >> >> >> }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ > ] |
Plantilla para conjunto vocal con letras alineadas encima y debajo de los pentagramas
Esta plantilla es, básicamente, la misma que la sencilla plantilla
“Conjunto vocal”, excepto que aquí todas las líneas de letra se
colocan utilizando alignAboveContext
y
alignBelowContext
.
global = { \key c \major \time 4/4 } sopMusic = \relative c'' { c4 c c8[( b)] c4 } sopWords = \lyricmode { hi hi hi hi } altoMusic = \relative c' { e4 f d e } altoWords = \lyricmode { ha ha ha ha } tenorMusic = \relative c' { g4 a f g } tenorWords = \lyricmode { hu hu hu hu } bassMusic = \relative c { c4 c g c } bassWords = \lyricmode { ho ho ho ho } \score { \new ChoirStaff << \new Staff = "women" << \new Voice = "sopranos" { \voiceOne << \global \sopMusic >> } \new Voice = "altos" { \voiceTwo << \global \altoMusic >> } >> \new Lyrics \with { alignAboveContext = #"women" } \lyricsto "sopranos" \sopWords \new Lyrics \with { alignBelowContext = #"women" } \lyricsto "altos" \altoWords % we could remove the line about this with the line below, since % we want the alto lyrics to be below the alto Voice anyway. % \new Lyrics \lyricsto "altos" \altoWords \new Staff = "men" << \clef bass \new Voice = "tenors" { \voiceOne << \global \tenorMusic >> } \new Voice = "basses" { \voiceTwo << \global \bassMusic >> } >> \new Lyrics \with { alignAboveContext = #"men" } \lyricsto "tenors" \tenorWords \new Lyrics \with { alignBelowContext = #"men" } \lyricsto "basses" \bassWords % again, we could replace the line above this with the line below. % \new Lyrics \lyricsto "basses" \bassWords >> }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ Chords > ] |
Estrofa para solista y estribillo a dos voces
Esta plantilla crea una partitura que comienza con una estrofa para
solista y continúa con un estribillo a dos voces. también muestra el
uso de silencios de separación dentro de la variable \global
para definir cambios de compás (y otros elementos que son comunes a
todas las partes) a lo largo de toda la partitura.
global = { \key g \major % verse \time 3/4 s2.*2 \break % refrain \time 2/4 s2*2 \bar "|." } SoloNotes = \relative g' { \clef "treble" % verse g4 g g | b4 b b | % refrain R2*2 | } SoloLyrics = \lyricmode { One two three | four five six | } SopranoNotes = \relative c'' { \clef "treble" % verse R2.*2 | % refrain c4 c | g4 g | } SopranoLyrics = \lyricmode { la la | la la | } BassNotes = \relative c { \clef "bass" % verse R2.*2 | % refrain c4 e | d4 d | } BassLyrics = \lyricmode { dum dum | dum dum | } \score { << \new Voice = "SoloVoice" << \global \SoloNotes >> \new Lyrics \lyricsto "SoloVoice" \SoloLyrics \new ChoirStaff << \new Voice = "SopranoVoice" << \global \SopranoNotes >> \new Lyrics \lyricsto "SopranoVoice" \SopranoLyrics \new Voice = "BassVoice" << \global \BassNotes >> \new Lyrics \lyricsto "BassVoice" \BassLyrics >> >> \layout { ragged-right = ##t \context { \Staff % these lines prevent empty staves from being printed \RemoveEmptyStaves \override VerticalAxisGroup.remove-first = ##t } } }
[ << Vocal music ] | [Arriba][Índice general] | [ Chords >> ] |
[ < ] | [ Subir : Vocal music ] | [ Chords > ] |