Le mercredi 26 avril 2023 à 14:19 -0700, Flaming Hakama by Elaine a écrit :

> Hi, 
> 
> I was trying to use 
> [https://lsr.di.unimi.it/LSR/Snippet?id=529](https://lsr.di.unimi.it/LSR/Snippet?id=529)
> to add some rests to chord symbols
> 
> After using convert-ly it worked as is.
> 
> However, when using this in the context of repeat voltas,   
> chords in the endings appear above the ending lines, 
> rather than below as normal.
> 
> Does anyone have any suggestions for how to get the chord symbols below the 
> ending lines?


Well, the snippet neither adds `Axis_group_engraver` to `ChordNamesRests`, nor 
makes it child of some context with `Axis_group_engraver` like `Staff`. As a 
result, the chord name grobs are at the level of the whole system, like other 
system-level grobs such as volta brackets or rehearsal marks. Actually, they 
are more “system-level” than those, because grobs like volta brackets are moved 
inside the top staff after line breaking.

I don't understand why the snippet has these `VerticalAxisGroup` overrides. 
They have no effect, since there is no `VerticalAxisGroup` in the context.

Try

```
\version "2.24.1"

\layout {
  \context {
    \type Engraver_group
    \name ChordNamesRests
    \description "Typesets chord names."

    \consists Output_property_engraver
    \consists Separating_line_group_engraver
    \consists Chord_name_engraver
    \consists Current_chord_text_engraver
    \consists Rest_engraver
    noChordSymbol = ##f
    \consists Axis_group_engraver
    \override VerticalAxisGroup.staff-affinity = #DOWN
    \override VerticalAxisGroup.remove-first = ##t
    \override VerticalAxisGroup.remove-empty = ##t
  }
  \context {
    \Score
    \accepts ChordNamesRests
  }
}

music = {
  c4 d e d
  f4 r g r
  c,1
}

structure = {
    \repeat volta 2 { 
        s1
    }
    \alternative {
        { s1 }
        { s1 }
    }
}
\score {
  <<
    \new ChordNamesRests {
      \chordmode {
        \override Rest.Y-offset = #1
        \music
      }
    }
    \relative c' <<
        \structure
        \music
    >>
>>
}
```

Regards,

Jean

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to