User-level commands that do not move to a particular context will tend
to be applied at Bottom context when following any notes or similar
events, but at arbitrary level when being at the start of music. That's
a bad idea. This patch moves the head styling overrides to Bottom
level. While this means that
\new Staff { \deadNotesOn ...
will only affect the default Voice instead of the whole Staff, one can
still get per-Staff behavior with
\new Staff \with { \deadNotesOn } { ...
so no functionality is really lost here.
%% (palm mute, harmonics, dead notes, ...)
defaultNoteHeads =
#(define-music-function (parser location) ()
%% (palm mute, harmonics, dead notes, ...)
defaultNoteHeads =
#(define-music-function (parser location) ()
- (_i "Revert to the default note head style.")
- (revert-head-style '(NoteHead TabNoteHead)))
+ (_i "Revert to the default note head style.")
+ (context-spec-music
+ (revert-head-style '(NoteHead TabNoteHead)) 'Bottom))
accidentalStyle =
#(define-music-function
accidentalStyle =
#(define-music-function
harmonicsOn =
#(define-music-function (parser location) ()
harmonicsOn =
#(define-music-function (parser location) ()
- (_i "Set the default note head style to a diamond-shaped style.")
- (override-head-style '(NoteHead TabNoteHead) 'harmonic))
+ (_i "Set the default note head style to a diamond-shaped style.")
+ (context-spec-music
+ (override-head-style '(NoteHead TabNoteHead) 'harmonic) 'Bottom))
harmonicsOff = \defaultNoteHeads
harmonicNote =
#(define-music-function (parser location note) (ly:music?)
harmonicsOff = \defaultNoteHeads
harmonicNote =
#(define-music-function (parser location note) (ly:music?)
palmMuteOn =
#(define-music-function (parser location) ()
palmMuteOn =
#(define-music-function (parser location) ()
- (_i "Set the default note head style to a triangle-shaped style.")
- (override-head-style 'NoteHead 'do))
+ (_i "Set the default note head style to a triangle-shaped style.")
+ (context-spec-music
+ (override-head-style 'NoteHead 'do) 'Bottom))
palmMuteOff = \defaultNoteHeads
palmMute =
#(define-music-function (parser location note) (ly:music?)
palmMuteOff = \defaultNoteHeads
palmMute =
#(define-music-function (parser location note) (ly:music?)
xNotesOn =
#(define-music-function (parser location) ()
xNotesOn =
#(define-music-function (parser location) ()
- (_i "Set the default note head style to a cross-shaped style.")
- (override-head-style '(TabNoteHead NoteHead) 'cross))
+ (_i "Set the default note head style to a cross-shaped style.")
+ (context-spec-music
+ (override-head-style '(TabNoteHead NoteHead) 'cross) 'Bottom))
xNotesOff = \defaultNoteHeads
xNote =
#(define-music-function (parser location note) (ly:music?)
xNotesOff = \defaultNoteHeads
xNote =
#(define-music-function (parser location note) (ly:music?)