I think I figured out a (much!) better solution to the below:

On Wed, 3 Dec 2025, Kieren MacMillan wrote:

> I wonder if this is something that could be done (a) more automatically,
> and (b) without the need for a “hack” like \partial 1024 s1024…? Maybe
> someone out there with a better understanding of Lilypond “under the hood”
> can come up with something even more elegant.
>

On Thu, 4 Dec 2025, Gabriel Ellsworth wrote:

> Yes, I agree, Kieren. I’m probably not the only engraver of written-out
> Anglican chant psalms who would benefit from a more automatic process,
> whereby accidentals reset/change at any and every bar line, even in
> \cadenzaOn mode. And there might be other styles of music for which this
> is relevant, too.
>
> The style choral-cautionary is brilliant, and I want to keep using it!
>

My proposed solution does not use \cadenzaOn. Instead, this approach
uses a hidden
time signature for each measure of unmetered music and a Devnull context
that can apply changes of the (omitted) time signatures across all voices
in the score.

Thoughts on the following?

[image: image.png]

%%%  SNIPPET BEGINS
\version "2.24.4"


*%% Define a variable that will go in a Devnull context: *time = {
  \time 4/4 s4*4
  \time 10/4 s4*10
  \time 3/4 s4*3
  \time 2/4 s4*2
}



*%% Sample music based on the snippet at %
https://lilypond.org/doc/v2.24/Documentation/notation/displaying-rhythms#unmetered-music
<https://lilypond.org/doc/v2.24/Documentation/notation/displaying-rhythms#unmetered-music>*soprano
= \relative c'' {
  % Show all bar numbers:
  \override Score.BarNumber.break-visibility = #all-visible
  c4 d e d |

*  % It is good hygiene to use barchecks in this approach*  c4 cis d8[ d d]
f4 g4. d4 e d c |
  fis, gis a |
  g f |
}


*%% This voice will also get \time applied to it: *bass = \relative c {
  \clef bass
  \repeat unfold 4 { c } |
  \repeat unfold 10 { d } |
  e e g |
  \repeat unfold 2 { f } |
}

\score {
  \new ChoirStaff <<

*    \new Devnull \time*    \new Staff \new Voice \soprano
    \new Staff \new Voice \bass
  >>
}

\layout {
  \context {
    \Staff

*    \omit TimeSignature*  }
  \context {
    \ChoirStaff

*    \accidentalStyle choral-cautionary % works!*  }
}

%%%  SNIPPET ENDS

Reply via email to