X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fproperty-init.ly;h=0b1f2a2ea78fd52bce237d3765059cf09b555668;hb=778f00cdb2ae935e1b180443227fa1b058386a7e;hp=788cabb96c9412019e4541c71d8d98c7e39fe6dd;hpb=2cb02ca327fbbde256ae6712d1e968b9da5d492e;p=lilypond.git diff --git a/ly/property-init.ly b/ly/property-init.ly index 788cabb96c..0b1f2a2ea7 100644 --- a/ly/property-init.ly +++ b/ly/property-init.ly @@ -6,6 +6,14 @@ #(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 TabNoteHead))) + + %% arpeggios @@ -198,8 +206,15 @@ glissando = #(make-music 'GlissandoEvent) %% harmonics -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)) %% hideNotes @@ -259,12 +274,12 @@ defaultTimeSignature = \revert Staff.TimeSignature #'style palmMuteOn = #(define-music-function (parser location) () + (_i "Set the default note head style to a triangle-shaped style.") (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?) + (_i "Print @var{note} with a triangle-shaped note head.") (style-note-heads 'NoteHead 'do note)) @@ -320,15 +335,22 @@ back to the lilypond source statement.") %% predefined fretboards predefinedFretboardsOff = - \set FretBoards.predefinedDiagramTable = ##f + \set predefinedDiagramTable = ##f predefinedFretboardsOn = - \set FretBoards.predefinedDiagramTable = #fretboard-table + \set predefinedDiagramTable = #fretboard-table %% shape note heads -aikenHeads = \set shapeNoteStyles = #'#(do re mi fa #f la ti) -sacredHarpHeads = \set shapeNoteStyles = #'#(fa #f la fa #f la mi) +aikenHeads = \set shapeNoteStyles = #'#(do re miMirror fa sol la ti) +aikenHeadsMinor = \set shapeNoteStyles = #'#(la ti do re miMirror fa sol) +sacredHarpHeads = \set shapeNoteStyles = #'#(fa sol la fa sol la mi) +sacredHarpHeadsMinor = \set shapeNoteStyles = #'#(la mi fa sol la fa sol) +southernHarmonyHeads = + \set shapeNoteStyles = #'#(faThin sol laThin faThin sol laThin miThin) +southernHarmonyHeadsMinor = + \set shapeNoteStyles = #'#(laThin miThin faThin sol laThin faThin sol) + %% shifts @@ -533,12 +555,12 @@ voiceNeutralStyle = { xNotesOn = #(define-music-function (parser location) () + (_i "Set the default note head style to a cross-shaped style.") (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?) + (_i "Print @var{note} with a cross-shaped note head.") (style-note-heads '(TabNoteHead NoteHead) 'cross note))