Hi Kieren & Lucas,
Hello! I have a composition in which the singer uses rhythmic and conventional
staffs back and forth. However, while trying to clean up my past spaghetti
code, I've noticed I couldn't display lyrics after the first staff.
I think your coding is too complicated for what you need. Here’s how I would
code it:
Or even like this, perhaps simpler and more flexible:
%%%
\version "2.26.0"
\layout {
\context {
\Staff
\consists Pitch_squash_engraver
}
}
rhythmicSettings = {
\temporary \override Staff.StaffSymbol.line-count = 1
\temporary \override Stem.neutral-direction = #UP
\temporary \override Beam.neutral-direction = #UP
\temporary \omit Staff.Clef
\set Staff.squashedPosition = 0
}
rhythmicOn = {
\stopStaff
\rhythmicSettings
\once \override Staff.BarLine.bar-extent = #'(-2 . 2)
% TODO: This should only be done for a mid-line change
\startStaff
}
rhythmicOff = {
\stopStaff
\undo \rhythmicSettings
\once \override Staff.BarLine.bar-extent = #'(-2 . 2)
% TODO: This should only be done for a mid-line change
\startStaff
}
melody = \relative {
\rhythmicOn
c'1 d e f
\rhythmicOff
% % maybe:
% \set Staff.forceClef = ##t
g1( a b
\rhythmicOn
c2) g8 f e d c1
}
theLyrics = \lyricmode {
\set autoExtenders = ##t
I1 a e a o, doo bee doo bee doo!
}
\score {
\new Staff \melody
\addlyrics \theLyrics
}
%%%