]> git.donarmstrong.com Git - lilypond.git/blobdiff - ly/property-init.ly
Doc: general/introduction: add examples/ prefix to images.
[lilypond.git] / ly / property-init.ly
index fd5c766ef78fe816196e2c7fee3c78b6fee3c61c..eaefd9d11f56cd45dba695cdca1c68619dd9bdfa 100644 (file)
@@ -3,7 +3,7 @@
 \version "2.12.0"
 
 stemUp = \override Stem #'direction = #UP
-stemDown = \override Stem #'direction = #DOWN 
+stemDown = \override Stem #'direction = #DOWN
 stemNeutral = \revert Stem #'direction
 
 slurUp = \override Slur #'direction = #UP
@@ -16,7 +16,7 @@ slurNeutral = \revert Slur #'direction
 slurDashed = {
   \override Slur #'dash-definition =  #'((0 1 0.4 0.75))
 }
-slurDashPattern = 
+slurDashPattern =
 #(define-music-function (parser location dash-fraction dash-period)
   (number? number?)
   #{
@@ -46,7 +46,7 @@ phrasingSlurNeutral = \revert PhrasingSlur #'direction
 phrasingSlurDashed = {
   \override PhrasingSlur #'dash-definition =  #'((0 1 0.4 0.75))
 }
-phrasingSlurDashPattern = 
+phrasingSlurDashPattern =
 #(define-music-function (parser location dash-fraction dash-period)
   (number? number?)
   #{
@@ -94,7 +94,7 @@ tieNeutral = \revert Tie #'direction
 tieDashed = {
   \override Tie #'dash-definition = #'((0 1 0.4 0.75))
 }
-tieDashPattern = 
+tieDashPattern =
 #(define-music-function (parser location dash-fraction dash-period)
   (number? number?)
   #{
@@ -164,7 +164,7 @@ cadenzaOff = {
   \set Timing.measurePosition = #ZERO-MOMENT
 }
 
-% dynamic ly:dir?  text script, articulation script ly:dir? 
+% dynamic ly:dir?  text script, articulation script ly:dir?
 oneVoice = #(context-spec-music (make-voice-props-revert) 'Voice)
 voiceOne = #(context-spec-music (make-voice-props-set 0) 'Voice)
 voiceTwo = #(context-spec-music (make-voice-props-set 1) 'Voice)
@@ -279,9 +279,9 @@ defaultTimeSignature = {
 
 
 % For drawing vertical chord brackets with \arpeggio
-% This is a shorthand for the value of the print-function property 
-% of either Staff.Arpeggio or PianoStaff.Arpeggio, depending whether 
-% cross-staff brackets are desired. 
+% This is a shorthand for the value of the print-function property
+% of either Staff.Arpeggio or PianoStaff.Arpeggio, depending whether
+% cross-staff brackets are desired.
 
 arpeggio = #(make-music 'ArpeggioEvent)
 
@@ -320,7 +320,13 @@ arpeggioParenthesisDashed = {
 
 glissando = #(make-music 'GlissandoEvent)
 
-fermataMarkup = \markup { \musicglyph #"scripts.ufermata" } 
+fermataMarkup =
+#(make-music 'MultiMeasureTextEvent
+   ; Set the 'text based on the 'direction
+   'tweaks (list (cons 'text (lambda (grob)
+       (if (eq? (ly:grob-property grob 'direction) DOWN)
+           (markup #:musicglyph "scripts.dfermata")
+           (markup #:musicglyph "scripts.ufermata"))))))
 
 hideNotes = {
   % hide notes, accidentals, etc.
@@ -405,7 +411,7 @@ bassFigureStaffAlignmentNeutral = {
   \revert Staff.BassFigureAlignmentPositioning #'direction
 }
 
-predefinedFretboardsOff = {  
+predefinedFretboardsOff = {
   \set FretBoards.predefinedDiagramTable = ##f
 }
 
@@ -420,3 +426,64 @@ pointAndClickOff = #(define-music-function (parser location) ()
 pointAndClickOn = #(define-music-function (parser location) ()
                       (ly:set-option 'point-and-click #t)
                       (make-music 'SequentialMusic 'void #t))
+
+palmMuteOn =
+#(define-music-function (parser location) ()
+   (override-head-style 'NoteHead 'do))
+
+palmMuteOff =
+#(define-music-function (parser location) ()
+   (revert-head-style 'NoteHead))
+
+palmMute =
+#(define-music-function (parser location note) (ly:music?)
+    (style-note-heads 'NoteHead 'do note))
+
+xNotesOn =
+#(define-music-function (parser location) ()
+   (override-head-style '(TabNoteHead NoteHead) 'cross))
+
+xNotesOff =
+#(define-music-function (parser location) ()
+   (revert-head-style '(TabNoteHead NoteHead)))
+
+xNote =
+#(define-music-function (parser location note) (ly:music?)
+   (style-note-heads '(TabNoteHead NoteHead) 'cross note))
+
+% Define aliases of cross-head notes for specific purposes
+deadNotesOn = \xNotesOn
+deadNotesOff = \xNotesOff
+deadNote = #`(xNote)
+
+tabFullNotation = {
+  % time signature
+  \revert TabStaff.TimeSignature #'stencil
+  % stems (the half note gets a double stem)
+  \override TabVoice.Stem #'stencil = #tabvoice::draw-double-stem-for-half-notes
+  % beams, dots
+  \revert TabVoice.Beam #'stencil
+  \revert TabVoice.Dots #'stencil
+  \revert TabVoice.Tie #'stencil
+  \revert TabVoice.Tie #'after-line-breaking
+  \revert TabVoice.RepeatTie #'stencil
+  \revert TabVoice.RepeatTie #'after-line-breaking
+  \revert TabVoice.LaissezVibrerTie #'stencil
+  \revert TabVoice.Slur #'stencil
+  \revert PhrasingSlur #'stencil
+  % tuplet stuff
+  \revert TabVoice.TupletBracket #'stencil
+  \revert TabVoice.TupletNumber #'stencil
+  % dynamic signs
+  \revert DynamicText #'transparent
+  \revert DynamicTextSpanner #'stencil
+  \revert TabVoice.DynamicTextSpanner #'stencil
+  \revert TabVoice.Hairpin #'transparent
+  % rests
+  \revert TabVoice.Rest #'stencil
+  \revert TabVoice.MultiMeasureRest #'stencil
+  % markups etc.
+  \revert TabVoice.Script #'stencil
+  \revert TabVoice.TextScript #'stencil
+  \revert TabStaff.Arpeggio #'stencil
+}