Removing accidentals from a single voice

Revision as of 22:46, 26 October 2025 by Jean Abou Samra (talk | contribs) (Import snippet from LSR)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The accidentals engravers engraver usually live at Staff level, but reads the settings for Accidental at Voice level, so you can \override them at Voice. To get rid of all accidentals, you need to remove both the Accidental engraver and the AccidentalCautionary one.

\version "2.24.0"

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

SampleMusic = { cis cis cis! cis? }

LongMusic = {
  \SampleMusic

  \override Voice.Accidental.stencil = ##f
  \SampleMusic
  
  \override Voice.AccidentalCautionary.stencil = ##f
  \SampleMusic
  
  \revert Voice.Accidental.stencil
  \revert Voice.AccidentalCautionary.stencil
  \SampleMusic
}

<<
  \relative c'' {
    \LongMusic
  }
\\
  \relative c' {
    \SampleMusic
    \SampleMusic
    \SampleMusic
    \SampleMusic
  }
>>