]> git.donarmstrong.com Git - lilypond.git/blobdiff - ly/property-init.ly
Run scripts/auxiliar/update-with-convert-ly.sh
[lilypond.git] / ly / property-init.ly
index 2880bffb2f2d61135c8e646014ca36a7fd771fde..e36c3c04650fb83ac0a00bd150bc0d19bde1c694 100644 (file)
@@ -1,11 +1,30 @@
 % property-init.ly
 
-\version "2.12.0"
+\version "2.16.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)))
+
+
+accidentalStyle =
+#(define-music-function
+   (parser location context style) ((symbol?) string?)
+   (_i "Set accidental style to @var{style}, a string.  If an optional
+@var{context} symbol is given, e.g. @code{#'Staff} or @code{#'Voice},
+the settings are applied to that context.  Otherwise, the context
+defaults to @samp{Staff}, except for piano styles, which use
+@samp{GrandStaff} as a context." )
+   (if context
+       (set-accidental-style (string->symbol style) context)
+       (set-accidental-style (string->symbol style))))
 
 %% arpeggios
 
@@ -85,10 +104,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 +134,9 @@ italianChords = {
   \set chordRootNamer = #(chord-name->italian-markup #f)
   \set chordPrefixSpacer = #0.4
 }
+powerChords = {
+  \set chordNameExceptions = #powerChordExceptions
+}
 
 
 %% compressFullBarRests
@@ -172,14 +199,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 +225,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,16 +244,22 @@ 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
+  \override Rest #'transparent = ##t
+  \override TabNoteHead #'transparent = ##t
 }
 unHideNotes = {
   \revert Accidental #'transparent
   \revert Beam #'transparent
   \revert Stem #'transparent
+  \revert Flag #'transparent
   \revert NoteHead #'transparent
   \revert NoteHead #'no-ledgers
   \revert Dots #'transparent
+  \revert Rest #'transparent
+  \revert TabNoteHead #'transparent
 }
 
 
@@ -229,11 +269,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 +293,7 @@ mergeDifferentlyHeadedOff =
 
 %% numeric time signature
 
-numericTimeSignature = \override Staff.TimeSignature #'style = #'()
+numericTimeSignature = \override Staff.TimeSignature #'style = #'numbered
 defaultTimeSignature = \revert Staff.TimeSignature #'style
 
 
@@ -259,13 +301,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 +320,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,26 +345,50 @@ 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))
 
+pointAndClickTypes =
+#(define-void-function (parser location types) (list-or-symbol?)
+  (_i "Set a type or list of types (such as @code{#'note-event}) for which point-and-click info is generated.")
+  (ly:set-option 'point-and-click types))
 
 %% 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 +410,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)
@@ -368,15 +438,26 @@ 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.Flag #'style
+  \revert TabVoice.Stem #'details
+  \revert TabVoice.Stem #'stencil
+  \revert TabVoice.Flag #'stencil
   \override TabVoice.Stem #'stencil = #tabvoice::draw-double-stem-for-half-notes
+  \override TabVoice.Stem #'X-extent = #tabvoice::make-double-stem-width-for-half-notes
+  \set TabVoice.autoBeaming = ##t
+  \revert TabVoice.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
@@ -384,24 +465,43 @@ 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 #'stencil
   \revert TabVoice.DynamicTextSpanner #'stencil
-  \revert TabVoice.Hairpin #'transparent
+  \revert TabVoice.DynamicTextSpanner #'stencil
+  \revert TabVoice.Hairpin #'stencil
   % rests
   \revert TabVoice.Rest #'stencil
   \revert TabVoice.MultiMeasureRest #'stencil
+  \revert TabVoice.MultiMeasureRestNumber #'stencil
+  \revert TabVoice.MultiMeasureRestText #'stencil
   % 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
 }
 
+%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
 
@@ -433,6 +533,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)
@@ -469,30 +571,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
 }
 
@@ -501,12 +608,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))