Re: Make a new staff occupy the same vertical space as a previous staff
Thanks for all the help. As per Simon's advice, I'm now doing this to get rid of the TAB clef on the first line of RhythmicStaff, and I like the removal of the DevNull. It's perhaps a toss-up whether the source is easier to read with << >> around the TabStaff it vs putting a \stopStaff after it, but perhaps internally it is cleaner this way. The result of this is now just what I want. \version "2.19.25" \new Line { << { << \new TabStaff { \relative c {c1} \omit TabStaff.Clef } >> \break \new RhythmicStaff \relative c' { 1 \break 1 } } >> } \layout { \context { \name "Line" \type "Engraver_group" \consists "Axis_group_engraver" \accepts TabStaff \accepts RhythmicStaff } \context { \Score \accepts "Line" } } On Fri, Aug 28, 2015 at 11:48 AM, David Kastrup wrote: > Joel Ebel writes: > >> On Thu, Aug 27, 2015 at 2:53 AM, David Kastrup wrote: >>> Oh wow. This one is seriously annoying. If you take out all >>> \stopStaff, it is apparent that the TabStaff is alive through the whole >>> piece. This is also the case when replacing \new Line with \new >>> StaffGroup. This is something like the "the first new context in a >>> group is kept alive" rule. If you replace >>> >>> \new TabStaff ... >>> >>> with >>> >>> << \new DevNull {} \new TabStaff ... >> >>> >>> the problem goes away even without \stopStaff. But that's seriously >>> messed up. >>> >>> -- >>> David Kastrup >> >> That's abstract, but the result is much better. > > It's also snake oil. It turns out that all that is required is writing > > << \new TabStaff ... >> > > The reason is that context descents in { ... } are "sticky": when > writing something like > > { > \override Voice.x = y > \override Voice.z = u > ... > } > > this is represented somewhat like > > { > \context Voice \pushProperty x y > \context Voice \pushProperty z u > ... > } > > and when started at top level, not every line should start a new > Voice/Staff of its own. > > This stickiness is not prevalent with <<...>>: every element in <<...>> > maintains its own context without affecting the outer context. So > adding a <<...>> wrapper around an element saves its context descents > from being sticky. For example, > > > > creates three staves (\time 3/4 does not actually get a staff of its > own, but since it does not get called within a staff, none of the 3 time > signatures have point-and-click back to the source file). > > >> The one remaining issue is that if the switch to RhythmicStaff occurs >> on a line break, TAB is still printed on the first subsequent line. I >> can live with it, but is it possible to prevent that? Simple example >> below. TAB is on line 2, but not line 3. > > So this gets us > >> \version "2.19.25" >> >> \new Line { >> << >> \new TabStaff { \relative c { c1 } } >> >> >> \break >> \new RhythmicStaff { 1 \break 1 } >> } >> >> \layout { >> \context { >> \name "Line" >> \type "Engraver_group" >> \consists "Axis_group_engraver" >> \accepts TabStaff >> \accepts RhythmicStaff >> } >> \context { >> \Score >> \accepts "Line" >> } >> } > > Which again shows the TAB clef. I consider this a bug. One can > probably fiddle with break invisibilities in order to get this under > control while the bug isn't fixed. > > -- > David Kastrup > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Make a new staff occupy the same vertical space as a previous staff
Joel Ebel writes: > On Thu, Aug 27, 2015 at 2:53 AM, David Kastrup wrote: >> Oh wow. This one is seriously annoying. If you take out all >> \stopStaff, it is apparent that the TabStaff is alive through the whole >> piece. This is also the case when replacing \new Line with \new >> StaffGroup. This is something like the "the first new context in a >> group is kept alive" rule. If you replace >> >> \new TabStaff ... >> >> with >> >> << \new DevNull {} \new TabStaff ... >> >> >> the problem goes away even without \stopStaff. But that's seriously >> messed up. >> >> -- >> David Kastrup > > That's abstract, but the result is much better. It's also snake oil. It turns out that all that is required is writing << \new TabStaff ... >> The reason is that context descents in { ... } are "sticky": when writing something like { \override Voice.x = y \override Voice.z = u ... } this is represented somewhat like { \context Voice \pushProperty x y \context Voice \pushProperty z u ... } and when started at top level, not every line should start a new Voice/Staff of its own. This stickiness is not prevalent with <<...>>: every element in <<...>> maintains its own context without affecting the outer context. So adding a <<...>> wrapper around an element saves its context descents from being sticky. For example, { <<\clef bass>> <<\key d \major>> <<\time 3/4>> c4 d e } creates three staves (\time 3/4 does not actually get a staff of its own, but since it does not get called within a staff, none of the 3 time signatures have point-and-click back to the source file). > The one remaining issue is that if the switch to RhythmicStaff occurs > on a line break, TAB is still printed on the first subsequent line. I > can live with it, but is it possible to prevent that? Simple example > below. TAB is on line 2, but not line 3. So this gets us > \version "2.19.25" > > \new Line { > << > \new TabStaff { \relative c { c1 } } > >> > \break > \new RhythmicStaff { 1 \break 1 } > } > > \layout { > \context { > \name "Line" > \type "Engraver_group" > \consists "Axis_group_engraver" > \accepts TabStaff > \accepts RhythmicStaff > } > \context { > \Score > \accepts "Line" > } > } Which again shows the TAB clef. I consider this a bug. One can probably fiddle with break invisibilities in order to get this under control while the bug isn't fixed. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Make a new staff occupy the same vertical space as a previous staff
Am 27.08.2015 um 15:50 schrieb Joel Ebel: On Thu, Aug 27, 2015 at 2:53 AM, David Kastrup wrote: Oh wow. This one is seriously annoying. If you take out all \stopStaff, it is apparent that the TabStaff is alive through the whole piece. This is also the case when replacing \new Line with \new StaffGroup. This is something like the "the first new context in a group is kept alive" rule. If you replace \new TabStaff ... with << \new DevNull {} \new TabStaff ... >> the problem goes away even without \stopStaff. But that's seriously messed up. -- David Kastrup That's abstract, but the result is much better. The one remaining issue is that if the switch to RhythmicStaff occurs on a line break, TAB is still printed on the first subsequent line. I can live with it, but is it possible to prevent that? Technically, the TAB is a clef. \omit TabStaff.Clef before the first note in the RhythmicStaff does the trick. Yours, Simon Simple example below. TAB is on line 2, but not line 3. \version "2.19.25" \new Line { << \new Devnull {} \new TabStaff { \relative c { c1 } } >> \break \new RhythmicStaff { 1 \break 1 } } \layout { \context { \name "Line" \type "Engraver_group" \consists "Axis_group_engraver" \accepts TabStaff \accepts RhythmicStaff } \context { \Score \accepts "Line" } } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Make a new staff occupy the same vertical space as a previous staff
On Thu, Aug 27, 2015 at 2:53 AM, David Kastrup wrote: > Oh wow. This one is seriously annoying. If you take out all > \stopStaff, it is apparent that the TabStaff is alive through the whole > piece. This is also the case when replacing \new Line with \new > StaffGroup. This is something like the "the first new context in a > group is kept alive" rule. If you replace > > \new TabStaff ... > > with > > << \new DevNull {} \new TabStaff ... >> > > the problem goes away even without \stopStaff. But that's seriously > messed up. > > -- > David Kastrup That's abstract, but the result is much better. The one remaining issue is that if the switch to RhythmicStaff occurs on a line break, TAB is still printed on the first subsequent line. I can live with it, but is it possible to prevent that? Simple example below. TAB is on line 2, but not line 3. \version "2.19.25" \new Line { << \new Devnull {} \new TabStaff { \relative c { c1 } } >> \break \new RhythmicStaff { 1 \break 1 } } \layout { \context { \name "Line" \type "Engraver_group" \consists "Axis_group_engraver" \accepts TabStaff \accepts RhythmicStaff } \context { \Score \accepts "Line" } } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Make a new staff occupy the same vertical space as a previous staff
Joel Ebel writes: > On Tue, Aug 25, 2015 at 10:26 PM, Joel Ebel wrote: >> On Tue, Aug 25, 2015 at 9:53 PM, David Kastrup wrote: >>> 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. > > Is there a way to get it to stop printing TAB (vertically, in the clef > space) on subsequent lines after switching to a RhythmicStaff? See > attached example. > > \version "2.19.25" > > << > \new ChordNames \chordmode { > c1 c > } > \new Line { > \new TabStaff > { > \relative c { > c4 e g c %\stopStaff > } %\stopStaff > } \stopStaff > \new RhythmicStaff > { > 4 8 8~8 8 4 \break > 4 4 4 4 1 > } > } > \relative c' { > c1 c c c > } >>> > > \layout { > \context { > \name "Line" > \type "Engraver_group" > \consists "Axis_group_engraver" > \accepts TabStaff > \accepts RhythmicStaff > } > \context { > \Score > \accepts "Line" > } > } Oh wow. This one is seriously annoying. If you take out all \stopStaff, it is apparent that the TabStaff is alive through the whole piece. This is also the case when replacing \new Line with \new StaffGroup. This is something like the "the first new context in a group is kept alive" rule. If you replace \new TabStaff ... with << \new DevNull {} \new TabStaff ... >> the problem goes away even without \stopStaff. But that's seriously messed up. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Make a new staff occupy the same vertical space as a previous staff
On Tue, Aug 25, 2015 at 10:26 PM, Joel Ebel wrote: > On Tue, Aug 25, 2015 at 9:53 PM, David Kastrup wrote: >> 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. Is there a way to get it to stop printing TAB (vertically, in the clef space) on subsequent lines after switching to a RhythmicStaff? See attached example. \version "2.19.25" << \new ChordNames \chordmode { c1 c } \new Line { \new TabStaff { \relative c { c4 e g c %\stopStaff } %\stopStaff } \stopStaff \new RhythmicStaff { 4 8 8~8 8 4 \break 4 4 4 4 1 } } \relative c' { c1 c c c } >> \layout { \context { \name "Line" \type "Engraver_group" \consists "Axis_group_engraver" \accepts TabStaff \accepts RhythmicStaff } \context { \Score \accepts "Line" } }___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Make a new staff occupy the same vertical space as a previous staff
On Tue, Aug 25, 2015 at 9:53 PM, David Kastrup wrote: > 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. Excellent! That does work, which is good because I discovered that if I add another staff, then the second half of the line wound up below that other staff, rather than adjacent to the chordnames, example below. I would certainly be in favor of a re-usable line context. \version "2.19.25" << \new ChordNames { << \chordmode { c1 } \new TabStaff \relative c { c4 e g c } >> \break << \chordmode { c1 } \new RhythmicStaff { c4 c8 c~ c c c } >> } \new Staff \relative c' { c1 g' } >> ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Make a new staff occupy the same vertical space as a previous staff
Joel Ebel 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
Re: Make a new staff occupy the same vertical space as a previous staff
The closest I've been able to get so far is to instantiate the TabStaff and the RhythmicStaff inside the ChordNames in parallel with the chords I want to make. I still don't get the TabStaff and the RhythmicStaff on the same line, but if I insert a \break (commented out below) in between them, then they appear to be in the same place. Is there a better solution? \version "2.19.25" \new ChordNames { << \chordmode { c1 } \new TabStaff \relative c { c4 e g c } >> %\break << \chordmode { c1 } \new RhythmicStaff { c4 c8 c~ c c c } >> } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Make a new staff occupy the same vertical space as a previous staff
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 } } >> ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user