A.2 Piano templates
A.2.1 Solo piano
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 <<
\set PianoStaff.instrumentName = #"Piano "
\new Staff = "upper" \upper
\new Staff = "lower" \lower
>>
\layout { }
\midi { }
}
A.2.2 Piano and melody with lyrics
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 { \RemoveEmptyStaffContext }
}
\midi { }
}
A.2.3 Piano centered lyrics
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 GrandStaff <<
\new Staff = upper { \new Voice = "singer" \upper }
\new Lyrics \lyricsto "singer" \text
\new Staff = lower { \lower }
>>
\layout {
\context {
\GrandStaff
\accepts "Lyrics"
}
\context {
\Lyrics
\consists "Bar_engraver"
}
}
\midi { }
}
A.2.4 Piano centered dynamics
Muchas partituras de piano tienen las indicaciones dinámicas
centradas entre los dos pentagramas. Esto requiere un poco de
trucaje, pero puesto que la plantilla está aquí mismo, no tenemos
que hacer este trucaje por nuestra cuenta.
global = {
\key c \major
\time 4/4
}
upper = \relative c'' {
\clef treble
a4 b c d
}
lower = \relative c {
\clef bass
a2 c
}
dynamics = {
s2\fff\> s4 s\!\pp
}
pedal = {
s2\sustainOn s\sustainOff
}
\score {
\new PianoStaff = "PianoStaff_pf" <<
\new Staff = "Staff_pfUpper" << \global \upper >>
\new Dynamics = "Dynamics_pf" \dynamics
\new Staff = "Staff_pfLower" << \global \lower >>
\new Dynamics = "pedal" \pedal
>>
\layout {
% define Dynamics context
\context {
\type "Engraver_group"
\name Dynamics
\alias Voice
\consists "Output_property_engraver"
\consists "Piano_pedal_engraver"
\consists "Script_engraver"
\consists "New_dynamic_engraver"
\consists "Dynamic_align_engraver"
\consists "Text_engraver"
\consists "Skip_event_swallow_translator"
\consists "Axis_group_engraver"
pedalSustainStrings = #'("Ped." "*Ped." "*")
pedalUnaCordaStrings = #'("una corda" "" "tre corde")
\override DynamicLineSpanner #'Y-offset = #0
\override TextScript #'font-size = #2
\override TextScript #'font-shape = #'italic
\override VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1)
}
% modify PianoStaff context to accept Dynamics context
\context {
\PianoStaff
\accepts Dynamics
}
}
}
\score {
\new PianoStaff = "PianoStaff_pf" <<
\new Staff = "Staff_pfUpper" << \global \upper \dynamics \pedal >>
\new Staff = "Staff_pfLower" << \global \lower \dynamics \pedal >>
>>
\midi { }
}
Other languages: English, deutsch.