Jump to content

Controlling the placement of chord fingerings: Difference between revisions

From LilyPond wiki
No edit summary
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 24: Line 24:
</lilypond>
</lilypond>


[[Category:Chords]]
[[Category:Editorial annotations]]
[[Category:Expressive marks]]
[[Category:Expressive marks]]
[[Category:Editorial annotations]]
[[Category:Fretted strings]]
[[Category:Keyboards]]
[[Category:Specific notation]]
[[Category:Specific notation]]
[[Category:Keyboards]]
[[Category:Included in the official documentation]]
[[Category:Chords]]
[[Category:Snippet]]
[[Category:Fretted strings]]
[[Category:Included in the official documentation]][[Category:Snippet]]

Latest revision as of 18:52, 11 December 2025

The placement of fingering numbers can be controlled precisely by using the property fingeringOrientation. For fingering orientation to apply, the fingering command must be used within a chord construct (<...>), even for single notes. Orientation for string numbers and right-hand fingerings may be controlled in a similar way by using the properties stringNumberOrientation and strokeFingerOrientation, respectively.

These properties can be set to a list of one to three values. They control whether fingerings may be placed above (if up appears in the list), below (if down appears), to the left (if left appears), or to the right (if right appears). Conversely, if a location is not listed, no fingering is placed there. LilyPond takes these constraints and works out the best placement for the fingering of the notes of the following chords. Note that left and right are mutually exclusive – fingerings may be placed only on one side or the other, not both.

\version "2.24"

\relative c' {
  \set fingeringOrientations = #'(left)
  <c-1 e-3 a-5>4
  \set fingeringOrientations = #'(down)
  <c-1 e-3 a-5>4
  \set fingeringOrientations = #'(down right up)
  <c-1 e-3 a-5>4
  \set fingeringOrientations = #'(up)
  <c-1 e-3 a-5>4
  \set fingeringOrientations = #'(left)
  <c-1>2
  \set fingeringOrientations = #'(down)
  <e-3>2
  \set stringNumberOrientations = #'(up left down)
  <f\3 a\2 c\1>1
  \set strokeFingerOrientations = #'(down right up)
  <c\rightHandFinger 1 e\rightHandFinger 2 c'\rightHandFinger 4 >
}