X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fproperty-init.ly;h=2e293352db97fa919700a03805a25d576b6fd440;hb=ac3dd3ad38528113d97f6a8a7b81751c328f1c36;hp=4983506c5842f47800a2e02287807c66357550d0;hpb=3c58e589439162e55851ec336039e5c17011a3da;p=lilypond.git diff --git a/ly/property-init.ly b/ly/property-init.ly index 4983506c58..2e293352db 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 @@ -85,10 +93,15 @@ bassFigureStaffAlignmentNeutral = %% cadenzas -cadenzaOn = \set Timing.timing = ##f +cadenzaOn = { + \set Timing.timing = ##f + \set Timing.autoBeaming = ##f +} + cadenzaOff = { \set Timing.timing = ##t \set Timing.measurePosition = #ZERO-MOMENT + \set Timing.autoBeaming = ##t } @@ -110,6 +123,9 @@ italianChords = { \set chordRootNamer = #(chord-name->italian-markup #f) \set chordPrefixSpacer = #0.4 } +powerChords = { + \set chordNameExceptions = #powerChordExceptions +} %% compressFullBarRests @@ -172,14 +188,14 @@ endincipit = \context Staff { fermataMarkup = #(make-music 'MultiMeasureTextEvent - 'tweaks (list - ; Set the 'text based on the 'direction - (cons 'text (lambda (grob) - (if (eq? (ly:grob-property grob 'direction) DOWN) - (markup #:musicglyph "scripts.dfermata") - (markup #:musicglyph "scripts.ufermata")))) - (cons 'outside-staff-priority 40))) - + 'tweaks (list + ;; Set the 'text based on the 'direction + (cons 'text (lambda (grob) + (if (eq? (ly:grob-property grob 'direction) DOWN) + (markup #:musicglyph "scripts.dfermata") + (markup #:musicglyph "scripts.ufermata")))) + (cons 'outside-staff-priority 40) + (cons 'outside-staff-padding 0))) %% font sizes @@ -198,8 +214,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 @@ -229,11 +252,13 @@ improvisationOn = { \set squashedPosition = #0 \override NoteHead #'style = #'slash \override Accidental #'stencil = ##f + \override AccidentalCautionary #'stencil = ##f } improvisationOff = { \unset squashedPosition \revert NoteHead #'style \revert Accidental #'stencil + \revert AccidentalCautionary #'stencil } @@ -251,7 +276,7 @@ mergeDifferentlyHeadedOff = %% numeric time signature -numericTimeSignature = \override Staff.TimeSignature #'style = #'() +numericTimeSignature = \override Staff.TimeSignature #'style = #'numbered defaultTimeSignature = \revert Staff.TimeSignature #'style @@ -259,13 +284,13 @@ 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?) - (style-note-heads 'NoteHead 'do note)) + (_i "Print @var{note} with a triangle-shaped note head.") + (style-note-heads 'NoteHead 'do note)) %% phrasing slurs @@ -278,7 +303,9 @@ phrasingSlurNeutral = \revert PhrasingSlur #'direction % dash-patterns (make-simple-dash-definition defined at top of file) phrasingSlurDashPattern = #(define-music-function (parser location dash-fraction dash-period) - (number? number?) + (number? number?) + (_i "Set up a custom style of dash pattern for @var{dash-fraction} ratio of +line to space repeated at @var{dash-period} interval.") #{ \override PhrasingSlur #'dash-definition = $(make-simple-dash-definition dash-fraction dash-period) @@ -301,10 +328,16 @@ phrasingSlurSolid = pointAndClickOn = #(define-music-function (parser location) () + (_i "Enable generation of code in final-format (e.g. pdf) files to reference the +originating lilypond source statement; +this is helpful when developing a score but generates bigger final-format files.") (ly:set-option 'point-and-click #t) (make-music 'SequentialMusic 'void #t)) + pointAndClickOff = #(define-music-function (parser location) () + (_i "Suppress generating extra code in final-format (e.g. pdf) files to point +back to the lilypond source statement.") (ly:set-option 'point-and-click #f) (make-music 'SequentialMusic 'void #t)) @@ -312,15 +345,29 @@ pointAndClickOff = %% predefined fretboards predefinedFretboardsOff = - \set FretBoards.predefinedDiagramTable = ##f + \set predefinedDiagramTable = ##f predefinedFretboardsOn = - \set FretBoards.predefinedDiagramTable = #fretboard-table + \set predefinedDiagramTable = #default-fret-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) +funkHeads = + \set shapeNoteStyles = #'#(doFunk reFunk miFunk faFunk solFunk laFunk tiFunk) +funkHeadsMinor = + \set shapeNoteStyles = #'#(laFunk tiFunk doFunk reFunk miFunk faFunk solFunk) +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) +walkerHeads = + \set shapeNoteStyles = #'#(doWalker reWalker miWalker faWalker solFunk laWalker tiWalker) +walkerHeadsMinor = + \set shapeNoteStyles = #'#(laWalker tiWalker doWalker reWalker miWalker faWalker solFunk) %% shifts @@ -385,6 +432,7 @@ tabFullNotation = { \revert NoteColumn #'ignore-collision % beams, dots \revert TabVoice.Beam #'stencil + \revert TabVoice.StemTremolo #'stencil \revert TabVoice.Dots #'stencil \revert TabVoice.Tie #'stencil \revert TabVoice.Tie #'after-line-breaking @@ -405,9 +453,12 @@ tabFullNotation = { \revert TabVoice.Rest #'stencil \revert TabVoice.MultiMeasureRest #'stencil \revert TabVoice.MultiMeasureRestNumber #'transparent + \revert TabVoice.MultiMeasureRestText #'transparent % markups etc. + \revert TabVoice.Glissando #'stencil \revert TabVoice.Script #'stencil \revert TabVoice.TextScript #'stencil + \revert TabVoice.TextSpanner #'stencil \revert TabStaff.Arpeggio #'stencil \revert TabStaff.NoteColumn #'ignore-collision } @@ -525,12 +576,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))