Jump to content

Avoiding collision in single staff polyphony: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
Line 1: Line 1:
When you typeset some polyphonic music on a single staff, especially when you have different dotted note heads, you sometimes meet collision between note heads, and don't want them to merge automatically. Using <code>\override NoteColumn #'force-hshift = #X.Y</code> allows you to separate these colliding note heads, inserting the appropriate amount of blank space (X.Y) between them.
When you typeset some polyphonic music on a single staff, especially when you have different dotted note heads, you sometimes meet collision between note heads, and don't want them to merge automatically. Using <code>\override NoteColumn #'force-hshift = #X.Y</code> allows you to separate these colliding note heads, inserting the appropriate amount of blank space (X.Y) between them.


<lilypond version="2.24.0">
<lilypond version="2.24">
%% http://lsr.di.unimi.it/LSR/Item?id=618
%% http://lsr.di.unimi.it/LSR/Item?id=618



Revision as of 18:54, 16 November 2025

When you typeset some polyphonic music on a single staff, especially when you have different dotted note heads, you sometimes meet collision between note heads, and don't want them to merge automatically. Using \override NoteColumn #'force-hshift = #X.Y allows you to separate these colliding note heads, inserting the appropriate amount of blank space (X.Y) between them.

\version "2.24"

%% http://lsr.di.unimi.it/LSR/Item?id=618

\relative c' {
  \clef alto
  \time 3/2
  d4 e f g a f << { d2 (cis4) } \\ { <a e'>2. } >> d2. \bar "||" 
  d4 e f g a f << 
    { \once \override NoteColumn.force-hshift = #1.3 d2( cis4) } 
    \\ 
    { <a e'>2. } 
  >> d2. 
  \bar "|."
}