X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fproperty-init.ly;h=0b1f2a2ea78fd52bce237d3765059cf09b555668;hb=2e581052026c48aed3e44fd32de74b8308f8434d;hp=2880bffb2f2d61135c8e646014ca36a7fd771fde;hpb=1aa44fb449c11ff55553621eb1bbb2f33b37dba3;p=lilypond.git diff --git a/ly/property-init.ly b/ly/property-init.ly index 2880bffb2f..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 @@ -172,14 +180,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 +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 @@ -251,7 +266,7 @@ mergeDifferentlyHeadedOff = %% numeric time signature -numericTimeSignature = \override Staff.TimeSignature #'style = #'() +numericTimeSignature = \override Staff.TimeSignature #'style = #'numbered defaultTimeSignature = \revert Staff.TimeSignature #'style @@ -259,13 +274,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 +293,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 +318,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 +335,22 @@ pointAndClickOff = %% 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 @@ -368,13 +398,21 @@ stemDown = \override Stem #'direction = #DOWN stemNeutral = \revert Stem #'direction -%% tabFullNotation +%% tablature +% switch to full notation tabFullNotation = { % time signature \revert TabStaff.TimeSignature #'stencil % 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.Stem #'details + \revert TabVoice.Stem #'transparent \override TabVoice.Stem #'stencil = #tabvoice::draw-double-stem-for-half-notes + \set autoBeaming = ##t + \revert NoteColumn #'ignore-collision % beams, dots \revert TabVoice.Beam #'stencil \revert TabVoice.Dots #'stencil @@ -384,24 +422,40 @@ tabFullNotation = { \revert TabVoice.RepeatTie #'after-line-breaking \revert TabVoice.LaissezVibrerTie #'stencil \revert TabVoice.Slur #'stencil - \revert PhrasingSlur #'stencil + \revert TabVoice.PhrasingSlur #'stencil % tuplet stuff \revert TabVoice.TupletBracket #'stencil \revert TabVoice.TupletNumber #'stencil % dynamic signs - \revert DynamicText #'transparent - \revert DynamicTextSpanner #'stencil + \revert TabVoice.DynamicText #'transparent + \revert TabVoice.DynamicTextSpanner #'stencil \revert TabVoice.DynamicTextSpanner #'stencil \revert TabVoice.Hairpin #'transparent % rests \revert TabVoice.Rest #'stencil \revert TabVoice.MultiMeasureRest #'stencil + \revert TabVoice.MultiMeasureRestNumber #'transparent % markups etc. \revert TabVoice.Script #'stencil \revert TabVoice.TextScript #'stencil \revert TabStaff.Arpeggio #'stencil + \revert TabStaff.NoteColumn #'ignore-collision } +%tie/repeat tie behaviour +hideSplitTiedTabNotes = { + \override TabVoice.TabNoteHead #'(details tied-properties break-visibility) = #all-invisible + \override TabVoice.TabNoteHead #'(details tied-properties parenthesize) = ##f + \override TabVoice.TabNoteHead #'(details repeat-tied-properties note-head-visible) = ##f + \override TabVoice.TabNoteHead #'(details repeat-tied-properties parenthesize) = ##f +} + +showSplitTiedTabNotes = { + \override TabVoice.TabNoteHead #'(details tied-properties break-visibility) = #begin-of-line-visible + \override TabVoice.TabNoteHead #'(details tied-properties parenthesize) = ##t + \override TabVoice.TabNoteHead #'(details repeat-tied-properties note-head-visible) = ##t + \override TabVoice.TabNoteHead #'(details repeat-tied-properties parenthesize) = ##t +} %% text length @@ -501,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))