Le jeudi 23 février 2023 à 15:13 +0100, mi...@orbelanet.com a écrit :
> Good morning,
> 
> I have 2 question related to spacing in lilypond:
> 
> 1. How to avoid the excessive gap that forms between the sixteenth notes  
> (marked in green in ttached image) due to chords?

Use

```
\override ChordName.extra-spacing-width = #'(+inf.0 . -inf.0)
```

See the documentation page 
[here](https://lilypond.org/doc/v2.24/Documentation/notation/adjusting-horizontal-spacing-for-specific-layout-objects).


> 2. How to avoid the collision between the number 3 of the triplet and  
> the slur (marked in green in ttached image)?

You could tweak the padding a bit. Giving:

```
\version "2.24.0"
global = { \key g \minor \tempo 4 = 90 \time 2/4 }
voiceI = \relative {
   \repeat volta 2 {
     % mes.1
     g'16 bes a bes g bes a bes a c b c a c b c |
     a c b c a c b c bes d cis d bes d cis d | \break
     % mes.5
     b d cis d b d cis d c ees d ees c ees d ees d a'( fis d c) a( bes c 
d) d,( ees e f fis g aes) | \break
}
}
voiceII = \relative {
   \repeat volta 2 {
     % mes.1
     g4 a8( bes c4)~ c16 ees( d ees c4.) d8( bes4)~ bes16 d( g fis |
     % mes.5
     g4~) \tweak TupletBracket.padding 2 \tuplet 3/2 { g8 fis( f } ees4~) 
\tweak TupletBracket.padding 2 \tuplet 3/2 { ees8 d( cis } 
d16) ees( d cis d) c( bes a d) d( cis c b bes a aes) |
}
}
melody = \relative {
   <<
     { \voiceI }
     \\
     { \voiceII }
   >>
}

harmonies = \chords {
   \set minorChordModifier = \markup { "-" }
   g2:m d:7/a s g:m/bes
   g:7/b c:m d:7 g4:m d:aug7
}

\score {
   \new Staff
   <<
     \harmonies
     \new Voice {
       \global
       \melody
     }
   >>
   \layout {
     \context {
       \Staff
       \accepts ChordNames
     }
     \context {
       \ChordNames
       \remove Axis_group_engraver
       \override ChordName.outside-staff-priority = 500
       \override ChordName.direction = #DOWN
       \override ChordName.outside-staff-padding = 0.5
       \override ChordName.extra-spacing-width = #'(+inf.0 . -inf.0)
     }
   }
}
```

Note that I chose to rename your variables "voiceOne" and "voiceTwo" because 
these are also the names of predefined LilyPond commands.

Best,

Jean

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

Reply via email to