Peter
Peter

Reputation: 854

Lilypond displays chords over every bar

According to Lilypond's documentation, you can choose to only have chords displayed when they change. I cannot get this behaviour. Here is the snippet:

\new ChordNames  {
        \chordmode {
            d1:7 d1:7 
        }
  }

Here is the alternate snippet:

\new ChordNames  {
        \chordmode {
            d1:7 d:7 
        }
  }

In both cases Lilypond displays the chord names above both bars. This is the same throughout the score. I cannot get it to not display repeat chord names.

Any ideas?

Upvotes: 6

Views: 833

Answers (2)

tohuwawohu
tohuwawohu

Reputation: 13618

I think you've missed to set chordChanges to true. The example in the LilyPond docs is:

1    harmonies = \chordmode {
2      c1:m c:m \break c:m c:m d
3    }
4    <<
5      \new ChordNames {
6        \set chordChanges = ##t
7        \harmonies
8      }
9      \new Staff {
10        \relative c' { \harmonies }
11     }
12   >>

In this example, line 6 is essential to display chords only on chord changes:

\set chordChanges = ##t

So, you need to add this command to your lilypond source code.

Upvotes: 2

gilbertohasnofb
gilbertohasnofb

Reputation: 2054

You need to use \set chordChanges = ##t. Try this snippet:

\new ChordNames  {
    \chordmode {
        \set chordChanges = ##t
        d1:7 d1:7 
    }
}

Upvotes: 3

Related Questions