Skip to main content
Include note about VerticalAxisGroup being a possible solution.
Source Link
Neal
  • 3.5k
  • 1
  • 13
  • 30

Suppose I have one melody line that is repeated (e.g., singing multiple verses), but the chords should be different the second and third times through. I want these to be defined in their own variables in LilyPond:

melody = \relative c' { ... }
chords_a = \chordmode { ... }
chords_b = \chordmode { ... }
chords_c = \chordmode { ... }

Now, with multiple ChordNames contexts, that can use a lot of vertical space:

\score { <<
  \new ChordNames \chords_a
  \new ChordNames \chords_b
  \new ChordNames \chords_c
  \new Staff \melody
>> }

ChordNames, stacked on top of each other

What I'm looking to do instead is something like this:

ChordNames, stacked side-by-side

I am able to do this part of the way:

\score { <<
   \new ChordNames \chords_a
   \new ChordNames \with {
     \override ChordName.font-size
     \override ChordName.X-offset
     \override ChordName.Y-offset
   } \chords_b
   \new ChordNames ...
>> }

ChordNames, moved somewhat

(Modifying the VerticalAxisGroup, instead, might be the key here.)

I was able to achieve it more fully, however, by using a Lyrics context instead of ChordNames and manually entering the chord properties as markup (code simplified here):

chord_kludge_a = \lyricmode {
  \markup {
    C
    \column {
      B♭
      D
    }
  }1
}
chord_kludge_b = ...
chord_kludge_c = ...

chord_kludge_collection = {
  \chord_kludge_a 
  \chord_kludge_b
  \chord_kludge_c
}

\score { <<
  \new Lyrics \chord_kludge_collection
  \new Staff \melody
>> }

Lyrics and melody

But in doing so, it (1) is manually laborious, and (2) lacks the flexibility of regular ChordName functions, like transpositions and alternative chords (e.g., redefining all augmented chords to read aug rather than +).

Is there any possible way to keep all the chords in their own variables, yet display them in a single context, where one is normal-sized on the left, and two more are smaller and stacked, one on top of the other, on the right? I am expecting thatbelieve the closest way to do it is by modifying the VerticalAxisGroup, but my knowledge of its properties and keys is limited mostly to guessing and trial-and-error. (Moreover, if Scheme will beis involved, but my knowledge of it, too, is scanteven more scant.)

Suppose I have one melody line that is repeated (e.g., singing multiple verses), but the chords should be different the second and third times through. I want these to be defined in their own variables in LilyPond:

melody = \relative c' { ... }
chords_a = \chordmode { ... }
chords_b = \chordmode { ... }
chords_c = \chordmode { ... }

Now, with multiple ChordNames contexts, that can use a lot of vertical space:

\score { <<
  \new ChordNames \chords_a
  \new ChordNames \chords_b
  \new ChordNames \chords_c
  \new Staff \melody
>> }

ChordNames, stacked on top of each other

What I'm looking to do instead is something like this:

ChordNames, stacked side-by-side

I am able to do this part of the way:

\score { <<
   \new ChordNames \chords_a
   \new ChordNames \with {
     \override ChordName.font-size
     \override ChordName.X-offset
     \override ChordName.Y-offset
   } \chords_b
   \new ChordNames ...
>> }

ChordNames, moved somewhat

I was able to achieve it more fully, however, by using a Lyrics context instead of ChordNames and manually entering the chord properties as markup (code simplified here):

chord_kludge_a = \lyricmode {
  \markup {
    C
    \column {
      B♭
      D
    }
  }1
}
chord_kludge_b = ...
chord_kludge_c = ...

chord_kludge_collection = {
  \chord_kludge_a 
  \chord_kludge_b
  \chord_kludge_c
}

\score { <<
  \new Lyrics \chord_kludge_collection
  \new Staff \melody
>> }

Lyrics and melody

But in doing so, it (1) is manually laborious, and (2) lacks the flexibility of regular ChordName functions, like transpositions and alternative chords (e.g., redefining all augmented chords to read aug rather than +).

Is there any possible way to keep all the chords in their own variables, yet display them in a single context, where one is normal-sized on the left, and two more are smaller and stacked, one on top of the other, on the right? I am expecting that Scheme will be involved, but my knowledge of it is scant.

Suppose I have one melody line that is repeated (e.g., singing multiple verses), but the chords should be different the second and third times through. I want these to be defined in their own variables in LilyPond:

melody = \relative c' { ... }
chords_a = \chordmode { ... }
chords_b = \chordmode { ... }
chords_c = \chordmode { ... }

Now, with multiple ChordNames contexts, that can use a lot of vertical space:

