Accidental adjustments for single-voice polyphony: Difference between revisions
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 3: | Line 3: | ||
Unfortunately, these adjustments are quite complex. The Scheme code in this snippet provides a new engraver <code>custom_accidental_placement_engraver</code> that introduces a <code>details</code> subproperty flag called <code>capture</code> for the <code>Accidental</code> grob. If this flag is set, the current voice “captures” the accidental so that it is no longer aligned with the other accidentals in a note column. Together with other properties (<code>force-hshift</code> and <code>ignore-collision</code>) it is possible to achieve the desired result. | Unfortunately, these adjustments are quite complex. The Scheme code in this snippet provides a new engraver <code>custom_accidental_placement_engraver</code> that introduces a <code>details</code> subproperty flag called <code>capture</code> for the <code>Accidental</code> grob. If this flag is set, the current voice “captures” the accidental so that it is no longer aligned with the other accidentals in a note column. Together with other properties (<code>force-hshift</code> and <code>ignore-collision</code>) it is possible to achieve the desired result. | ||
<lilypond version="2.24 | <lilypond version="2.24" full> | ||
% written 2023 by Valentin Petzel | % written 2023 by Valentin Petzel | ||
% | % | ||