X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fproperty-init.ly;h=fe9447e09c5670d5d1faa397d8ed4c726af48f11;hb=e23cf33a062d65844ae0165aebf98cffeb9196c5;hp=4983506c5842f47800a2e02287807c66357550d0;hpb=3c58e589439162e55851ec336039e5c17011a3da;p=lilypond.git diff --git a/ly/property-init.ly b/ly/property-init.ly index 4983506c58..fe9447e09c 100644 --- a/ly/property-init.ly +++ b/ly/property-init.ly @@ -1,11 +1,19 @@ % property-init.ly -\version "2.12.0" +\version "2.14.0" %% for dashed slurs, phrasing slurs, and ties #(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 TabNoteHead) '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 @@ -210,6 +233,7 @@ hideNotes = { \override NoteHead #'transparent = ##t \override NoteHead #'no-ledgers = ##t \override Stem #'transparent = ##t + \override Flag #'transparent = ##t \override Beam #'transparent = ##t \override Accidental #'transparent = ##t } @@ -217,6 +241,7 @@ unHideNotes = { \revert Accidental #'transparent \revert Beam #'transparent \revert Stem #'transparent + \revert Flag #'transparent \revert NoteHead #'transparent \revert NoteHead #'no-ledgers \revert Dots #'transparent @@ -229,11 +254,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 +278,7 @@ mergeDifferentlyHeadedOff = %% numeric time signature -numericTimeSignature = \override Staff.TimeSignature #'style = #'() +numericTimeSignature = \override Staff.TimeSignature #'style = #'numbered defaultTimeSignature = \revert Staff.TimeSignature #'style @@ -259,13 +286,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 +305,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 for phrasing slurs.") #{ \override PhrasingSlur #'dash-definition = $(make-simple-dash-definition dash-fraction dash-period) @@ -301,10 +330,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 +347,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 @@ -342,6 +391,8 @@ slurNeutral = \revert Slur #'direction slurDashPattern = #(define-music-function (parser location dash-fraction dash-period) (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 for slurs.") #{ \override Slur #'dash-definition = $(make-simple-dash-definition dash-fraction dash-period) @@ -377,7 +428,7 @@ tabFullNotation = { % stems (the half note gets a double stem) \revert TabVoice.Stem #'length \revert TabVoice.Stem #'no-stem-extend - \revert TabVoice.Stem #'flag-style + \revert TabVoice.Flag #'style \revert TabVoice.Stem #'details \revert TabVoice.Stem #'transparent \override TabVoice.Stem #'stencil = #tabvoice::draw-double-stem-for-half-notes @@ -385,6 +436,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 +457,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 } @@ -457,6 +512,8 @@ tieNeutral = \revert Tie #'direction tieDashPattern = #(define-music-function (parser location dash-fraction dash-period) (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 for ties.") #{ \override Tie #'dash-definition = $(make-simple-dash-definition dash-fraction dash-period) @@ -493,30 +550,35 @@ voiceOneStyle = { \override NoteHead #'style = #'diamond \override NoteHead #'color = #red \override Stem #'color = #red + \override Flag #'color = #red \override Beam #'color = #red } voiceTwoStyle = { \override NoteHead #'style = #'triangle \override NoteHead #'color = #blue \override Stem #'color = #blue + \override Flag #'color = #blue \override Beam #'color = #blue } voiceThreeStyle = { \override NoteHead #'style = #'xcircle \override NoteHead #'color = #green \override Stem #'color = #green + \override Flag #'color = #green \override Beam #'color = #green } voiceFourStyle = { \override NoteHead #'style = #'cross \override NoteHead #'color = #magenta \override Stem #'color = #magenta + \override Flag #'color = #magenta \override Beam #'color = #magenta } voiceNeutralStyle = { \revert NoteHead #'style \revert NoteHead #'color \revert Stem #'color + \revert Flag #'color \revert Beam #'color } @@ -525,12 +587,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))