>>
@end lilypond
-The @code{NullVoice} context must be placed within a @code{Staff}
-context and contain notes that are already being displayed in that staff and that are also in the same octave. Otherwise the
-@code{NullVoice} may interact with the printed voices in
-unexpected ways. For example, arbitrary notes in the
-@code{NullVoice} may cause accidentals to appear (or disappear) on
-the staff.
-
This method also can be used with the @code{\partcombine}
function, which does not allow lyrics on its own:
words = \lyricmode { la __ la __ }
\new ChoirStaff <<
- \new Staff <<
- \soprano
- \new NullVoice = "aligner" \aligner
- >>
+ \new Staff \soprano
+ \new NullVoice = "aligner" \aligner
\new Lyrics \lyricsto "aligner" \words
\new Staff \partcombine \altoOne \altoTwo
>>
@end lilypond
-However, note that in the second half of the measure above, the
-notes in the @code{NullVoice} context reflect the rhythm of the
-lower staff, but they do not deviate from the single pitch being
-displayed in the staff to which the @code{NullVoice} belongs.
-While not actually required in this particular example, it is a
-good idea in general to enter the notes in this way.
-
-
@node Stanzas
@subsection Stanzas
texidoc ="Lyrics can be aligned to a @code{NullVoice} context,
which prints no notes, with the usual mechanisms for melismata."
}
-
+\paper { ragged-right = ##f }
\score { <<
\new Staff <<
- { c''4. g'8 c''2 | g'4( f' g'2) } \\
+ { c''4. g'8 c''2 | g'8( f' g'4)~ g'2 } \\
{ c'4 b c'8 e' g' e' | c'1 }
\new NullVoice = "nv" {
- \autoBeamOff c4 r16 b,16~ b,8 c8[ e8 g8 e8] | g4( f4) g2 }
+ \autoBeamOff c4 r16 b,8. c8[ e8 g8 e8] | g8( f g4)~ g2 }
>>
\new Lyrics \lyricsto "nv" { free a -- lign -- ment }
>> }
{
Grob *column = g->get_parent (X_AXIS);
if (!column)
- {
- g->warning (_ ("rhythmic head is not part of a rhythmic column"));
continue;
- }
// Only include rests that start now. Include notes that started any time.
Paper_column *paper_column = dynamic_cast<Item *> (column)->get_column ();
\defaultchild "Voice"
\accepts "Voice"
\accepts "CueVoice"
- \accepts "NullVoice"
\description "Handles clefs, bar lines, keys, accidentals. It can contain
@code{Voice} contexts."
\accepts "ChoirStaff"
\accepts "PianoStaff"
\accepts "Devnull"
+ \accepts "NullVoice"
\accepts "NoteNames"
\accepts "FiguredBass"
\omit NoteHead
\override NoteHead.X-extent = #(lambda (g)
(ly:stencil-extent (ly:note-head::print g) X))
- % rhythmic-head-interface needs Rhythmic_column_engraver, which we don't want
- \override NoteHead.meta.interfaces = #(delete 'rhythmic-head-interface
- (assoc-get 'interfaces
- (assoc-get 'meta
- (assoc-get 'NoteHead
- all-grob-descriptions))))
- %% keep noteheads inside the staff
- \consists "Pitch_squash_engraver"
- squashedPosition = 0
\omit Accidental
\omit AccidentalCautionary
\name Staff
\accepts Voice
\accepts CueVoice
- \accepts NullVoice
\defaultchild Voice
\consists "Staff_performer"
\alias Staff
\alias Voice
%% needed for melismata
- %% TODO: at least the tie performer likely does not work without the
- %% Note_performer, but I don't know how to shut note output off in
- %% MIDI.
\consists "Tie_performer"
\consists "Beam_performer"
\consists "Slur_performer"
\accepts TabStaff
\accepts StaffGroup
\accepts Devnull
+ \accepts NullVoice
\accepts ChoirStaff
\accepts RhythmicStaff
\accepts ChordNames