Joel Ebel <jbe...@mybox.org> writes:

> I'm sure this is documented somewhere and I just can't seem to find
> it. How do I get a new staff to immediately follow a previous staff in
> the same vertical space. In this simple example, I'd like the TabStaff
> to end, and the RhythmicStaff to immediately follow in the same
> vertical space, rather than starting lower in the score, indicating a
> switch between picked notes vs strummed chords.
>
> \version "2.19.25"
> <<
>   \new ChordNames \chordmode {
>     c1 c
>   }
>   { \new TabStaff \relative c {
>       c4 e g c
>     }
>     \new RhythmicStaff {
>       c4 c8 c~ c c c
>     }
>   }
>>>

The following appears to work here.  Of course it begs the question
whether we should provide a context definition like that, possibly with
a better name, in LilyPond by default.

\version "2.19.25"

<<
  \new ChordNames \chordmode {
    c1 c
  }
  \new Line {
    \new TabStaff
    {
      \relative c {
	c4 e g c \stopStaff
      }
    }
    \new RhythmicStaff
    {
      4 8 8~8 8 4
    }
  }
>>

\layout {
  \context {
    \name "Line"
    \type "Engraver_group"
    \consists "Axis_group_engraver"
    \accepts TabStaff
    \accepts RhythmicStaff
  }
  \context {
    \Score
    \accepts "Line"
  }
}

-- 
David Kastrup
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to