Re: Bar numbers on Dynamics staff above music
On Mon, 2023-08-28 at 11:27 +0200, Xavier Scheuer wrote: > On Mon, 28 Aug 2023 at 10:17, Richard Shann > wrote: > > > > There are more problems than I thought with your solution- > > here is your example with some higher notes in it - the bar numbers > > leave the staff again: > > Hello, > > Removing "Bar_number_engraver" from the Score context and adding it > to the Staff context (or the first staff with \with if you have more > than one staff) will get the bar numbers onto the staff. > It should give you the same bar number positioning as if the Dynamics > context was not above your staff. > If you have some overrides, change them from the Score context to the > Staff context as well. > > \layout { > \context { > \Score > \remove "Bar_number_engraver" > } > \context { > \Staff % if more than one Staff, use \with for the first Staff > in your \score block > \consists "Bar_number_engraver" > \override BarNumber.break-visibility = #end-of-line-invisible > barNumberVisibility = #(every-nth-bar-number-visible 1) > } > } > Perfect! Thank you so much. Richard > Kind regards, > Xavier >
Re: Bar numbers on Dynamics staff above music
On Mon, 28 Aug 2023 at 10:17, Richard Shann wrote: > > There are more problems than I thought with your solution- > here is your example with some higher notes in it - the bar numbers > leave the staff again: Hello, Removing "Bar_number_engraver" from the Score context and adding it to the Staff context (or the first staff with \with if you have more than one staff) will get the bar numbers onto the staff. It should give you the same bar number positioning as if the Dynamics context was not above your staff. If you have some overrides, change them from the Score context to the Staff context as well. \layout { \context { \Score \remove "Bar_number_engraver" } \context { \Staff % if more than one Staff, use \with for the first Staff in your \score block \consists "Bar_number_engraver" \override BarNumber.break-visibility = #end-of-line-invisible barNumberVisibility = #(every-nth-bar-number-visible 1) } } Kind regards, Xavier -- Xavier Scheuer
Re: Bar numbers on Dynamics staff above music
testing further... On Sun, 2023-08-27 at 07:50 -0700, Knute Snortum wrote: > On Sun, Aug 27, 2023 at 7:31 AM Richard Shann > wrote: > > If I create a Dynamics staff above the music, the bar numbers are > > printed on it rather than on the staff with the music. At least > > this is > > why setting the outside-staff-priority doesn't have any effect. > > Is there a way to get bar numbers onto the staff with the music? > > > > > Here's my MWE, there may be better ways to do this: > > % > \version "2.24" > > dyn = { > s4 s2.\f | > s4 s2.\f | > s4 s2.\f | > } > > mus = { > \override Score.BarNumber.outside-staff-priority = #-500 > \override Score.BarNumber.break-visibility = #end-of-line-invisible > \set Score.barNumberVisibility = #(every-nth-bar-number-visible 1) > \repeat unfold 8 c''8 > \override Score.BarNumber.Y-offset = -1 % <--- here's what's > different > \repeat unfold 16 c''8 > } > > \score { > << > \new Dynamics \dyn > \new Staff \mus > >> > } > % There are more problems than I thought with your solution- here is your example with some higher notes in it - the bar numbers leave the staff again: 44 \version "2.24" dyn = { s4 s2.\f | s4 s2.\f | s4 s2.\f | } mus = { \override Score.BarNumber.outside-staff-priority = #-500 \override Score.BarNumber.break-visibility = #end-of-line-invisible \set Score.barNumberVisibility = #(every-nth-bar-number-visible 1) \override Score.BarNumber.Y-offset = -1 % <--- here's what's different \repeat unfold 8 c''8 \repeat unfold 8 c'''8 \repeat unfold 8 c'8 } \score { << \new Dynamics \dyn \new Staff \mus >> } %% perhaps this is intractable - thank you all the same. Richard
Re: Bar numbers on Dynamics staff above music
On Sun, 2023-08-27 at 07:50 -0700, Knute Snortum wrote: > On Sun, Aug 27, 2023 at 7:31 AM Richard Shann > wrote: > > If I create a Dynamics staff above the music, the bar numbers are > > printed on it rather than on the staff with the music. At least > > this is > > why setting the outside-staff-priority doesn't have any effect. > > Is there a way to get bar numbers onto the staff with the music? > > > > > Here's my MWE, there may be better ways to do this: > > % > \version "2.24" > > dyn = { > s4 s2.\f | > s4 s2.\f | > s4 s2.\f | > } > > mus = { > \override Score.BarNumber.outside-staff-priority = #-500 > \override Score.BarNumber.break-visibility = #end-of-line-invisible > \set Score.barNumberVisibility = #(every-nth-bar-number-visible 1) > \repeat unfold 8 c''8 > \override Score.BarNumber.Y-offset = -1 % <--- here's what's > different > \repeat unfold 16 c''8 > } > > \score { > << > \new Dynamics \dyn > \new Staff \mus > >> > } > % Thank you very much, it seems I simplified too much however: %% \version "2.24" dyn = { c'4 c'\f c' c' c' c' <> \tweak DynamicText.self-alignment-X #LEFT #(make- dynamic-script #{ \markup \normal-text \column {\line{1x \dynamic mp }\line{2x \dynamic mf} }#}) c' c' c' c'\f c' c' } mus = { \repeat unfold 24 c''8 } \score { << \override Score.BarNumber.outside-staff-priority = #-500 \override Score.BarNumber.break-visibility = #end-of-line- invisible \set Score.barNumberVisibility = #(every-nth-bar-number- visible 1) \override Score.BarNumber.Y-offset = -1 << \new Dynamics \dyn \new Staff \mus >> >> } %% Here there is a custom dynamic on two lines (for first and second times) and the bar numbers leave the staff again. Richard. > > -- > Knute Snortum > > >
Re: Bar numbers on Dynamics staff above music
On Sun, Aug 27, 2023 at 7:31 AM Richard Shann wrote: > If I create a Dynamics staff above the music, the bar numbers are > printed on it rather than on the staff with the music. At least this is > why setting the outside-staff-priority doesn't have any effect. > Is there a way to get bar numbers onto the staff with the music? > Here's my MWE, there may be better ways to do this: % \version "2.24" dyn = { s4 s2.\f | s4 s2.\f | s4 s2.\f | } mus = { \override Score.BarNumber.outside-staff-priority = #-500 \override Score.BarNumber.break-visibility = #end-of-line-invisible \set Score.barNumberVisibility = #(every-nth-bar-number-visible 1) \repeat unfold 8 c''8 \override Score.BarNumber.Y-offset = -1 % <--- here's what's different \repeat unfold 16 c''8 } \score { << \new Dynamics \dyn \new Staff \mus >> } % -- Knute Snortum