\version "2.19.80" \include "oll-core/package.ily" \loadPackage edition-engraver \consistToContexts #edition-engraver Voice.Staff.Score condGrobTweak = #(define-music-function (use_octave pred_pitch grob_proc)((boolean? #f) ly:pitch? procedure?) (let ((pred_note (ly:pitch-notename pred_pitch)) (pred_alteration (ly:pitch-alteration pred_pitch)) (pred_octave (ly:pitch-octave pred_pitch))) #{ \override NoteHead.before-line-breaking = #(lambda (grob) (let* ((cause (ly:grob-property grob 'cause)) (pitch (ly:prob-property cause 'pitch)) (note (ly:pitch-notename pitch)) (alteration (ly:pitch-alteration pitch)) (octave (ly:pitch-octave pitch))) (if (and (eqv? alteration pred_alteration) (eqv? note pred_note) (or (not use_octave)(eqv? octave pred_octave))) (grob_proc grob)))) #})) #(define (omit-accidental grob) (let ((accidental (ly:grob-object grob 'accidental-grob))) (if (ly:grob? accidental) (ly:grob-set-property! accidental 'stencil #f) ))) \addEdition accidentals \editionMod accidentals 1 0/4 Voice \once \condGrobTweak gis #omit-accidental { }