Home
Random
Log in
Settings
About LilyPond wiki
LilyPond wiki
Search
Editing
Customizing the chord grid style
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
Custom divisions of chord squares can be defined through the <code>measure-division-lines-alist</code> and <code>measure-division-chord-placement-alist</code> properties of <code>ChordSquare</code>. These are both alists. Their keys are measure divisions, namely lists which give the fraction of the measure that each chord (or rest, or skip) represents. More precisely, a measure division alist is made of positive, exact numbers adding up to 1, for example: <code>'(1/2 1/4 1/4)</code>. The exactness requirement means that, e.g., <code>1/2</code> is valid but not <code>0.5</code>. The values in <code>measure-division-lines-alist</code> are lists of lines, which are represented as <code>(</code><code>x1</code><code> </code><code>y1</code><code> </code><code>x2</code><code> </code><code>y2</code><code>)</code>. The line starts at the point <code>(</code><code>x1</code><code> . </code><code>y1</code><code>)</code> and ends at <code>(</code><code>x2</code><code> . </code><code>y2</code><code>)</code>. Coordinates are expressed in the [-1,Β 1] scale relative to the extent of the square. The values in <code>measure-division-chord-placement-alist</code> are lists of <code>(</code><code>x</code><code> . </code><code>y</code><code>)</code> pairs giving the placement of the respective chords. This example defines a peculiar chord grid style that has a rule for measures divided in three equal parts. <lilypond version="2.24.0"> \paper { line-width = 10\cm ragged-right = ##f } \new ChordGrid \with { \override ChordSquare.measure-division-lines-alist = #'(((1) . ()) ((1/3 1/3 1/3) . ((-1 -0.4 0 1) (0 -1 1 0.4)))) \override ChordSquare.measure-division-chord-placement-alist = #'(((1) . ((0 . 0))) ((1/3 1/3 1/3) . ((-0.7 . 0.5) (0 . 0) (0.7 . -0.5)))) } \chordmode { \time 3/4 c2. c4 c4 c4 } </lilypond> [[Category:Chords]] [[Category:Included in the official documentation]]
Summary:
Please note that all contributions to LilyPond wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Meta:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)