[ << Chords ] | [Part superior][Continguts] | [ Percussion >> ] |
[ < ] | [ Amunt : Top ] | [ > ] |
Keyboards
Keyboard and other multi-staff instruments
[ << Keyboards ] | [Part superior][Continguts] | [ Percussion >> ] |
[ < Keyboards ] | [ Amunt : Keyboards ] | [ > ] |
Símbols d’acordió discanto
Aquest fragment de codi ha quedat obsolet per les ordres de marcatge
predefinides, vegeu ‘Registres d’acordió’ en la Referència de la
notació. Tanmateix, encara és útil com a demostració senzila de la
forma de combinar símbols: la col·locació dels símbols afegits amb
\markup
es pot ajustar modificant els arguments de
\translate-scaled
. Aquí s’usa \translate-scaled
en
lloc de \translate
perquè el posicionament de les parts de
símbols s’adapti als canvis de 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 ] | [Part superior][Continguts] | [ Percussion >> ] |
[ < ] | [ Amunt : 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 ] | [Part superior][Continguts] | [ Percussion >> ] |
[ < ] | [ Amunt : Keyboards ] | [ > ] |
Modificar el text de las indicacions de pedal
Es pot usar Staff.pedalSustainStrings
per fixar el text de les
indicacions de pisar pedal i aixecar pedal. Observeu que les úniques
cadenes vàlides són les que estan a la llista de glifs de pedal: els
valors que apareixen en aquest fragment de codi són una relació
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 ] | [Part superior][Continguts] | [ Percussion >> ] |
[ < ] | [ Amunt : Keyboards ] | [ > ] |
Clusters («raïms»)
Els «clusters» o raïms són un mecanisme per indicar la interpretació d’un àmbit de notes al mateix temps.
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 ] | [Part superior][Continguts] | [ Percussion >> ] |
[ < ] | [ Amunt : Keyboards ] | [ > ] |
Controlar la col·locación de les digitacions d’acords
Es pot controlar amb precisió la col·locació dels números de digitació. Perquè es tingui en compte l’orientació de les digitacions, es pot utilitzar una construcció d’acord <> tot i que siguin una sola nota.
\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 ] | [Part superior][Continguts] | [ Percussion >> ] |
[ < ] | [ Amunt : Keyboards ] | [ > ] |
Fer lligadures entre veus diferents
En determinades situacions cal crear lligadures d’expressió entre notes que estan a veus diferents.
La solució és afegir notes invisible a una de les veus utilitzant
\hideNotes
.
Aquest exemple és el compàs 235 de la Chacona de la segona Partita per a violí sol, BMW 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 ] | [Part superior][Continguts] | [ Percussion >> ] |
[ < ] | [ Amunt : 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 ] | [Part superior][Continguts] | [ Percussion >> ] |
[ < ] | [ Amunt : Keyboards ] | [ > ] |
Trèmolos de pentagrama creuat
Atès que \repeat tremolo
espera exactament dos arguments
musicals per als trèmolos d’acord, la nota o acord que canvia de
pentagrama a un trèmolo que creua el pentagrama s’ha de col·locar
dins de claus corbes junt a la seva ordre \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 ] | [Part superior][Continguts] | [ Percussion >> ] |
[ < ] | [ Amunt : Keyboards ] | [ > ] |
Ajustament fi de les línies de pedal
Es pot alterar l’aspecte de les línies de pedal de diverses formes.
\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 ] | [Part superior][Continguts] | [ Percussion >> ] |
[ < ] | [ Amunt : Keyboards ] | [ > ] |
Indicar acords de pentagrama creuat amb claudàtors d’arpegi
Un claudàtor d’arpegi pot indicar que s’han de tocar amb la
mateixa mà notes que estan en dos pentagrames diferents. Per
fer-ho, el PianoStaff
s’ha de configurar perquè accepti
símbols d’arpegi de pentagrama creuat i els símbols d’arpegi s’han
de configurar a la forma de claudàtor en el context 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 ] | [Part superior][Continguts] | [ Percussion >> ] |
[ < ] | [ Amunt : Keyboards ] | [ > ] |
Plantilla per a combo de jazz
Això és una plantilla força avançada, per a un conjunt de jazz.
Observeu que la notació de tots els instruments està a
\key c \major
(Do major). Això es refereix al to de
concert; l’armadura es transporta automàticament si la música està
dins d’una secció \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 ] | [Part superior][Continguts] | [ Percussion >> ] |
[ < ] | [ Amunt : Keyboards ] | [ > ] |
Lligaduras “Laissez vibrer”
Les lligadures “Laissez vibrer” (deixar vibrar) tenen una mida
fixa. Es pot ajustar el seu format usant '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 ] | [Part superior][Continguts] | [ Percussion >> ] |
[ < ] | [ Amunt : Keyboards ] | [ > ] |
Plantilla de piano (senzilla)
Presentem a continuació una plantilla de piano senzilla amb algunes notes.
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 ] | [Part superior][Continguts] | [ Percussion >> ] |
[ < ] | [ Amunt : Keyboards ] | [ > ] |
Plantilla de piano amb lletra centrada
En comptes de tenir un pentagrama dedicat a la melodia i la lletra, la lletra es pot centrar entre els pentagrames d’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 ] | [Part superior][Continguts] | [ Percussion >> ] |
[ < ] | [ Amunt : Keyboards ] | [ > ] |
Plantilla de piano amb melodia i lletra
Vet aquí el típic format d’una cançó: un pentagrama amb la melodia i la lletra, i el acompanyament de piano per sota.
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 ] | [Part superior][Continguts] | [ Percussion >> ] |
[ < ] | [ Amunt : 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 ] | [Part superior][Continguts] | [ Percussion >> ] |
[ < ] | [ Amunt : Keyboards ] | [ > ] |
Usar canvi automàtic de pentagrama amb més d’una veu
Utilització de autochange
amb més d’una veu.
\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 ] | [Part superior][Continguts] | [ Percussion >> ] |
[ < ] | [ Amunt : Keyboards ] | [ Percussion > ] |
Plantilla de conjunt vocal amb reducció de piano automàtica
Aquesta plantilla afegeix una reducció de piano automàtica a la
partitura vocal SATB estàndard que es va mostrar a la
“Plantilla de conjunt vocal”. Això presenta un dels punts
forts del LilyPond: podem usar una definició de música més d’un
cop. Si es fa qualsevol canvi a les notes de la part vocal
(diguem tenorMusic
), aleshores els canvis s’aplicaran també
a la reducció 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 ] | [Part superior][Continguts] | [ Percussion >> ] |
[ < ] | [ Amunt : Keyboards ] | [ Percussion > ] |