[ << Chords ] | [Arriba][Índice general] | [ Percussion >> ] |
[ < ] | [ Subir : Top ] | [ > ] |
Keyboards
Keyboard and other multi-staff instruments
[ << Keyboards ] | [Arriba][Índice general] | [ Percussion >> ] |
[ < Keyboards ] | [ Subir : Keyboards ] | [ > ] |
Símbolos de acordeón discanto
Este fragmento de código ha quedado obsoleto por las instrucciones de
marcado predefinidas, véase ‘Símbolos de discanto’ en la Referencia
de la notación. Sin embargo aún es útil como demostración sencilla de
la forma de combinar símbolos: la colocación de los símbolos añadidos
con \markup
se puede trucar modificando los argumentos de
\translate-scaled
. Aquí se usa \translate-scaled
en
lugar de \translate
para que el posicionamiento de las partes
de símbolos se adapte a los cambios en font-size
.
discant = \markup { \musicglyph "accordion.discant" } dot = \markup { \musicglyph "accordion.dot" } \layout { ragged-right = ##t } % 16 voets register accBasson = ^\markup { \combine \discant \translate-scaled #'(0 . 0.5) \dot } % een korig 8 en 16 voets register accBandon = ^\markup { \combine \discant \combine \translate-scaled #'(0 . 0.5) \dot \translate-scaled #'(0 . 1.5) \dot } accVCello = ^\markup { \combine \discant \combine \translate-scaled #'(0 . 0.5) \dot \combine \translate-scaled #'(0 . 1.5) \dot \translate-scaled #'(1 . 1.5) \dot } % 4-8-16 voets register accHarmon = ^\markup { \combine \discant \combine \translate-scaled #'(0 . 0.5) \dot \combine \translate-scaled #'(0 . 1.5) \dot \translate-scaled #'(0 . 2.5) \dot } accTrombon = ^\markup { \combine \discant \combine \translate-scaled #'(0 . 0.5) \dot \combine \translate-scaled #'(0 . 1.5) \dot \combine \translate-scaled #'(1 . 1.5) \dot \translate-scaled #'(-1 . 1.5) \dot } % eenkorig 4 en 16 voets register accOrgan = ^\markup { \combine \discant \combine \translate-scaled #'(0 . 0.5) \dot \translate-scaled #'(0 . 2.5) \dot } accMaster = ^\markup { \combine \discant \combine \translate-scaled #'(0 . 0.5) \dot \combine \translate-scaled #'(0 . 1.5) \dot \combine \translate-scaled #'(1 . 1.5) \dot \combine \translate-scaled #'(-1 . 1.5) \dot \translate-scaled #'(0 . 2.5) \dot } accAccord = ^\markup { \combine \discant \combine \translate-scaled #'(0 . 1.5) \dot \combine \translate-scaled #'(1 . 1.5) \dot \combine \translate-scaled #'(-1 . 1.5) \dot \translate-scaled #'(0 . 2.5) \dot } accMusette = ^\markup { \combine \discant \combine \translate-scaled #'(0 . 1.5) \dot \combine \translate-scaled #'(1 . 1.5) \dot \translate-scaled #'(-1 . 1.5) \dot } accCeleste = ^\markup { \combine \discant \combine \translate-scaled #'(0 . 1.5) \dot \translate-scaled #'(-1 . 1.5) \dot } accOboe = ^\markup { \combine \discant \combine \translate-scaled #'(0 . 1.5) \dot \translate-scaled #'(0 . 2.5) \dot } accClarin = ^\markup { \combine \discant \translate-scaled #'(0 . 1.5) \dot } accPiccolo = ^\markup { \combine \discant \translate-scaled #'(0 . 2.5) \dot } accViolin = ^\markup { \combine \discant \combine \translate-scaled #'(0 . 1.5) \dot \combine \translate-scaled #'(1 . 1.5) \dot \translate-scaled #'(0 . 2.5) \dot } \relative c'' { c4 d\accBasson e f c4 d\accBandon e f c4 d\accVCello e f c4 d\accHarmon e f c4 d\accTrombon e f \break c4 d\accOrgan e f c4 d\accMaster e f c4 d\accAccord e f c4 d\accMusette e f c4 d\accCeleste e f \break c4 d\accOboe e f c4 d\accClarin e f c4 d\accPiccolo e f c4 d\accViolin e f }
[ << Keyboards ] | [Arriba][Índice general] | [ Percussion >> ] |
[ < ] | [ Subir : Keyboards ] | [ > ] |
Accordion register symbols
Accordion register symbols are available as \markup
as well as
as standalone music events (as register changes tend to occur between
actual music events). Bass registers are not overly standardized. The
available commands can be found in ’Discant symbols’ in the Notation
Reference.
#(use-modules (lily accreg)) \new PianoStaff << \new Staff \relative { \clef treble \discant "10" r8 s32 f'[ bes f] s e[ a e] s d[ g d] s16 e32[ a] << { r16 <f bes> r <e a> r <d g> } \\ { d r a r bes r } >> | <cis e a>1 } \new Staff \relative { \clef treble \freeBass "1" r8 d'32 s16. c32 s16. bes32 s16. a32[ cis] s16 \clef bass \stdBass "Master" << { r16 <f, bes d>^"b" r <e a c>^"am" r <d g bes>^"gm" | <e a cis>1^"a" } \\ { d8_"D" c_"C" bes_"B" | a1_"A" } >> } >>
[ << Keyboards ] | [Arriba][Índice general] | [ Percussion >> ] |
[ < ] | [ Subir : Keyboards ] | [ > ] |
Modificar el texto de las indicaciones de pedal
Se puede usar Staff.pedalSustainStrings
para fijar el texto de
las indicaciones de pisar pedal y levantar pedal. Observe que las
únicas cadenas válidas son las que están en la lista de glifos de
pedal: los valores que aparecen en este fragmento de código son una
relación exhaustiva.
sustainNotes = { c4\sustainOn d e\sustainOff\sustainOn f\sustainOff } \relative c' { \sustainNotes \set Staff.pedalSustainStrings = #'("P" "P-" "-") \sustainNotes \set Staff.pedalSustainStrings = #'("d" "de" "e") \sustainNotes \set Staff.pedalSustainStrings = #'("M" "M-" "-") \sustainNotes \set Staff.pedalSustainStrings = #'("Ped" "*Ped" "*") \sustainNotes }
[ << Keyboards ] | [Arriba][Índice general] | [ Percussion >> ] |
[ < ] | [ Subir : Keyboards ] | [ > ] |
Clusters («racimos»)
Los «clusters» o racimos son un mecanismo para indicar la interpretación de un ámbito de notas al mismo tiempo.
fragment = \relative c' { c4 f <e d'>4 <g a>8 <e a> a4 c2 <d b>4 e2 c } << \new Staff \fragment \new Staff \makeClusters \fragment >>
[ << Keyboards ] | [Arriba][Índice general] | [ Percussion >> ] |
[ < ] | [ Subir : Keyboards ] | [ > ] |
Controlar la colocación de las digitaciones de acordes
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 digitaciones, se debe utilizar dentro de una construcción de acorde <> aunque sea una sola nota. Se puede establecer la orientación para los números de cuerda y las digitaciones de la mano derecha de una forma similar.
\relative c' { \set fingeringOrientations = #'(left) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(down) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(down right up) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(up) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(left) <c-1>2 \set fingeringOrientations = #'(down) <e-3>2 \set stringNumberOrientations = #'(up left down) <f\3 a\2 c\1>1 \set strokeFingerOrientations = #'(down right up) <c\rightHandFinger #1 e\rightHandFinger #2 c'\rightHandFinger #4 > }
[ << Keyboards ] | [Arriba][Índice general] | [ Percussion >> ] |
[ < ] | [ Subir : Keyboards ] | [ > ] |
Hacer ligaduras entre voces distintas
En determinadas situaciones es necesario crear ligaduras de expresión entre notas que están en voces distintas.
La solución es añadir notas invisibles a una de las voces
utilizando \hideNotes
.
Este ejemplo es el compás 235 de la Chacona de la segunda Partita para violín solo, BWV 1004, de Bach.
\relative c' { << { d16( a') s a s a[ s a] s a[ s a] } \\ { \slurUp bes,16[ s e]( \hideNotes a) \unHideNotes f[( \hideNotes a) \unHideNotes fis]( \hideNotes a) \unHideNotes g[( \hideNotes a) \unHideNotes gis]( \hideNotes a) } >> }
[ << Keyboards ] | [Arriba][Índice general] | [ Percussion >> ] |
[ < ] | [ Subir : Keyboards ] | [ > ] |
Cross-staff chords - beaming problems workaround
Sometimes it is better to use stems from the upper staff for creating
cross-staff chords, because no problems with automatic beam collision
avoidance then arise. If the stems from the lower staff were used in
the following example, it would be necessary to change the automatic
beam collision avoidance settings so that it doesn’t detect collisions
between staves using
\override Staff.Beam.collision-voice-only = ##t
\new PianoStaff << \new Staff = up \relative c' { << { r4 \override Stem.cross-staff = ##t \override Stem.length = #19 % this is in half-spaces, % so it makes stems 9.5 staffspaces long \override Stem.Y-offset = #-6 % stems are normally lengthened % upwards, so here we must lower the stem by the amount % equal to the lengthening - in this case (19 - 7) / 2 % (7 is default stem length) e e e } { s4 \change Staff = "bottom" \override NoteColumn.ignore-collision = ##t c, c c } >> } \new Staff = bottom \relative c' { \clef bass \voiceOne g8 a g a g a g a } >>
[ << Keyboards ] | [Arriba][Índice general] | [ Percussion >> ] |
[ < ] | [ Subir : Keyboards ] | [ > ] |
Trémolos de pentagrama cruzado
Dado que \repeat tremolo
espera exactamente dos argumentos
musicales para los trémolos de acorde, la nota o acorde que cambia de
pentagrama en un trémolo que cruza el pentagrama se debe colocar
dentro de llaves curvas junto a su instrucción \change Staff
.
\new PianoStaff << \new Staff = "up" \relative c'' { \key a \major \time 3/8 s4. } \new Staff = "down" \relative c'' { \key a \major \time 3/8 \voiceOne \repeat tremolo 6 { <a e'>32 { \change Staff = "up" \voiceTwo <cis a' dis>32 } } } >>
[ << Keyboards ] | [Arriba][Índice general] | [ Percussion >> ] |
[ < ] | [ Subir : Keyboards ] | [ > ] |
Ajuste fino de las líneas de pedal
Se puede alterar el aspecto de las líneas de pedal de varias formas.
\paper { ragged-right = ##f } \relative c'' { c2\sostenutoOn c c2\sostenutoOff c \once \override Staff.PianoPedalBracket.shorten-pair = #'(-7 . -2) c2\sostenutoOn c c2\sostenutoOff c \once \override Staff.PianoPedalBracket.edge-height = #'(0 . 3) c2\sostenutoOn c c2\sostenutoOff c }
[ << Keyboards ] | [Arriba][Índice general] | [ Percussion >> ] |
[ < ] | [ Subir : Keyboards ] | [ > ] |
Indicar acordes de pentagrama cruzado con corchetes de arpegio
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,
el PianoStaff
se debe configurar para que acepte símbolos de
arpegio de pentagrama cruzado y los símbolos de arpegio se deben
configurar a la forma de corchete en el contexto de PianoStaff
.
(Debussy, Les collines d’Anacapri, m. 65)
\new PianoStaff << \set PianoStaff.connectArpeggios = ##t \override PianoStaff.Arpeggio.stencil = #ly:arpeggio::brew-chord-bracket \new Staff { \relative c' { \key b \major \time 6/8 b8-.(\arpeggio fis'-.\> cis-. e-. gis-. b-.)\!\fermata^\laissezVibrer \bar "||" } } \new Staff { \relative c' { \clef bass \key b \major << { <a e cis>2.\arpeggio } \\ { <a, e a,>2. } >> } } >>
[ << Keyboards ] | [Arriba][Índice general] | [ Percussion >> ] |
[ < ] | [ Subir : Keyboards ] | [ > ] |
Plantilla para combo de jazz
Ésta es una plantilla bastante avanzada, para un conjunto de
jazz. Observe que la notación de todos los instrumentos está en
\key c \major
(Do mayor). Esto se refiere al tono de
concierto; la armadura se transporta automáticamente si la música está
dentro de una sección \transpose
.
\header { title = "Song" subtitle = "(tune)" composer = "Me" meter = "moderato" piece = "Swing" tagline = \markup { \column { "LilyPond example file by Amelie Zapf," "Berlin 07/07/2003" } } } % To make the example display in the documentation \paper { paper-width = 130 } %#(set-global-staff-size 16) \include "english.ly" %%%%%%%%%%%% Some macros %%%%%%%%%%%%%%%%%%% sl = { \override NoteHead.style = #'slash \hide Stem } nsl = { \revert NoteHead.style \undo \hide Stem } crOn = \override NoteHead.style = #'cross crOff = \revert NoteHead.style %% insert chord name style stuff here. jazzChords = { } %%%%%%%%%%%% Keys'n'thangs %%%%%%%%%%%%%%%%% global = { \time 4/4 } Key = { \key c \major } % ############ Horns ############ % ------ Trumpet ------ trpt = \transpose c d \relative c'' { \Key c1 | c | c | } trpHarmony = \transpose c' d { \jazzChords } trumpet = { \global \clef treble << \trpt >> } % ------ Alto Saxophone ------ alto = \transpose c a \relative c' { \Key c1 | c | c | } altoHarmony = \transpose c' a { \jazzChords } altoSax = { \global \clef treble << \alto >> } % ------ Baritone Saxophone ------ bari = \transpose c a' \relative c { \Key c1 c1 \sl d4^"Solo" d d d \nsl } bariHarmony = \transpose c' a \chordmode { \jazzChords s1 s d2:maj e:m7 } bariSax = { \global \clef treble << \bari >> } % ------ Trombone ------ tbone = \relative c { \Key c1 | c | c } tboneHarmony = \chordmode { \jazzChords } trombone = { \global \clef bass << \tbone >> } % ############ Rhythm Section ############# % ------ Guitar ------ gtr = \relative c'' { \Key c1 \sl b4 b b b \nsl c1 } gtrHarmony = \chordmode { \jazzChords s1 c2:min7+ d2:maj9 } guitar = { \global \clef treble << \gtr >> } %% ------ Piano ------ rhUpper = \relative c'' { \voiceOne \Key c1 | c | c } rhLower = \relative c' { \voiceTwo \Key e1 | e | e } lhUpper = \relative c' { \voiceOne \Key g1 | g | g } lhLower = \relative c { \voiceTwo \Key c1 | c | c } PianoRH = { \clef treble \global << \new Voice = "one" \rhUpper \new Voice = "two" \rhLower >> } PianoLH = { \clef bass \global << \new Voice = "one" \lhUpper \new Voice = "two" \lhLower >> } piano = { << \new Staff = "upper" \PianoRH \new Staff = "lower" \PianoLH >> } % ------ Bass Guitar ------ Bass = \relative c { \Key c1 | c | c } bass = { \global \clef bass << \Bass >> } % ------ Drums ------ up = \drummode { \voiceOne hh4 <hh sn> hh <hh sn> hh4 <hh sn> hh <hh sn> hh4 <hh sn> hh <hh sn> } down = \drummode { \voiceTwo bd4 s bd s bd4 s bd s bd4 s bd s } drumContents = { \global << \new DrumVoice \up \new DrumVoice \down >> } %%%%%%%%% It All Goes Together Here %%%%%%%%%%%%%%%%%%%%%% \score { << \new StaffGroup = "horns" << \new Staff = "trumpet" \with { instrumentName = "Trumpet" } \trumpet \new Staff = "altosax" \with { instrumentName = "Alto Sax" } \altoSax \new ChordNames = "barichords" \with { instrumentName = "Trumpet" } \bariHarmony \new Staff = "barisax" \with { instrumentName = "Bari Sax" } \bariSax \new Staff = "trombone" \with { instrumentName = "Trombone" } \trombone >> \new StaffGroup = "rhythm" << \new ChordNames = "chords" \gtrHarmony \new Staff = "guitar" \with { instrumentName = "Guitar" } \guitar \new PianoStaff = "piano" \with { instrumentName = "Piano" midiInstrument = "acoustic grand" } \piano \new Staff = "bass" \with { instrumentName = "Bass" } \bass \new DrumStaff \with { instrumentName = "Drums" } \drumContents >> >> \layout { \context { \Staff \RemoveEmptyStaves } \context { \Score \override BarNumber.padding = #3 \override RehearsalMark.padding = #2 skipBars = ##t } } \midi { } }
[ << Keyboards ] | [Arriba][Índice general] | [ Percussion >> ] |
[ < ] | [ Subir : Keyboards ] | [ > ] |
Ligaduras “Laissez vibrer”
Las ligaduras “Laissez vibrer” (dejar vibrar) tienen un tamaño fijo.
Se puede ajustar su formato usando 'tie-configuration
.
\relative c' { <c e g>4\laissezVibrer r <c f g>\laissezVibrer r <c d f g>4\laissezVibrer r <c d f g>4.\laissezVibrer r8 <c d e f>4\laissezVibrer r \override LaissezVibrerTieColumn.tie-configuration = #`((-7 . ,DOWN) (-5 . ,DOWN) (-3 . ,UP) (-1 . ,UP)) <c d e f>4\laissezVibrer r }
[ << Keyboards ] | [Arriba][Índice general] | [ Percussion >> ] |
[ < ] | [ Subir : Keyboards ] | [ > ] |
Plantilla de piano (sencilla)
Presentamos a continuación una plantilla de piano sencilla con algunas notas.
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 PianoStaff \with { instrumentName = "Piano" } << \new Staff = "upper" \upper \new Staff = "lower" \lower >> \layout { } \midi { } }
[ << Keyboards ] | [Arriba][Índice general] | [ Percussion >> ] |
[ < ] | [ Subir : Keyboards ] | [ > ] |
Plantilla de piano con letra centrada
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.
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 } text = \lyricmode { Aaa Bee Cee Dee } \score { \new PianoStaff << \new Staff = upper { \new Voice = "singer" \upper } \new Lyrics \lyricsto "singer" \text \new Staff = lower { \lower } >> \layout { } \midi { } }
[ << Keyboards ] | [Arriba][Índice general] | [ Percussion >> ] |
[ < ] | [ Subir : Keyboards ] | [ > ] |
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 { } }
[ << Keyboards ] | [Arriba][Índice general] | [ Percussion >> ] |
[ < ] | [ Subir : Keyboards ] | [ > ] |
Removing brace on first line of piano score
This snippet removes the first brace from a PianoStaff
or a
GrandStaff
.
It may be useful when cutting and pasting the engraved image into existing music.
It uses \alterBroken
.
someMusic = { \once \override Staff.Clef.stencil = ##f \once \override Staff.TimeSignature.stencil = ##f \repeat unfold 3 c1 \break \repeat unfold 5 c1 \break \repeat unfold 5 c1 } \score { \new PianoStaff << \new Staff = "right" \relative c'' \someMusic \new Staff = "left" \relative c' { \clef F \someMusic } >> \layout { indent=75 \context { \PianoStaff \alterBroken transparent #'(#t) SystemStartBrace } } }
[ << Keyboards ] | [Arriba][Índice general] | [ Percussion >> ] |
[ < ] | [ Subir : Keyboards ] | [ > ] |
Usar cambio automático de pentagrama con más de una voz
Utilización de autoChange
con más de una voz.
\score { \new PianoStaff << \new Staff = "up" { << \set Timing.beamExceptions = #'() \set Timing.beatStructure = #'(4) \new Voice { \voiceOne \autoChange \relative c' { g8 a b c d e f g g,8 a b c d e f g } } \new Voice { \voiceTwo \autoChange \relative c' { g8 a b c d e f g g,,8 a b c d e f g } } >> } \new Staff = "down" { \clef bass } >> }
[ << Keyboards ] | [Arriba][Índice general] | [ Percussion >> ] |
[ < ] | [ Subir : Keyboards ] | [ Percussion > ] |
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 >> >> >> >> }
[ << Keyboards ] | [Arriba][Índice general] | [ Percussion >> ] |
[ < ] | [ Subir : Keyboards ] | [ Percussion > ] |