On Tue, Mar 17, 2026 at 4:21 PM Knute Snortum <[email protected]> wrote:

> Hello everyone,
>
> I need to control staff to staff spacing by system and I can do that (as
> the documentation states) by separating the breaks into their own voice and
> using the line-break-system-details of the NonMusicalPaperColumn. However,
> this is a mouthful:
>
> \once \override
>     Score
>     .NonMusicalPaperColumn
>     .line-break-system-details
>     = #'((Y-offset . 30)
>          (alignment-distances . (15)))
>
> So I am trying to create a music function where I only need to pass the
> Y-offset and alignment-distances (I just need one), but the function isn't
> working.  It doesn't throw an error, but it has no effect. I'm
> hoping someone can correct my error.  Here is the code I'm using:
>
> %%% Start
> \version "2.24.4"
>
> staffStaffSpacing =
> #(define-music-function (off dist) (number? number?)
>    #{
>       \once \override
>         Score
>         .NonMusicalPaperColumn
>         .line-break-system-details
>         = #'((Y-offset . off)
>              (alignment-distances . (dist)))
>    #})
>
> rightHand = \relative {
>   \repeat unfold 16 { c'1 }
> }
>
> leftHand = \relative {
>   \clef bass
>   \repeat unfold 16 { c1 }
> }
>
> forceBreaks = {
>   s1*8 \break
>   \staffStaffSpacing #30 #15
>   s1*8
> }
>
> \score {
>   \new PianoStaff <<
>     \new Staff \rightHand
>     \new Staff \leftHand
>     \new Devnull \forceBreaks
>   >>
> }
> %%% End
>

Hi Knute,

overrideLBSD =
#(define-music-function (y-offset distances) (number? list?)
  #{
    \overrideProperty
    Score.NonMusicalPaperColumn.line-break-system-details.Y-offset #y-offset
    \overrideProperty

Score.NonMusicalPaperColumn.line-break-system-details.alignment-distances
#distances
  #})

Call \overrideLBSD #20 #'(32 32 32).

HTH.

-- 
Trevor Bača
www.trevorbaca.com
soundcloud.com/trevorbaca

Reply via email to