In that case, you could use something like this: ⋘ \version "2.19.80"
nth = #(define-music-function (n tweak mus) (integer? ly:music? ly:music?) (single tweak (list-ref (ly:music-property mus 'elements) n)) mus) { <a cis> \nth 1 \omit Accidental <a cis> % Remember, zero-indexed } ⋙ 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.) On 01/31/18 21:56, Stefano Troncaro wrote: > I just tried it, but unfortunately it appears to only work when used inside > the chord, and I need to find a way to do it from outside.// > > 2018-01-31 17:39 GMT-03:00 Caagr98 <caag...@gmail.com > <mailto:caag...@gmail.com>>: > > You could try \single instead of \once, as in <a \single \omit Accidental > cs,>. > > On 01/31/18 21:27, Stefano Troncaro wrote: > > Hello again everyone! > > > > Suppose I have the following example: > > > > \version "2.19.80" \language "english" command = { %What should go here > to omit the sharp while keeping the natural? } \score { \new Staff { \new > Voice \relative c'' { \key b \minor \accidentalStyle modern \partial 4 <as > c,> | > > <b b,> \command <a cs,> <g d~> <fs d> > > } } } > > > > If for whatever reason I wanted to omit the sharp while keeping the > natural sign of the <a cs,>, obviously \once \omit Accidental won't work. I'm > at a loss as to how to tackle this problem, and looking through the > documentation hasn't helped. > > > > Does anyone have an idea? > > Stéfano > > > > > > _______________________________________________ > > lilypond-user mailing list > > lilypond-user@gnu.org <mailto:lilypond-user@gnu.org> > > https://lists.gnu.org/mailman/listinfo/lilypond-user > <https://lists.gnu.org/mailman/listinfo/lilypond-user> > > > > _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user