Jump to content

Suppressing warnings for clashing note columns: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
If notes from two voices with stems in the same direction are placed at the same position, and both voices have no shift or the same shift specified, the error message <code>warning: ignoring too many clashing note columns</code> will appear when compiling the LilyPond file. This message can be suppressed by setting the <code>'ignore-collision</code> property of the <code>NoteColumn</code> object to <code>#t</code>. Please note that this does not just suppress warnings but stops LilyPond trying to resolve collisions at all and so may have unintended results unless used with care.
If notes from two voices with stems in the same direction are placed at the same position, and both voices have no shift or the same shift specified, the error message “warning: ignoring too many clashing note columns” appears when compiling the LilyPond file. This message can be suppressed by setting the <code>ignore-collision</code> property of the <code>NoteColumn</code> object to <code>#t</code>. Please note that this does not just suppress warnings but stops LilyPond trying to resolve collisions at all and so may have unintended results unless used with care.


<lilypond version="2.24.0">
<lilypond version="2.24">
ignore = \override NoteColumn.ignore-collision = ##t
ignore = \override NoteColumn.ignore-collision = ##t


Line 12: Line 12:
</lilypond>
</lilypond>


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

Latest revision as of 09:13, 10 December 2025

If notes from two voices with stems in the same direction are placed at the same position, and both voices have no shift or the same shift specified, the error message “warning: ignoring too many clashing note columns” appears when compiling the LilyPond file. This message can be suppressed by setting the ignore-collision property of the NoteColumn object to #t. Please note that this does not just suppress warnings but stops LilyPond trying to resolve collisions at all and so may have unintended results unless used with care.

\version "2.24"

ignore = \override NoteColumn.ignore-collision = ##t

\relative c' {
  \new Staff <<
    \new Voice { \ignore \stemDown f2 g }
    \new Voice { c2 \stemDown c, }
  >>
}