X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fproperty-init.ly;h=36941a18c994a28c4f88c04379c127cbc449a007;hb=b53ca26b6a62e30c75b758d17bcdab530cba1e2b;hp=84c8d2d46e8baf109ffea30d318f177697ba6f70;hpb=4995fea559cd5399b4f462de546a15195d76f4c3;p=lilypond.git diff --git a/ly/property-init.ly b/ly/property-init.ly index 84c8d2d46e..36941a18c9 100644 --- a/ly/property-init.ly +++ b/ly/property-init.ly @@ -1,157 +1,213 @@ % property-init.ly -\version "1.3.146" +\version "2.7.39" -stemUp = \property Voice.Stem \set #'direction = #1 -stemDown = \property Voice.Stem \set #'direction = #-1 -stemBoth= \property Voice.Stem \revert #'direction +stemUp = \override Stem #'direction = #UP +stemDown = \override Stem #'direction = #DOWN +stemNeutral= \revert Stem #'direction -slurUp = \property Voice.Slur \override #'direction = #1 -slurDown = \property Voice.Slur \override #'direction = #-1 -slurBoth = \property Voice.Slur \revert #'direction -shiftOn = \property Voice.NoteColumn \override #'horizontal-shift = #1 -shiftOnn = \property Voice.NoteColumn \override #'horizontal-shift = #2 -shiftOnnn = \property Voice.NoteColumn \override #'horizontal-shift = #3 -shiftOff = \property Voice.NoteColumn \revert #'horizontal-shift +slurUp = \override Slur #'direction = #UP +slurDown = \override Slur #'direction = #DOWN +slurNeutral = \revert Slur #'direction -tieUp = \property Voice.Tie \override #'direction = #1 -tieDown = \property Voice.Tie \override #'direction = #-1 -tieBoth = \property Voice.Tie \revert #'direction - -dynamicUp = { - \property Voice.DynamicText \override #'direction = #1 - \property Voice.DynamicLineSpanner \override #'direction = #1 +%% There's also dash, but setting dash period/length should be fixed. +slurDashed = { + \override Slur #'dash-period = #0.75 + \override Slur #'dash-fraction = #0.4 } -dynamicDown = { - \property Voice.DynamicText \override #'direction = #-1 - \property Voice.DynamicLineSpanner \override #'direction = #-1 +slurDotted = { + \override Slur #'dash-period = #0.75 + \override Slur #'dash-fraction = #0.1 } -dynamicBoth = { - \property Voice.DynamicText \revert #'direction - \property Voice.DynamicLineSpanner \revert #'direction +slurSolid = { + \revert Slur #'dash-period + \revert Slur #'dash-fraction } -scriptUp = { - \property Voice.TextScript \override #'direction = #1 - \property Voice.Script \override #'direction = #1 + +phrasingSlurUp = \override PhrasingSlur #'direction = #UP +phrasingSlurDown = \override PhrasingSlur #'direction = #DOWN +phrasingSlurNeutral = \revert PhrasingSlur #'direction + +shiftOn = \override NoteColumn #'horizontal-shift = #1 +shiftOnn = \override NoteColumn #'horizontal-shift = #2 +shiftOnnn = \override NoteColumn #'horizontal-shift = #3 +shiftOff = \revert NoteColumn #'horizontal-shift + +tieUp = \override Tie #'direction = #UP +tieDown = \override Tie #'direction = #DOWN +tieNeutral = \revert Tie #'direction + +tieDashed = { + \override Tie #'dash-period = #0.75 + \override Tie #'dash-fraction = #0.4 } -scriptDown = { - \property Voice.TextScript \override #'direction = #-1 - \property Voice.Script \override #'direction = #-1 +tieDotted = { + \override Tie #'dash-period = #0.75 + \override Tie #'dash-fraction = #0.1 } -scriptBoth = { - \property Voice.TextScript \revert #'direction - \property Voice.Script \revert #'direction +tieSolid = { + \revert Tie #'dash-period + \revert Tie #'dash-fraction } -tupletUp = { - \property Voice.TupletBracket \override #'direction = #1 - \property Voice.TupletBracket \override #'direction = #1 -} -tupletDown = { - \property Voice.TupletBracket \override #'direction = #-1 - \property Voice.TupletBracket \override #'direction = #-1 -} -tupletBoth = { - \property Voice.TupletBracket \revert #'direction - \property Voice.TupletBracket \revert #'direction +setEasyHeads = \sequential { + \override NoteHead #'stencil = #ly:note-head::brew-ez-stencil + \override NoteHead #'font-size = #-7 + \override NoteHead #'font-family = #'sans + \override NoteHead #'font-series = #'bold } +aikenHeads = \set shapeNoteStyles = ##(do re mi fa #f la ti) +sacredHarpHeads = + \set shapeNoteStyles = ##(fa #f la fa #f la mi) -cadenzaOn = \property Score.timing = ##f -cadenzaOff = { - \property Score.timing = ##t - \property Score.measurePosition = #(make-moment 0 1) +dynamicUp = { + \override DynamicText #'direction = #UP + \override DynamicLineSpanner #'direction = #UP } -newpage = { - \break - % urg, only works for TeX output - \context Score \outputproperty #(make-type-checker 'paper-column-interface) - #'between-system-string = #"\\newpage" +dynamicDown = { + \override DynamicText #'direction = #DOWN + \override DynamicLineSpanner #'direction = #DOWN } -% dynamic dir? text script, articulation script dir? -oneVoice = { - \stemBoth - \slurBoth - \tieBoth - \shiftOff +dynamicNeutral = { + \revert DynamicText #'direction + \revert DynamicLineSpanner #'direction } -voiceOne = { - \stemUp - \slurUp - \tieUp -} -voiceTwo = { - \stemDown - \slurDown - \tieDown +dotsUp = \override Dots #'direction = #UP +dotsDown = \override Dots #'direction = #DOWN +dotsNeutral = \revert Dots #'direction + +tupletUp = \override TupletBracket #'direction = #UP +tupletDown = \override TupletBracket #'direction = #DOWN +tupletNeutral = \revert TupletBracket #'direction + +cadenzaOn = \set Timing.timing = ##f +cadenzaOff = { + \set Timing.timing = ##t + \set Timing.measurePosition = #ZERO-MOMENT } - -voiceThree = { - \stemUp - \slurUp - \tieUp - \shiftOn + +% 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) +voiceThree =#(context-spec-music (make-voice-props-set 2) 'Voice) +voiceFour = #(context-spec-music (make-voice-props-set 3) 'Voice) + + +tiny = +\set fontSize = #-2 + +small = +\set fontSize = #-1 + +normalsize = { + \set fontSize = #0 } -voiceFour = { - \stemDown - \slurDown - \tieDown - \shiftOn + +%% End the incipit and print a ``normal line start''. +endincipit = \context Staff { + \partial 16 s16 % Hack to handle e.g. \bar ".|" \endincipit + \once \override Staff.Clef #'full-size-change = ##t + \once \override Staff.Clef #'non-default = ##t + \bar "" } -% There's also dash, but setting dash period/length should be fixed. -slurDotted = \property Voice.Slur \override #'dashed = #1 -slurSolid = \property Voice.Slur \revert #'dashed -tieDotted = \property Voice.Tie \override #'dashed = #1 -tieSolid = \property Voice.Tie \revert #'dashed +autoBeamOff = \set autoBeaming = ##f +autoBeamOn = \set autoBeaming = ##t - -tiny = - \property Voice.fontSize= -2 +fatText = \override TextScript #'no-spacing-rods = ##f +emptyText = \override TextScript #'no-spacing-rods = ##t +showStaffSwitch = \set followVoice = ##t +hideStaffSwitch = \set followVoice = ##f -small = - \property Voice.fontSize= -1 -normalsize = { - \property Voice.fontSize= 0 +% 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. + +arpeggio = #(make-music 'ArpeggioEvent) + +arpeggioUp = \sequential { + \revert Arpeggio #'stencil + \override Arpeggio #'arpeggio-direction = #UP +} +arpeggioDown = \sequential { + \revert Arpeggio #'stencil + \override Arpeggio #'arpeggio-direction = #DOWN +} +arpeggioNeutral = \sequential { + \revert Arpeggio #'stencil + \revert Arpeggio #'arpeggio-direction } +arpeggioBracket = \sequential { + \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-bracket +} + +glissando = #(make-music 'GlissandoEvent) + +fermataMarkup = \markup { \musicglyph #"scripts.ufermata" } -normalkey = { - \property Staff.keyOctaviation = ##f +hideNotes =\sequential { + % hide notes, accidentals, etc. + \override Dots #'transparent = ##t + \override NoteHead #'transparent = ##t + \override NoteHead #'no-ledgers = ##t + \override Stem #'transparent = ##t + \override Beam #'transparent = ##t + \override Accidental #'transparent = ##t } -specialkey = { - \property Staff.keyOctaviation = ##t + +unHideNotes = \sequential { + \revert Accidental #'transparent + \revert Beam #'transparent + \revert Stem #'transparent + \revert NoteHead #'transparent + \revert NoteHead #'no-ledgers + \revert Dots #'transparent } -% End the incipit and print a ``normal line start''. -endincipit = \notes{ - \partial 16 s16 % Hack to handle e.g. \bar ".|" \endincipit - \context Staff \outputproperty #(make-type-checker 'clef-interface) #'full-size-change = ##t - \context Staff \outputproperty #(make-type-checker 'clef-interface) #'non-default = ##t - \bar "" +germanChords = { + \set chordRootNamer = #(chord-name->german-markup #t) + \set chordNoteNamer = #note-name->german-markup +} +semiGermanChords = { + \set chordRootNamer = #(chord-name->german-markup #f) + \set chordNoteNamer = #note-name->german-markup } -autoBeamOff = \property Voice.noAutoBeaming = ##t -autoBeamOn = \property Voice.noAutoBeaming = ##f +frenchChords = { + \set chordRootNamer = #(chord-name->italian-markup #t) + \set chordPrefixSpacer = #0.4 +} -emptyText = \property Voice.textNonEmpty = ##f -fatText = \property Voice.textNonEmpty = ##t +italianChords = { + \set chordRootNamer = #(chord-name->italian-markup #f) + \set chordPrefixSpacer = #0.4 +} -showStaffSwitch = \property PianoStaff.followVoice = ##t -hideStaffSwitch = \property PianoStaff.followVoice = ##f +improvisationOn = { + \set squashedPosition = #0 + \override NoteHead #'style = #'slash +} +improvisationOff = { + \unset squashedPosition + \revert NoteHead #'style +} -% To remove a Volta bracet or some other graphical object, -% set it to turnOff. Example: \property Staff.VoltaBracket = \turnOff +textSpannerUp = \override TextSpanner #'direction = #UP +textSpannerDown = \override TextSpanner #'direction = #DOWN +textSpannerNeutral = \revert TextSpanner #'direction -turnOff = #'((meta . ((interfaces . ()))))