I'm not sure the writers of LilyPond would call this a bug; it's more of a
design decision I think. But regardless...
One way to deal with the situation is to create a variable and use it
before the grace note (or in the grace block) like this:
%%%
\version "2.24.4"
sdsu = \once { \slurDown \stemUp }
\relative {
\voiceTwo c'8 c c c \sdsu \acciaccatura d c c c c
\voiceTwo c8 c c c \acciaccatura { \sdsu d } c c c c
}
%%%
There may be a better way to do this, but that's what I came up with.
--
Knute Snortum
On Tue, Jul 15, 2025 at 11:51 AM Dirck Nagy <[email protected]> wrote:
> Thanks Knute.
>
> The slur position changes, but stem direction also needs to be changeable,
> without affecting the following (non-grace) notes.
>
> Isn't this a pretty significant bug? I'm not sure how to report this.
>
> Stem direction should almost always point up, even if there is music in
> another voice.
>
> I'm surprised there aren't more issues with this. Grace notes like this
> are very common. Here is an example from Liszt's *Mazeppa . *This
> continues for 22 more measures.
>
>
> A command like "Grace.Up" or a sign such as "^" or "_" in front of
> \acciaccatura would be easiest for the user. It would need to change slur
> and stem direction, and then reset these to match the following non-grace
> notes. Could something be written into Lilypond?
>
> I have no idea how to begin.
>
> thanks
>
> dirck
>
>
> ------------------------------
> *From:* Dirck Nagy <[email protected]>
> *Sent:* Sunday, July 13, 2025 12:00 PM
> *To:* Lilypond-User Mailing List <[email protected]>
> *Subject:* Acciaccatura stem / tie direction
>
> Dear Lilypond
>
> How can I (globally) manipulate the tie / stem direction of acciaccature,
> grace notes, appoggiaturae?
>
> Here are two simplified examples:
>
> The first example (acciaccatura example) is correct
>
>
> The second example uses my simplified piano template. I am unable to get
> the stem direction and tie / slur to display correctly, short of adding
> commands to each individual note.
>
> Is there a problem with my template? Please note that there is no music
> present in any other voice in this example.
>
>
> Changing stem direction also changes the stem direction of the grace note.
>
>
> I have a piece which uses a lot of acciaccature, so changing each of these
> individually would be very time-consuming.
>
> Code for both is at bottom.
>
> Thanks in advance
>
> dirck
>
> *Acciaccatura example:*
>
> \header{
> title = "acciaccatura example"
> }
>
> \relative c''
> {
> c1 \acciaccatura g'8 <g g'>4 g g g
> }
>
> \version "2.22.1"
>
> *Simplified piano template*
> \version "2.22.1"
>
> \header {
>
> title = "simplified piano template"
>
> }
>
>
> global = {
> \key c \major
> \numericTimeSignature
> \time 4/4
>
> }
>
> rightOne = \relative c'' {
> \global
>
> % Music follows here.
> c1 \acciaccatura g'8 <g g'>4 g g g
> }
>
> rightTwo = \relative c'' {
> \global
> % Music follows here.
>
> }
>
> rightThree = \relative c' {
> \global
> % Music follows here.
>
> }
>
> rightFour = \relative c' {
> \global
> % Music follows here.
>
> }
>
> SpacingVoice = \relative c' {
> \global
> % Music follows here.
>
> }
>
> leftOne = \relative c' {
> \global
> % Music follows here.
> s1 s1
> }
>
> leftTwo = \relative c' {
> \global
> % Music follows here.
>
> }
>
> leftThree = \relative c' {
> \global
> % Music follows here.
>
> }
>
> leftFour = \relative c' {
> \global
> % Music follows here.
>
> }
>
> \score {
> \new PianoStaff <<
> \new Staff = "right" \with {
> midiInstrument = "acoustic grand"
> } << \rightOne \\ \rightTwo \\ \rightThree \\ \rightFour \\
> \SpacingVoice >>
> \new Staff = "left" \with {
> midiInstrument = "acoustic grand"
> } { \clef bass << \leftOne \\ \leftTwo \\ \leftThree \\ \leftFour>> }
> >>
>
> }
>
>
>