Hi Valentin,
> if you want you could tell Lilypond to ignore Accidentals in spacing
In concept, I love this idea… However it doesn’t work 100%:
%%% SNIPPET BEGINS
\version "2.25.11"
\language "english"
\layout {
line-width = 3.5\in
ragged-right = ##f
}
ignoreH =
\propertyTweak horizontal-skylines ##f
\propertyTweak extra-spacing-width #empty-interval
\etc
ignoreV =
\propertyTweak vertical-skylines ##f
\propertyTweak extra-spacing-height #empty-interval
\etc
ignore = \ignoreH \ignoreV \etc
accidentalNoWidth =
\override Accidental.extra-spacing-width =
#(lambda (grob)
(let ((ext (ly:grob-property grob 'X-extent)))
(display ext)
(cons (interval-length ext) 0)))
\markup "No accidentals:"
\new Staff \with { \remove Accidental_engraver } <<
\clef bass \key bf \major
\voices 1,2 <<
{ f8 f g! f f f f a } \\
{ bf,8 f e-\tweak extra-offset #'(0.05 . 0) _\markup \with-color #red
\with-dimensions-from \null \draw-line #'(0 . -48) ef d c bf, c }
>>
>>
\markup "No tweaks:"
\new Staff <<
\clef bass \key bf \major
\voices 1,2 <<
{ f8 f g! f f f f a } \\
{ bf,8 f e ef d c bf, c }
>>
>>
\markup "Using \accidentalNoWidth:"
\new Staff <<
\clef bass \key bf \major
\voices 1,2 <<
{ f8 f \once\accidentalNoWidth g! f f f f a } \\
{ bf,8 f \once\accidentalNoWidth e! \once\accidentalNoWidth ef d c bf, c }
>>
>>
\markup "Using \ignore:"
\new Staff <<
\clef bass \key bf \major
\voices 1,2 <<
{ f8 f \once \ignore Accidental g! f f f f a } \\
{ bf,8 f \once \ignore Accidental e! \once \ignore Accidental ef d c bf, c }
>>
>>
%%% SNIPPET BEGINS
As you can see:
1. \accidentalNoWidth doesn’t allow the notes to obtain “no accidental”
spacing, but at least keeps the accidentals uncrushed
2. \ignore allows the notes to obtain “no accidental” spacing, but everything
gets crushed requiring manual tweaking to reposition;
Is there a way to get the best of both worlds?
Thanks,
Kieren.
______________________________________________
My work day may look different than your work day. Please do not feel obligated
to read or respond to this email outside of your normal working hours.