Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lilypond displays chords over every bar

Tags:

lilypond

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?

like image 922
Peter Avatar asked Apr 05 '15 22:04

Peter


2 Answers

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

\new ChordNames  {
    \chordmode {
        \set chordChanges = ##t
        d1:7 d1:7 
    }
}
like image 66
gilbertohasnofb Avatar answered Dec 31 '22 19:12

gilbertohasnofb


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.

like image 34
tohuwawohu Avatar answered Dec 31 '22 20:12

tohuwawohu