On Sat, 1 Mar 2025, Gianmaria Lari wrote:

> this code compiles with this message: warning: articulation failed to steal
> 9/320 note backward at beginning of music; stealing forward instead. If I
> understood correctly it's an old bug. But I don't know how to solve it. 

Historical performance practice varied, but it is and was very common for
an acciacatura to be interpreted as taking time from the previous note -
which is impossible when it happens at the very start of the score, as in
your example:

> \score
> {
>   \articulate {\new Staff { \new Voice { \voiceOne \acciaccatura a8 b4} }}
>   \midi {}
> }

"Steal from previous note" is the behaviour Lilypond+articulate.ly
applies.  I think it may actually be native to Lilypond rather than
implemented in articulate.ly.  Either way, the warning is correctly
reporting that you've asked for something impossible, and it's making the
reasonable guess that the time should come from the following note
instead.  I wouldn't regard that as a "bug"; what else could it do that
would be better?

If you want the acciacatura to play before what would otherwise be the
start of the piece, you could add an invisible spacer at the start and
extend the length of the first measure to include it.  Using \partial
would be my first thought but it might create a stray barline; there are
probably more elegant ways to resolve this.

If you want the acciacatura to steal time from the following note just at
the start of the score, while stealing from the previous note if there is
one, then you can leave the code as is and ignore the warning.

If you want acciacature to always steal from the following notes in
general, then maybe you actually want them to be appogiature instead.

If you want the notation that Lilypond calls "acciacatura" but not the
behaviour in MIDI output that Lilypond+articulate.ly applies to that
notation, then you may be stuck with doing what I do:  write two versions
of the music, one for engraving and one for MIDI generation, and use tags
to separate them.  The MIDI version would write out the timing meant to be
actually played, with ordinary notes, rather than depending on
the system to translate grace notes into that timing.

-- 
Matthew Skala
msk...@ansuz.sooke.bc.ca                 People before tribes.
https://ansuz.sooke.bc.ca/

Reply via email to