]> git.donarmstrong.com Git - lilypond.git/commitdiff
Add generic crossed note heads
authorTrevor Daniels <t.daniels@treda.co.uk>
Fri, 14 Aug 2009 10:04:55 +0000 (11:04 +0100)
committerTrevor Daniels <t.daniels@treda.co.uk>
Fri, 14 Aug 2009 10:06:28 +0000 (11:06 +0100)
 - add \xNotesOn, \xNotesOff, \xNote predefs

 - document them

 - modify \deadNotesOn, \deadNotesOff, \deadNotes to use the
   generic form

Documentation/notation/pitches.itely
ly/property-init.ly

index ddeb8b27af8e8b99766bafef438d05ba6ca0dc64..b02e6da55362bd0bc37b2dc51fb447e3e0a9d494 100644 (file)
@@ -2291,25 +2291,58 @@ This section suggests ways of altering note heads.
 
 @funindex cross
 
-Note heads may be altered:
+The appearance of note heads may be altered:
 
 @lilypond[verbatim,quote,relative=2]
-c4 b a b
+c4 b
 \override NoteHead #'style = #'cross
-c4 b a b
+c4 b
+\revert NoteHead #'style
+a b
+\override NoteHead #'style = #'harmonic
+a b
 \revert NoteHead #'style
 c4 d e f
 @end lilypond
 
-There is a shorthand for diamond shapes which can only be used
-inside chords:
+To see all note head styles, see @ref{Note head styles}.
+
+The @code{cross} style is used to represent a variety of musical
+intentions.  The following generic predefined commands modify the
+note head in both staff and tablature contexts and can be used to
+represent any musical meaning:
 
 @lilypond[verbatim,quote,relative=2]
-<c f\harmonic>2 <d a'\harmonic>4 <c g'\harmonic>
+c4 b
+\xNotesOn
+ a b c4 b
+\xNotesOff
+c4 d
 @end lilypond
 
-To see all note head styles, see @ref{Note head styles}.
+The music function form of this predefined command may be used
+inside and outside chords to generate crossed note heads in both
+staff and tablature contexts:
 
+@lilypond[verbatim,quote,relative=2]
+c4 b
+\xNote { e f }
+c b < g \xNote c f > b
+@end lilypond
+
+There is also a shorthand for diamond shapes which can be used
+only inside chords:
+
+@lilypond[verbatim,quote,relative=2]
+<c f\harmonic>2 <d a'\harmonic>4 <c g'\harmonic>
+@end lilypond
+
+@predefined
+@code{\harmonic},
+@code{\xNotesOn},
+@code{\xNotesOff},
+@code{\xNote}.
+@endpredefined
 
 @seealso
 Snippets:
index 48cf00f94cb21f673a3ab99f0e7c0ae9096313d7..eaefd9d11f56cd45dba695cdca1c68619dd9bdfa 100644 (file)
@@ -439,18 +439,23 @@ palmMute =
 #(define-music-function (parser location note) (ly:music?)
     (style-note-heads 'NoteHead 'do note))
 
-deadNotesOn =
+xNotesOn =
 #(define-music-function (parser location) ()
    (override-head-style '(TabNoteHead NoteHead) 'cross))
 
-deadNotesOff =
+xNotesOff =
 #(define-music-function (parser location) ()
    (revert-head-style '(TabNoteHead NoteHead)))
 
-deadNote =
+xNote =
 #(define-music-function (parser location note) (ly:music?)
    (style-note-heads '(TabNoteHead NoteHead) 'cross note))
 
+% Define aliases of cross-head notes for specific purposes
+deadNotesOn = \xNotesOn
+deadNotesOff = \xNotesOff
+deadNote = #`(xNote)
+
 tabFullNotation = {
   % time signature
   \revert TabStaff.TimeSignature #'stencil