X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fproperty-init.ly;h=81378b76283921bfc642a311561487e18cee0211;hb=01dd37f55db8ab29f47a65f0576a5cc650c78eeb;hp=4c1eb13019443edfe511af6ea9a2e16e3c68d67e;hpb=d9b43b93f2c885409bafdb157138158f65cc49aa;p=lilypond.git diff --git a/ly/property-init.ly b/ly/property-init.ly index 4c1eb13019..81378b7628 100644 --- a/ly/property-init.ly +++ b/ly/property-init.ly @@ -1,209 +1,191 @@ % property-init.ly -\version "1.3.146" +\version "2.1.30" -stemUp = \property Voice.Stem \set #'direction = #1 -stemDown = \property Voice.Stem \set #'direction = #-1 -stemBoth= \property Voice.Stem \revert #'direction +stemUp = \override Stem #'direction = #1 +stemDown = \override Stem #'direction = #-1 +stemBoth= \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 = #1 +slurDown = \override Slur #'direction = #-1 +slurBoth = \revert Slur #'direction -tieUp = \property Voice.Tie \override #'direction = #1 -tieDown = \property Voice.Tie \override #'direction = #-1 -tieBoth = \property Voice.Tie \revert #'direction +% There's also dash, but setting dash period/length should be fixed. +slurDotted = \override Slur #'dashed = #1 +slurSolid = \revert Slur #'dashed + + +phrasingSlurUp = \override PhrasingSlur #'direction = #1 +phrasingSlurDown = \override PhrasingSlur #'direction = #-1 +phrasingSlurBoth = \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 = #1 +tieDown = \override Tie #'direction = #-1 +tieBoth = \revert Tie #'direction + +tieDotted = \override Tie #'dashed = #1 +tieSolid = \revert Tie #'dashed -dynamicUp = { - \property Voice.DynamicText \override #'direction = #1 - \property Voice.DynamicLineSpanner \override #'direction = #1 +setEasyHeads = \sequential { + \override NoteHead #'print-function = #Note_head::brew_ez_stencil + \override NoteHead #'Y-extent-callback = #'() + \override NoteHead #'X-extent-callback = #'() +} + +dynamicUp = { + \override DynamicText #'direction = #1 + \override DynamicLineSpanner #'direction = #1 } dynamicDown = { - \property Voice.DynamicText \override #'direction = #-1 - \property Voice.DynamicLineSpanner \override #'direction = #-1 + \override DynamicText #'direction = #-1 + \override DynamicLineSpanner #'direction = #-1 } dynamicBoth = { - \property Voice.DynamicText \revert #'direction - \property Voice.DynamicLineSpanner \revert #'direction + \revert DynamicText #'direction + \revert DynamicLineSpanner #'direction } -scriptUp = { - \property Voice.TextScript \override #'direction = #1 - \property Voice.Script \override #'direction = #1 +scriptUp = { + \override TextScript #'direction = #1 + \override Script #'direction = #1 } scriptDown = { - \property Voice.TextScript \override #'direction = #-1 - \property Voice.Script \override #'direction = #-1 + \override TextScript #'direction = #-1 + \override Script #'direction = #-1 } scriptBoth = { - \property Voice.TextScript \revert #'direction - \property Voice.Script \revert #'direction -} - -dotsUp = \property Voice.Dots \override #'direction = #1 -dotsDown = \property Voice.Dots \override #'direction = #-1 -dotsBoth = \property Voice.Dots \revert #'direction - -% why doubly? -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 + \revert TextScript #'direction + \revert Script #'direction } +dotsUp = \override Dots #'direction = #1 +dotsDown = \override Dots #'direction = #-1 +dotsBoth = \revert Dots #'direction +tupletUp = \override TupletBracket #'direction = #1 +tupletDown = \override TupletBracket #'direction = #-1 +tupletBoth = \revert TupletBracket #'direction -cadenzaOn = \property Score.timing = ##f +cadenzaOn = \set Timing.timing = ##f cadenzaOff = { - \property Score.timing = ##t - \property Score.measurePosition = #(make-moment 0 1) + \set Timing.timing = ##t + \set Timing.measurePosition = #(ly:make-moment 0 1) } -newpage = { +newpage = \notes +{ \break % urg, only works for TeX output - \context Score \outputproperty #(make-type-checker 'paper-column-interface) - #'between-system-string = #"\\newpage" + \context Score \applyoutput + #(outputproperty-compatibility (make-type-checker 'paper-column-interface) + 'between-system-string "\\newpage") } -% dynamic dir? text script, articulation script dir? -oneVoice = { - \stemBoth - \slurBoth - \tieBoth - \shiftOff -} +% 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) -voiceOne = { - \stemUp - \slurUp - \tieUp - \dotsUp -} + +tiny = + \set fontSize = #-2 -voiceTwo = { - \stemDown - \slurDown - \tieDown - \dotsDown -} - -voiceThree = { - \stemUp - \slurUp - \tieUp - \shiftOn - \dotsUp +small = + \set fontSize = #-1 + +normalsize = { + \set fontSize = #0 } -voiceFour = { - \stemDown - \slurDown - \tieDown - \shiftOn - \dotsDown + +% End the incipit and print a ``normal line start''. +endincipit = \notes \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 -} +% To remove a Volta bracket or some other graphical object, +% set it to turnOff. Example: \set Staff.VoltaBracket = \turnOff -normalkey = { - \property Staff.keyOctaviation = ##f -} +%% +%% DO NOT USE THIS. IT CAN LEAD TO CRASHES. +turnOff = #(cons '() '()) -specialkey = { - \property Staff.keyOctaviation = ##t -} +% 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. -% 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 "" +arpeggio = #(make-music 'ArpeggioEvent) + +arpeggioUp = \sequential { + \revert Arpeggio #'print-function + \override Arpeggio #'arpeggio-direction = #1 +} +arpeggioDown = \sequential { + \revert Arpeggio #'print-function + \override Arpeggio #'arpeggio-direction = #-1 +} +arpeggioBoth = \sequential { + \revert Arpeggio #'print-function + \revert Arpeggio #'arpeggio-direction +} +arpeggioBracket = \sequential { + \override Arpeggio #'print-function = #Arpeggio::brew_chord_bracket } -autoBeamOff = \property Voice.noAutoBeaming = ##t -autoBeamOn = \property Voice.noAutoBeaming = ##f +glissando = #(make-music 'GlissandoEvent) -emptyText = \property Voice.textNonEmpty = ##f -fatText = \property Voice.textNonEmpty = ##t +fermataMarkup = \markup { \musicglyph #"scripts-ufermata" } -showStaffSwitch = \property Voice.followVoice = ##t -hideStaffSwitch = \property Voice.followVoice = ##f +setMmRestFermata = + \once \override MultiMeasureRestNumber #'text = + #fermataMarkup -% FIXME: Move this docu (to where?) -% accidentals as they were common in the 18th century. -defaultAccidentals = { - \property Score.extraNatural = ##t - \property Score.autoAccidentals = #'((measure-same-octave . 0)) - \property Score.autoCautionaries = #'() +hideNotes =\sequential { + % hide notes, accidentals, etc. + \override Dots #'transparent = ##t + \override NoteHead #'transparent = ##t + \override Stem #'transparent = ##t + \override Beam #'transparent = ##t + \override Staff.Accidental #'transparent = ##t } -% accidentals as suggested by Kurt Stone, Music Notation in the 20th century. -% This includes all the default accidentals, but accidentals also needs cancelling -% in other octaves and in the next measure. -modernAccidentals = { - \property Score.extraNatural = ##f - \property Score.autoAccidentals = #'((measure-same-octave . 0) (measure-any-octave . 0) (measure-any-octave . 1)) - \property Score.autoCautionaries = #'() -} -% the accidentals that Stone adds to the old standard as cautionaries -modernCautionaries = { - \property Score.extraNatural = ##f - \property Score.autoAccidentals = #'((measure-same-octave . 0)) - \property Score.autoCautionaries = #'((measure-any-octave . 0) (measure-any-octave . 1)) +unHideNotes = \sequential { + \revert Staff.Accidental #'transparent + \revert Beam #'transparent + \revert Stem #'transparent + \revert NoteHead #'transparent + \revert Dots #'transparent } -% Do not reset the key at the start of a measure. Accidentals will be -% printed only once and are in effect until overridden, possibly many -% measures later. -noResetKey = { - \property Score.autoAccidentals = #'((measure-same-octave . #t)) - \property Score.autoCautionaries = #'() +germanChords = { + \set chordRootNamer = #(chord-name->german-markup #t) + \set chordNoteNamer = #note-name->german-markup } - -% do not set localKeySignature when a note alterated differently from -% localKeySignature is found. -% Causes accidentals to be printed at every note instead of -% remembered for the duration of a measure. -% accidentals not being remembered, causing accidentals always to be typeset relative to the time signature -forgetAccidentals = { - \property Score.autoAccidentals = #'((measure-same-octave . -1)) - \property Score.autoCautionaries = #'() +semiGermanChords = { + \set chordRootNamer = #(chord-name->german-markup #f) + \set chordNoteNamer = #note-name->german-markup } - - -% To remove a Volta bracket or some other graphical object, -% set it to turnOff. Example: \property Staff.VoltaBracket = \turnOff - -turnOff = #'()