The \harmonicsO[n|ff] commands have been
rewritten as music-functions, to be more
like other definitions such as \palmMute.
This commit also adds a \harmonicNote command,
for consistency's sake with \deadNote etc.,
and a \defaultNoteHeads that acts as a common
definition for all note head styles reverting
(i.e. \deadNoteOff, \harmonicsOff etc.).
musicMap =
#(define-music-function (parser location proc mus) (procedure? ly:music?)
musicMap =
#(define-music-function (parser location proc mus) (procedure? ly:music?)
+ (_i "Apply @var{proc} to @var{mus} and all of the music it contains.")
+ (music-map proc mus))
#(define (make-simple-dash-definition dash-fraction dash-period)
(list (list 0 1 dash-fraction dash-period)))
#(define (make-simple-dash-definition dash-fraction dash-period)
(list (list 0 1 dash-fraction dash-period)))
+%% common definition for all note head styles reverting
+%% (palm mute, harmonics, dead notes, ...)
+defaultNoteHeads=
+#(define-music-function (parser location) ()
+ (_i "Revert to the default note head style.")
+ (revert-head-style 'NoteHead))
+
+
-harmonicsOn = \override NoteHead #'style = #'harmonic
-harmonicsOff = \revert NoteHead #'style
+harmonicsOn =
+#(define-music-function (parser location) ()
+ (_i "Set the default note head style to a diamond-shaped style.")
+ (override-head-style 'NoteHead 'harmonic))
+harmonicsOff = \defaultNoteHeads
+harmonicNote =
+#(define-music-function (parser location note) (ly:music?)
+ (_i "Print @var{note} with a diamond-shaped note head.")
+ (style-note-heads 'NoteHead 'harmonic note))
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))
(override-head-style 'NoteHead 'do))
-palmMuteOff =
-#(define-music-function (parser location) ()
- (revert-head-style 'NoteHead))
+palmMuteOff = \defaultNoteHeads
palmMute =
#(define-music-function (parser location note) (ly:music?)
palmMute =
#(define-music-function (parser location note) (ly:music?)
+ (_i "Print @var{note} with a triangle-shaped note head.")
(style-note-heads 'NoteHead 'do note))
(style-note-heads 'NoteHead 'do note))
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))
(override-head-style '(TabNoteHead NoteHead) 'cross))
-xNotesOff =
-#(define-music-function (parser location) ()
- (revert-head-style '(TabNoteHead NoteHead)))
+xNotesOff = \defaultNoteHeads
xNote =
#(define-music-function (parser location note) (ly:music?)
xNote =
#(define-music-function (parser location note) (ly:music?)
+ (_i "Print @var{note} with a cross-shaped note head.")
(style-note-heads '(TabNoteHead NoteHead) 'cross note))
(style-note-heads '(TabNoteHead NoteHead) 'cross note))