6

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?

tohuwawohu
  • 13,268
  • 4
  • 42
  • 61
Peter
  • 854
  • 10
  • 19

2 Answers2

3

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

\new ChordNames  {
    \chordmode {
        \set chordChanges = ##t
        d1:7 d1:7 
    }
}
gilbertohasnofb
  • 1,984
  • 16
  • 28
  • Thanks both of you. I think the example given in the documentation was unnecessarily complex, with the use of a variable. Since I wasn't using a variable I didn't copy that part of the snippet and that was my problem. Thanks again! – Peter Apr 06 '15 at 11:29
  • @user1753389, as a good StackOverflow citizen, please be sure to accept the answer that helped you the most. Thanks! – Owen S. Jul 16 '15 at 05:58
  • @Owen S. -- how do I do that? Not sure what you mean by "accept the answer". – Peter Jul 17 '15 at 08:11
  • See http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work . Thanks! – Owen S. Jul 21 '15 at 17:25
2

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.

tohuwawohu
  • 13,268
  • 4
  • 42
  • 61