X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fproperty-init.ly;h=ae8d3382488df179c1295ef34ec802e9f139a960;hb=1116cf5d9f3728adac8fc8152ed1a5cb9c451dc9;hp=2d50a6c6019569271214b6c1ca09e0acada8552d;hpb=bb91de5b7f8c4f753452730101c2422946067cc3;p=lilypond.git diff --git a/ly/property-init.ly b/ly/property-init.ly index 2d50a6c601..ae8d338248 100644 --- a/ly/property-init.ly +++ b/ly/property-init.ly @@ -3,24 +3,39 @@ \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 slurDown = \override Slur #'direction = #DOWN slurNeutral = \revert Slur #'direction +#(define (make-simple-dash-definition dash-fraction dash-period) + (list (list 0 1 dash-fraction dash-period))) + slurDashed = { - \override Slur #'dash-period = #0.75 - \override Slur #'dash-fraction = #0.4 -} + \override Slur #'dash-definition = #'((0 1 0.4 0.75)) +} +slurDashPattern = +#(define-music-function (parser location dash-fraction dash-period) + (number? number?) + #{ + \override Slur #'dash-definition = + $(make-simple-dash-definition dash-fraction dash-period) + #}) slurDotted = { - \override Slur #'dash-period = #0.75 - \override Slur #'dash-fraction = #0.1 + \override Slur #'dash-definition = #'((0 1 0.1 0.75)) +} +slurHalfDashed = { + \override Slur #'dash-definition = #'((0 0.5 0.4 0.75) + (0.5 1 1 1)) +} +slurHalfSolid = { + \override Slur #'dash-definition = #'((0 0.5 1 1) + (0.5 1 0.4 0.75)) } slurSolid = { - \revert Slur #'dash-period - \revert Slur #'dash-fraction + \revert Slur #'dash-definition } @@ -29,16 +44,28 @@ phrasingSlurDown = \override PhrasingSlur #'direction = #DOWN phrasingSlurNeutral = \revert PhrasingSlur #'direction phrasingSlurDashed = { - \override PhrasingSlur #'dash-period = #0.75 - \override PhrasingSlur #'dash-fraction = #0.4 -} + \override PhrasingSlur #'dash-definition = #'((0 1 0.4 0.75)) +} +phrasingSlurDashPattern = +#(define-music-function (parser location dash-fraction dash-period) + (number? number?) + #{ + \override PhrasingSlur #'dash-definition = + $(make-simple-dash-definition dash-fraction dash-period) + #}) phrasingSlurDotted = { - \override PhrasingSlur #'dash-period = #0.75 - \override PhrasingSlur #'dash-fraction = #0.1 + \override PhrasingSlur #'dash-definition = #'((0 1 0.1 0.75)) +} +phrasingSlurHalfDashed = { + \override PhrasingSlur #'dash-definition = #'((0 0.5 0.4 0.75) + (0.5 1 1 1)) +} +phrasingSlurHalfSolid = { + \override PhrasingSlur #'dash-definition = #'((0 0.5 1 1) + (0.5 1 0.4 0.75)) } phrasingSlurSolid = { - \revert PhrasingSlur #'dash-period - \revert PhrasingSlur #'dash-fraction + \revert PhrasingSlur #'dash-definition } mergeDifferentlyDottedOn = { @@ -65,16 +92,28 @@ tieDown = \override Tie #'direction = #DOWN tieNeutral = \revert Tie #'direction tieDashed = { - \override Tie #'dash-period = #0.75 - \override Tie #'dash-fraction = #0.4 -} + \override Tie #'dash-definition = #'((0 1 0.4 0.75)) +} +tieDashPattern = +#(define-music-function (parser location dash-fraction dash-period) + (number? number?) + #{ + \override Tie #'dash-definition = + $(make-simple-dash-definition dash-fraction dash-period) + #}) tieDotted = { - \override Tie #'dash-period = #0.75 - \override Tie #'dash-fraction = #0.1 + \override Tie #'dash-definition = #'((0 1 0.1 0.75)) +} +tieHalfDashed = { + \override Tie #'dash-definition = #'((0 0.5 0.4 0.75) + (0.5 1 1 1)) +} +tieHalfSolid = { + \override Tie #'dash-definition = #'((0 0.5 1 1) + (0.5 1 0.4 0.75)) } tieSolid = { - \revert Tie #'dash-period - \revert Tie #'dash-fraction + \revert Tie #'dash-definition } easyHeadsOn = { @@ -125,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) @@ -240,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) @@ -259,7 +298,8 @@ arpeggioArrowDown = { arpeggioNormal = { \revert Arpeggio #'stencil \revert Arpeggio #'X-extent - \revert Arpeggio #'arpeggio-direction + \revert Arpeggio #'arpeggio-direction + \revert Arpeggio #'dash-definition } arpeggioBracket = { \revert Arpeggio #'X-extent @@ -268,11 +308,25 @@ arpeggioBracket = { arpeggioParenthesis = { \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-slur \override Arpeggio #'X-extent = #ly:grob::stencil-width + \revert Arpeggio #'dash-definition } +arpeggioParenthesisDashed = { + \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-slur + \override Arpeggio #'X-extent = #ly:grob::stencil-width + \override Arpeggio #'dash-definition = #'((0 1 0.4 0.75)) +} + + 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. @@ -313,6 +367,10 @@ italianChords = { \set chordPrefixSpacer = #0.4 } +harmonicsOn = \override NoteHead #'style = #'harmonic + +harmonicsOff = \revert NoteHead #'style + improvisationOn = { \set squashedPosition = #0 \override NoteHead #'style = #'slash @@ -353,7 +411,7 @@ bassFigureStaffAlignmentNeutral = { \revert Staff.BassFigureAlignmentPositioning #'direction } -predefinedFretboardsOff = { +predefinedFretboardsOff = { \set FretBoards.predefinedDiagramTable = ##f } @@ -368,3 +426,59 @@ 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 = { + #(override-head-style 'NoteHead 'do) +} + +palmMuteOff = { + #(revert-head-style 'NoteHead) +} + +palmMute = +#(define-music-function (parser location note) (ly:music?) + (style-note-heads 'NoteHead 'do note)) + +deadNotesOn = { + #(override-head-style '(TabNoteHead NoteHead) 'cross) +} + +deadNotesOff = { + #(revert-head-style '(TabNoteHead NoteHead)) +} + +deadNote = +#(define-music-function (parser location note) (ly:music?) + (style-note-heads '(TabNoteHead NoteHead) 'cross note)) + +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 +}