We are so close!  I used

  \override Score.SpacingSpanner.strict-note-spacing = ##t
  \newSpacingSection

to start the strict spacing and

  \override Score.SpacingSpanner.strict-note-spacing = ##f
  \newSpacingSection

to stop it.  Now the only thing that remains is that one of the left hand
bars lines is too close to the notes.  I have attached the new source code
and a PNG of its output.

--
Knute Snortum

On Wed, Aug 2, 2023 at 8:51 PM William Rehwinkel <
will...@williamrehwinkel.net> wrote:

> Dear Knute,
>
> Substituting the following for the score context may result in more of
> what you are looking for.
>
> \context {
>       \Score
>       \remove Timing_translator
>       \override SpacingSpanner.strict-note-spacing = ##t
>     }
> % ...
> }
>
> However, it will probably not be ideal to have the entire score rendered
> in this way. I couldn't figure out how to enable strict note spacing for
> this cadenza and disable afterwards
>
\version "2.24.0"
\language "english"

global = {
  \key df \major
  \time 3/4
}

rightHand = \relative {
  \global
  af''8 bf af g af \ottava 1 f''(\noBeam |
  \cadenzaOn
  \override Score.SpacingSpanner.strict-note-spacing = ##t
  \newSpacingSection
  \scaleDurations 3/4 { \magnifyMusic 0.63 {
    ef8[ df c bf af gf f ef \ottava 0 df c bf af gf f ef df c bf a c bf f gf c,]
  } }
  \cadenzaOff
  \override Score.SpacingSpanner.strict-note-spacing = ##f
  \newSpacingSection
  \bar "|"
  df2) r4 |
  \bar "|."
}

leftHand = \relative {
  \global
  df'4 <f af> r | 
  \clef bass gf,,4 \clef treble <df'' ef bf'> r |
  R2. |
  \clef bass af,4 <gf' af> q |
  df,4 <f' af f'> r |
  \bar "|."
}

\score {
  \new PianoStaff <<
    \new Staff \rightHand
    \new Staff \leftHand
  >>
  \layout {
    \context {
      \Score
      \remove Timing_translator
    }
    \context { 
      \Staff
      \consists Timing_translator
    }
  }
}

Reply via email to