\score { <<
  \new ChordNames \chords_a
  \new ChordNames \chords_b
  \new ChordNames \chords_c
  \new Staff \melody
>> }

ChordNames, stacked on top of each other

What I'm looking to do instead is something like this:

ChordNames, stacked side-by-side

I am able to do this part of the way:

\score { <<
   \new ChordNames \chords_a
   \new ChordNames \with {
     \override ChordName.font-size
     \override ChordName.X-offset
     \override ChordName.Y-offset
   } \chords_b
   \new ChordNames ...
>> }

ChordNames, moved somewhat

(Modifying the VerticalAxisGroup, instead, might be the key here.)

I was able to achieve it more fully, however, by using a Lyrics context instead of ChordNames and manually entering the chord properties as markup (code simplified here):

chord_kludge_a = \lyricmode {
  \markup {
    C
    \column {
      B♭
      D
    }
  }1
}
chord_kludge_b = ...
chord_kludge_c = ...

chord_kludge_collection = {
  \chord_kludge_a 
  \chord_kludge_b
  \chord_kludge_c
}

\score { <<
  \new Lyrics \chord_kludge_collection
  \new Staff \melody
>> }

Lyrics and melody

But in doing so, it (1) is manually laborious, and (2) lacks the flexibility of regular ChordName functions, like transpositions and alternative chords (e.g., redefining all augmented chords to read aug rather than +).

Is there any possible way to keep all the chords in their own variables, yet display them in a single context, where one is normal-sized on the left, and two more are smaller and stacked, one on top of the other, on the right? I believe the closest way to do it is by modifying the VerticalAxisGroup, but my knowledge of its properties and keys is limited mostly to guessing and trial-and-error. (Moreover, if Scheme is involved, my knowledge of it, too, is even more scant.)

Add detail about trying ChordMode overrides. Remove Unicode superscript 7, as it does not show properly on mobile app.
Source Link
Neal
  • 3.5k
  • 1
  • 13
  • 30

Suppose I have one melody line that is repeated (e.g., singing multiple verses), but the chords should be different the second and third times through. I want these to be defined in their own variables in LilyPond:

melody = \relative c' { ... }
chords_a = \chordmode { ... }
chords_b = \chordmode { ... }
chords_c = \chordmode { ... }

Now, with multiple ChordNames contexts, that can use a lot of vertical space:

\score { <<
  \new ChordNames \chords_a
  \new ChordNames \chords_b
  \new ChordNames \chords_c
  \new Staff \melody
>> }

ChordNames, stacked on top of each other

What I'm looking to do instead is something like this:

ChordNames, stacked side-by-side

I am able to do this part of the way:

\score { <<
   \new ChordNames \chords_a
   \new ChordNames \with {
     \override ChordName.font-size
     \override ChordName.X-offset
     \override ChordName.Y-offset
   } \chords_b
   \new ChordNames ...
>> }

ChordNames, moved somewhat

I was able to achieve it more fully, however, by using a Lyrics context instead of ChordNames and manually entering the chord properties as markup (code simplified here):

chord_kludge_a = \lyricmode {
  \markup {
    C⁷C
    \column {
      B♭⁷B♭
      D⁷D
    }
  }1
}
chord_kludge_b = ...
chord_kludge_c = ...

chord_kludge_collection = {
  \chord_kludge_a 
  \chord_kludge_b
  \chord_kludge_c
}

\score { <<
  \new Lyrics \chord_kludge_collection
  \new Staff \melody
>> }

Lyrics and melody

But in doing so, it (1) is manually laborious, and (2) lacks the flexibility of regular ChordName functions, like transpositions and alternative chords (e.g., redefining all augmented chords to read aug rather than +).

Is there any possible way to keep all the chords in their own variables, yet display them in a single context, where one is normal-sized on the left, and two more are smaller and stacked, one on top of the other, on the right? I am expecting that Scheme will be involved, but my knowledge of it is scant.

Suppose I have one melody line that is repeated (e.g., singing multiple verses), but the chords should be different the second and third times through. I want these to be defined in their own variables in LilyPond:

melody = \relative c' { ... }
chords_a = \chordmode { ... }
chords_b = \chordmode { ... }
chords_c = \chordmode { ... }

Now, with multiple ChordNames contexts, that can use a lot of vertical space:

\score { <<
  \new ChordNames \chords_a
  \new ChordNames \chords_b
  \new ChordNames \chords_c
  \new Staff \melody
>> }

ChordNames, stacked on top of each other

What I'm looking to do instead is something like this:

ChordNames, stacked side-by-side

I was able to achieve it by using a Lyrics context instead of ChordNames and manually entering the chord properties as markup (code simplified here):

