Ambits can be added per voice. In that case, the ambitus must be moved manually to prevent collisions.
\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 } >>
adjusting-lyrics-vertical-spacing.ly
This snippets shows you how to bring the lyrics line closer to the Staff.
% Default layout: \score{ << \new Staff \new Voice = m \relative c'{ c4 d e f g f e d c1} \new Lyrics \lyricsto m {aa aa aa aa aa aa aa aa aa } >> } % Reducing the minimum space below the Staff and above the Lyrics: \score { << \new Staff \with { \override VerticalAxisGroup #'minimum-Y-extent = #'(-1. 4)} \new Voice = m \relative c'{ c4 d e f g f e d c1 } \new Lyrics \with { \override VerticalAxisGroup #'minimum-Y-extent = #'(-1.2 . 1)} \lyricsto m {aa aa aa aa aa aa aa aa aa } >> \header { tagline = "" } }
You can specify different horizontal alignment for your lyrics, by overriding the #'self-alignment-X property of the LyricText object. #-1 is left, #0 is center and #1 is right; however, you can use #LEFT, #CENTER and #RIGHT as well.
\relative c'' { c1 c c } \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" }
If you have multiple voices in a single staff and you want a single
ambitus per staff rather than per voice, add the
Ambitus_engraver
to the Staff
context rather than to the
Voice
context.
\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 } >>
This form of notation is used for the chant of the Psalms, where verses aren't always the same length.
stemon = { \override Staff.Stem #'transparent = ##f } stemoff = { \override Staff.Stem #'transparent = ##t } \score { \new Staff \with {\remove "Time_signature_engraver" } { \key g \minor \set Score.timing = ##f \stemoff a'\breve bes'4 g'4 \stemon a'2 \bar "||" \stemoff a'\breve g'4 a'4 \stemon f'2 \bar "||" \stemoff a'\breve^\markup { \italic flexe } \stemon g'2 \bar "||" } \layout { raggedright = ##t} }
Problem: How to know which MidiInstrument would be best for your composition? Solution: A Lilypond demo file.
\score { \new Staff << \new Voice { \melodie } %Voice >> %Staff \layout { } } %score \score { \new Staff << \tempo 4 = 180 %\set Staff.instrumentName="S/A" %\set Staff.midiMinimumVolume = #0.2 %\set Staff.midiMaximumVolume = #0.4 %\set Voice.dynamicAbsoluteVolumeFunction = #0.6 \new Voice { r \mf \set Staff.midiInstrument="acoustic grand" \melodie \set Staff.midiInstrument="bright acoustic" \melodie \set Staff.midiInstrument="electric grand" \melodie \set Staff.midiInstrument="honky-tonk" \melodie \set Staff.midiInstrument="electric piano 1" \melodie \set Staff.midiInstrument="electric piano 2" \melodie \set Staff.midiInstrument="harpsichord" \melodie \set Staff.midiInstrument="clav" \melodie \set Staff.midiInstrument="celesta" \melodie \set Staff.midiInstrument="glockenspiel" \melodie \set Staff.midiInstrument="music box" \melodie \set Staff.midiInstrument="vibraphone" \melodie \set Staff.midiInstrument="marimba" \melodie \set Staff.midiInstrument="xylophone" \melodie \set Staff.midiInstrument="tubular bells" \melodie \set Staff.midiInstrument="dulcimer" \melodie \set Staff.midiInstrument="drawbar organ" \melodie \set Staff.midiInstrument="percussive organ" \melodie \set Staff.midiInstrument="rock organ" \melodie \set Staff.midiInstrument="church organ" \melodie \set Staff.midiInstrument="reed organ" \melodie \set Staff.midiInstrument="accordion" \melodie \set Staff.midiInstrument="harmonica" \melodie \set Staff.midiInstrument="concertina" \melodie \set Staff.midiInstrument="acoustic guitar (nylon)" \melodie \set Staff.midiInstrument="acoustic guitar (steel)" \melodie \set Staff.midiInstrument="electric guitar (jazz)" \melodie \set Staff.midiInstrument="electric guitar (clean)" \melodie \set Staff.midiInstrument="electric guitar (muted)" \melodie \set Staff.midiInstrument="overdriven guitar" \melodie \set Staff.midiInstrument="distorted guitar" \melodie \set Staff.midiInstrument="acoustic bass" \melodie \set Staff.midiInstrument="electric bass (finger)" \melodie \set Staff.midiInstrument="electric bass (pick)" \melodie \set Staff.midiInstrument="fretless bass" \melodie \set Staff.midiInstrument="slap bass 1" \melodie \set Staff.midiInstrument="slap bass 2" \melodie \set Staff.midiInstrument="synth bass 1" \melodie \set Staff.midiInstrument="synth bass 2" \melodie \set Staff.midiInstrument="violin" \melodie \set Staff.midiInstrument="viola" \melodie \set Staff.midiInstrument="cello" \melodie \set Staff.midiInstrument="contrabass" \melodie \set Staff.midiInstrument="tremolo strings" \melodie \set Staff.midiInstrument="pizzicato strings" \melodie \set Staff.midiInstrument="orchestral strings" \melodie \set Staff.midiInstrument="timpani" \melodie \set Staff.midiInstrument="string ensemble 1" \melodie \set Staff.midiInstrument="string ensemble 2" \melodie \set Staff.midiInstrument="synthstrings 1" \melodie \set Staff.midiInstrument="synthstrings 2" \melodie \set Staff.midiInstrument="choir aahs" \melodie \set Staff.midiInstrument="voice oohs" \melodie \set Staff.midiInstrument="synth voice" \melodie \set Staff.midiInstrument="orchestra hit" \melodie \set Staff.midiInstrument="trumpet" \melodie \set Staff.midiInstrument="trombone" \melodie \set Staff.midiInstrument="tuba" \melodie \set Staff.midiInstrument="muted trumpet" \melodie \set Staff.midiInstrument="french horn" \melodie \set Staff.midiInstrument="brass section" \melodie \set Staff.midiInstrument="synthbrass 1" \melodie \set Staff.midiInstrument="synthbrass 2" \melodie \set Staff.midiInstrument="soprano sax" \melodie \set Staff.midiInstrument="alto sax" \melodie \set Staff.midiInstrument="tenor sax" \melodie \set Staff.midiInstrument="baritone sax" \melodie \set Staff.midiInstrument="oboe" \melodie \set Staff.midiInstrument="english horn" \melodie \set Staff.midiInstrument="bassoon" \melodie \set Staff.midiInstrument="clarinet" \melodie \set Staff.midiInstrument="piccolo" \melodie \set Staff.midiInstrument="flute" \melodie \set Staff.midiInstrument="recorder" \melodie \set Staff.midiInstrument="pan flute" \melodie \set Staff.midiInstrument="blown bottle" \melodie \set Staff.midiInstrument="shakuhachi" \melodie \set Staff.midiInstrument="whistle" \melodie \set Staff.midiInstrument="ocarina" \melodie \set Staff.midiInstrument="lead 1 (square)" \melodie \set Staff.midiInstrument="lead 2 (sawtooth)" \melodie \set Staff.midiInstrument="lead 3 (calliope)" \melodie \set Staff.midiInstrument="lead 4 (chiff)" \melodie \set Staff.midiInstrument="lead 5 (charang)" \melodie \set Staff.midiInstrument="lead 6 (voice)" \melodie \set Staff.midiInstrument="lead 7 (fifths)" \melodie \set Staff.midiInstrument="lead 8 (bass+lead)" \melodie \set Staff.midiInstrument="pad 1 (new age)" \melodie \set Staff.midiInstrument="pad 2 (warm)" \melodie \set Staff.midiInstrument="pad 3 (polysynth)" \melodie \set Staff.midiInstrument="pad 4 (choir)" \melodie \set Staff.midiInstrument="pad 5 (bowed)" \melodie \set Staff.midiInstrument="pad 6 (metallic)" \melodie \set Staff.midiInstrument="pad 7 (halo)" \melodie \set Staff.midiInstrument="pad 8 (sweep)" \melodie \set Staff.midiInstrument="fx 1 (rain)" \melodie \set Staff.midiInstrument="fx 2 (soundtrack)" \melodie \set Staff.midiInstrument="fx 3 (crystal)" \melodie \set Staff.midiInstrument="fx 4 (atmosphere)" \melodie \set Staff.midiInstrument="fx 5 (brightness)" \melodie \set Staff.midiInstrument="fx 6 (goblins)" \melodie \set Staff.midiInstrument="fx 7 (echoes)" \melodie \set Staff.midiInstrument="fx 8 (sci-fi)" \melodie \set Staff.midiInstrument="sitar" \melodie \set Staff.midiInstrument="banjo" \melodie \set Staff.midiInstrument="shamisen" \melodie \set Staff.midiInstrument="koto" \melodie \set Staff.midiInstrument="kalimba" \melodie \set Staff.midiInstrument="bagpipe" \melodie \set Staff.midiInstrument="fiddle" \melodie \set Staff.midiInstrument="shanai" \melodie \set Staff.midiInstrument="tinkle bell" \melodie \set Staff.midiInstrument="agogo" \melodie \set Staff.midiInstrument="steel drums" \melodie \set Staff.midiInstrument="woodblock" \melodie \set Staff.midiInstrument="taiko drum" \melodie \set Staff.midiInstrument="melodic tom" \melodie \set Staff.midiInstrument="synth drum" \melodie \set Staff.midiInstrument="reverse cymbal" \melodie \set Staff.midiInstrument="guitar fret noise" \melodie \set Staff.midiInstrument="breath noise" \melodie \set Staff.midiInstrument="seashore" \melodie \set Staff.midiInstrument="bird tweet" \melodie \set Staff.midiInstrument="telephone ring" \melodie \set Staff.midiInstrument="helicopter" \melodie \set Staff.midiInstrument="applause" \melodie \set Staff.midiInstrument="gunshot" \melodie } %Voice >> %Staff \midi { } } %score
formatting-lyrics-syllables.ly
To format single lyrics syllables, you can simply use \markup { .... } on these lyrics!
melody = \relative c'' { c4 c c c } lyr = \lyricmode { Lyrics \markup { \italic can } \markup {\with-color #red contain } \markup {\fontsize #8 \bold "Markup!" } } \context Staff << \context Voice = "mel" << \melody >> \context Lyrics \lyricsto "mel" \lyr >>
how-to-put-ties-between-syllables-in-lyrics.ly
This can be achieved by separating those syllables by tildes.
\lyrics { wa~o~a }
piano-template-with-melody-and-lyrics.ly
Here is a typical song format: one staff with the melody and lyrics, with piano accompaniment underneath.
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 a 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 { } }
single-staff-template-with-notes,-lyrics,-and-chords.ly
This template allows you to prepare a song with melody, words, and chords.
melody = \relative c' { \clef treble \key c \major \time 4/4 a b c d } text = \lyricmode { Aaa Bee Cee Dee } harmonies = \chordmode { a2 c2 } \score { << \new ChordNames { \set chordChanges = ##t \harmonies } \new Voice = "one" { \autoBeamOff \melody } \new Lyrics \lyricsto "one" \text >> \layout { } \midi { } }
single-staff-template-with-notes-and-lyrics.ly
This small template demonstrates a simple melody with lyrics. Cut and paste, add notes, then words for the lyrics. This example turns off automatic beaming, which is common for vocal parts. If you want to use automatic beaming, you'll have to change or comment out the relevant line.
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 { } }
Although you can't use `s' in lyric mode (it's taken to be a literal s, not a space) you can use either "" or _.
So for example:
<< \relative c'' { a4 b c d } \new Lyrics \lyricmode { a4 _2 gap4 } >>
The s syntax is only available in note mode and chord mode. In other situations, for example, when entering lyrics, you should use the \skip command.
<< \relative { a'2 a1 } \new Lyrics \lyricmode { \skip 2 bla1 } >>
vertically-aligning-ossias-and-lyrics.ly
This snippet shows of to use the alignBelowContext
and
alignAboveContext
properties, which may be needed for text
elements (e.g. lyrics) positioning, but also for musical contents such
as ossias.
\paper { ragged-right = ##t } \relative << \new Staff = "1" { c4 c s2 } \new Staff = "2" { c4 c s2 } \new Staff = "3" { c4 c s2 } { \skip 2 << \lyrics { \set alignBelowContext = #"1" below8 first staff } \new Staff { \set Staff.alignAboveContext = #"3" \times 4/6 { \override TextScript #'padding = #3 c8^"this" d_"staff" e^"above" d_"last" e^"staff" f } } >> } >>
vocal-ensemble-template-with-automatic-piano-reduction.ly
This template adds an automatic piano reduction to the standard SATB vocal score demonstrated in "Vocal ensemble template". This demonstrates one of the strengths of LilyPond – you can use a music definition more than once. If you make any changes to the vocal notes (say, tenorMusic), then the changes will also apply to the piano reduction.
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 Lyrics = sopranos { s1 } \new Staff = women << \new Voice = "sopranos" { \voiceOne << \global \sopMusic >> } \new Voice = "altos" { \voiceTwo << \global \altoMusic >> } >> \new Lyrics = "altos" { s1 } \new Lyrics = "tenors" { s1 } \new Staff = men << \clef bass \new Voice = "tenors" { \voiceOne <<\global \tenorMusic >> } \new Voice = "basses" { \voiceTwo <<\global \bassMusic >> } >> \new Lyrics = basses { s1 } \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 >> >> >> >> \layout { \context { % a little smaller so lyrics % can be closer to the staff \Staff \override VerticalAxisGroup #'minimum-Y-extent = #'(-3 . 3) } } }
vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
This template is basically the same as the simple "Vocal ensemble" template, with the exception that here all the lyrics lines are placed using alignAboveContext and 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 >> \layout { \context { % a little smaller so lyrics % can be closer to the staff \Staff \override VerticalAxisGroup #'minimum-Y-extent = #'(-3 . 3) } } } \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 \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 \lyricsto basses \bassWords >> \layout { \context { % a little smaller so lyrics % can be closer to the staff \Staff \override VerticalAxisGroup #'minimum-Y-extent = #'(-3 . 3) } } }
Here is a standard four-part SATB vocal score. With larger ensembles, it's often useful to include a section which is included in all parts. For example, the time signature and key signatures are almost always the same for all parts. Like in the "Hymn" template, the four voices are regrouped on only two staves.
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 Lyrics = sopranos { s1 } \new Staff = women << \new Voice = "sopranos" { \voiceOne << \global \sopMusic >> } \new Voice = "altos" { \voiceTwo << \global \altoMusic >> } >> \new Lyrics = "altos" { s1 } \new Lyrics = "tenors" { s1 } \new Staff = men << \clef bass \new Voice = "tenors" { \voiceOne <<\global \tenorMusic >> } \new Voice = "basses" { \voiceTwo <<\global \bassMusic >> } >> \new Lyrics = basses { s1 } \context Lyrics = sopranos \lyricsto sopranos \sopWords \context Lyrics = altos \lyricsto altos \altoWords \context Lyrics = tenors \lyricsto tenors \tenorWords \context Lyrics = basses \lyricsto basses \bassWords >> \layout { \context { % a little smaller so lyrics % can be closer to the staff \Staff \override VerticalAxisGroup #'minimum-Y-extent = #'(-3 . 3) } } }
This page is for LilyPond-2.11.40 (development-branch).
Report errors to http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.
Your suggestions for the documentation are welcome.