Jump to content

Moving dotted notes in polyphony: Difference between revisions

From LilyPond wiki
m New category
mNo edit summary
 
Line 1: Line 1:
When a dotted note in the upper voice is moved to avoid a collision with a note in another voice, the default is to move the upper note to the right. This behaviour can be over-ridden by using the <code>prefer-dotted-right</code> property of <code>NoteCollision</code>.
When a dotted note in the upper voice is moved to avoid a collision with a note in another voice, the default is to move the upper note to the right. This behaviour can be changed setting the <code>prefer-dotted-right</code> property of the <code>NoteCollision</code> grob.


<lilypond version="2.24">
<lilypond version="2.24">
Line 15: Line 15:
</lilypond>
</lilypond>


[[Category:Included in the official documentation]]
[[Category:Rhythms]]
[[Category:Rhythms]]
[[Category:Simultaneous notes]]
[[Category:Simultaneous notes]]
[[Category:Tweaks and overrides]]
[[Category:Tweaks and overrides]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]
[[Category:Snippet]]

Latest revision as of 15:28, 12 January 2026

When a dotted note in the upper voice is moved to avoid a collision with a note in another voice, the default is to move the upper note to the right. This behaviour can be changed setting the prefer-dotted-right property of the NoteCollision grob.

\version "2.24"

\new Staff \relative c' <<
  { 
    f2. f4
    \override Staff.NoteCollision.prefer-dotted-right = ##f
    f2. f4
    \override Staff.NoteCollision.prefer-dotted-right = ##t
    f2. f4
  }
  \\
  { e4 e e e e e e e e e e e }
>>