chord_kludge_a = \lyricmode {
  \markup {
    C⁷
    \column {
      B♭⁷
      D⁷
    }
  }1
}
chord_kludge_b = ...
chord_kludge_c = ...

chord_kludge_collection = {
  \chord_kludge_a 
  \chord_kludge_b
  \chord_kludge_c
}

\score { <<
  \new Lyrics \chord_kludge_collection
  \new Staff \melody
>> }

Lyrics and melody

But in doing so, it (1) is manually laborious, and (2) lacks the flexibility of regular ChordName functions, like transpositions and alternative chords (e.g., redefining all augmented chords to read aug rather than +).

Is there any possible way to keep all the chords in their own variables, yet display them in a single context, where one is normal-sized on the left, and two more are smaller and stacked, one on top of the other, on the right? I am expecting that Scheme will be involved, but my knowledge of it is scant.

Suppose I have one melody line that is repeated (e.g., singing multiple verses), but the chords should be different the second and third times through. I want these to be defined in their own variables in LilyPond:

melody = \relative c' { ... }
chords_a = \chordmode { ... }
chords_b = \chordmode { ... }
chords_c = \chordmode { ... }

Now, with multiple ChordNames contexts, that can use a lot of vertical space:

\score { <<
  \new ChordNames \chords_a
  \new ChordNames \chords_b
  \new ChordNames \chords_c
  \new Staff \melody
>> }

ChordNames, stacked on top of each other

What I'm looking to do instead is something like this:

ChordNames, stacked side-by-side

I am able to do this part of the way:

\score { <<
   \new ChordNames \chords_a
   \new ChordNames \with {
     \override ChordName.font-size
     \override ChordName.X-offset
     \override ChordName.Y-offset
   } \chords_b
   \new ChordNames ...
>> }

ChordNames, moved somewhat

I was able to achieve it more fully, however, by using a Lyrics context instead of ChordNames and manually entering the chord properties as markup (code simplified here):

chord_kludge_a = \lyricmode {
  \markup {
    C
    \column {
      B♭
      D
    }
  }1
}
chord_kludge_b = ...
chord_kludge_c = ...

chord_kludge_collection = {
  \chord_kludge_a 
  \chord_kludge_b
  \chord_kludge_c
}

\score { <<
  \new Lyrics \chord_kludge_collection
  \new Staff \melody
>> }

Lyrics and melody

But in doing so, it (1) is manually laborious, and (2) lacks the flexibility of regular ChordName functions, like transpositions and alternative chords (e.g., redefining all augmented chords to read aug rather than +).

Is there any possible way to keep all the chords in their own variables, yet display them in a single context, where one is normal-sized on the left, and two more are smaller and stacked, one on top of the other, on the right? I am expecting that Scheme will be involved, but my knowledge of it is scant.

Source Link
Neal
  • 3.5k
  • 1
  • 13
  • 30

LilyPond - How do I create a ChordName context that can stack or show multiple ChordNames simultaneously?

Suppose I have one melody line that is repeated (e.g., singing multiple verses), but the chords should be different the second and third times through. I want these to be defined in their own variables in LilyPond:

melody = \relative c' { ... }
chords_a = \chordmode { ... }
chords_b = \chordmode { ... }
chords_c = \chordmode { ... }

Now, with multiple ChordNames contexts, that can use a lot of vertical space:

\score { <<
  \new ChordNames \chords_a
  \new ChordNames \chords_b
  \new ChordNames \chords_c
  \new Staff \melody
>> }

ChordNames, stacked on top of each other

What I'm looking to do instead is something like this:

ChordNames, stacked side-by-side

I was able to achieve it by using a Lyrics context instead of ChordNames and manually entering the chord properties as markup (code simplified here):

chord_kludge_a = \lyricmode {
  \markup {
    C⁷
    \column {
      B♭⁷
      D⁷
    }
  }1
}
chord_kludge_b = ...
chord_kludge_c = ...

chord_kludge_collection = {
  \chord_kludge_a 
  \chord_kludge_b
  \chord_kludge_c
}

\score { <<
  \new Lyrics \chord_kludge_collection
  \new Staff \melody
>> }

Lyrics and melody

But in doing so, it (1) is manually laborious, and (2) lacks the flexibility of regular ChordName functions, like transpositions and alternative chords (e.g., redefining all augmented chords to read aug rather than +).

Is there any possible way to keep all the chords in their own variables, yet display them in a single context, where one is normal-sized on the left, and two more are smaller and stacked, one on top of the other, on the right? I am expecting that Scheme will be involved, but my knowledge of it is scant.