From 2c5a77b8adac29e80e99d23ff89b4d4688f545e9 Mon Sep 17 00:00:00 2001 From: Trevor Daniels Date: Fri, 14 Aug 2009 11:04:55 +0100 Subject: [PATCH] Add generic crossed note heads - add \xNotesOn, \xNotesOff, \xNote predefs - document them - modify \deadNotesOn, \deadNotesOff, \deadNotes to use the generic form --- Documentation/notation/pitches.itely | 47 +++++++++++++++++++++++----- ly/property-init.ly | 11 +++++-- 2 files changed, 48 insertions(+), 10 deletions(-) diff --git a/Documentation/notation/pitches.itely b/Documentation/notation/pitches.itely index ddeb8b27af..b02e6da553 100644 --- a/Documentation/notation/pitches.itely +++ b/Documentation/notation/pitches.itely @@ -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] -2 4 +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] +2 4 +@end lilypond + +@predefined +@code{\harmonic}, +@code{\xNotesOn}, +@code{\xNotesOff}, +@code{\xNote}. +@endpredefined @seealso Snippets: diff --git a/ly/property-init.ly b/ly/property-init.ly index 48cf00f94c..eaefd9d11f 100644 --- a/ly/property-init.ly +++ b/ly/property-init.ly @@ -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 -- 2.39.5