Le 28/05/2022 à 03:19, Ahanu Banerjee a écrit :
Hello,
In lilypond 2.20.0, I was able to use "afterGrace" like this:
\version "2.20.0"
\language "english"
\relative c' { d2 \afterGrace 4 { cs16 d } }
However, this now presents an error: "warning: \afterGrace exceeds
duration of main argument". Running ly-convert does not fix it.
What version did you upgrade to? For me, this throws a different
error in 2.22 and 2.23.9:
/tmp/frescobaldi-y8ru8zd4/tmppz87jisz/document.ly:4:44: error: syntax
error, unexpected '}', expecting \header
\relative c' { d2 \afterGrace 4 { cs16 d }
}
/tmp/frescobaldi-y8ru8zd4/tmppz87jisz/document.ly:4:1: error: errors
found, ignoring music expression
\relative c' { d2 \afterGrace 4 { cs16 d } }
fatal error: failed files:
"/tmp/frescobaldi-y8ru8zd4/tmppz87jisz/document.ly"
If I change "\aftergrace 4" to "\aftergrace d4", it works fine.
However, I have multiple documents written with the aforementioned
syntax, and it would take a long time to fix them manually. Any
suggestions?
My understanding is that this broke with this change in
the LilyPond sources:
commit 027538606b016afb643555d654cefaee94dfb424
Author: David Kastrup <[email protected]>
Date: Wed May 23 19:08:31 2018 +0200
Issue 5327/4: Let \afterGrace and \scaleDurations take a scale
That's more versatile than allowing just a fraction as a pair
as previously.
The problem is that the naked '4' is now being taken as
an optional argument to \afterGrace, which is a customized
value for afterGraceFraction.
If you don't want to fix your files manually, you could
add a redefinition of \afterGrace that doesn't have
this optional argument, like this:
\version "2.22.2"
afterGrace = \afterGrace \afterGraceFraction \etc
\language "english"
\relative c' { d2 \afterGrace 4 { cs16 d } }
Best,
Jean