@Caagr98
If you could be a bit more specific about your goal (hiding all sharps?
Hiding accidentals on even-indexed notes? Hiding accidentals
specifically on cis?), that would make it possible to make a more
specific function for your goals.
(Note that this function can only be used inline, so it won't work with edition-engraver or similar.)
You are right, I apologize for being so vague. Ideally, I wanted a function that I could use with the edition-engraver to tweak target elements inside chords. I framed the question around accidentals in the post above, but ultimately I hoped to be able to use the same function (or a very similar one) to tweak ties of specific notes instead of being forced to use one override for the whole chord, or to tweak other properties of specific notes should the need arise.
I know I can achieve the results I want by splitting the chord into Voices, and then targetting the specific note is trivial, as follows:
\version "2.19.80"
\language "english"
\include "oll-core/package.ily"
\loadPackage edition-engraver
\addEdition test
\editionMod test 1 1/4 Voice.B \once \omit Accidental
\consistToContexts #edition-engraver Voice
\score {
\new Staff {
\new Voice \relative c'' {
\key b \minor \accidentalStyle modern
\partial 4 <as c,>4 |
<b b,> << { \voiceOne a } \new Voice { \voiceOne cs, } >> \oneVoice <g' d~> <fs d>
}
}
}
But having to split chords like this every time there is an single element I need to tweak is something I am not happy with. Having a function do it would be both cleaner and more productive.
I hope I was clear enough this time. Please tell me if you know or have any idea on how this could be achieved.