]> git.donarmstrong.com Git - lilypond.git/blobdiff - ly/property-init.ly
Merge with master
[lilypond.git] / ly / property-init.ly
index a49e7e1f394d45ee4cb64dd5380de6e6354ee73a..f7fc11ae7358f6773049f39e729968c690b6ac2d 100644 (file)
 % property-init.ly
 
-\version "1.3.146"
+\version "2.10.0"
 
-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
-}
-scriptDown = {
-  \property Voice.TextScript \override #'direction = #-1
-  \property Voice.Script \override #'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 
+phrasingSlurUp = \override PhrasingSlur  #'direction = #UP
+phrasingSlurDown = \override PhrasingSlur  #'direction = #DOWN
+phrasingSlurNeutral = \revert PhrasingSlur #'direction 
 
-% why doubly?
-tupletUp  = {
-  \property Voice.TupletBracket \override #'direction = #1
-  \property Voice.TupletBracket \override #'direction = #1
+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
 }
-tupletDown = {
-  \property Voice.TupletBracket \override #'direction = #-1
-  \property Voice.TupletBracket \override #'direction = #-1
+tieDotted = {
+  \override Tie #'dash-period = #0.75
+  \override Tie #'dash-fraction = #0.1
 }
-tupletBoth = {
-  \property Voice.TupletBracket \revert #'direction
-  \property Voice.TupletBracket \revert #'direction
+tieSolid = {
+  \revert Tie #'dash-period
+  \revert Tie #'dash-fraction
 }
 
+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)
 
-cadenzaOn = \property Score.timing = ##f
-cadenzaOff = {
-  \property Score.timing = ##t
-  \property Score.measurePosition = #(make-moment 0 1)
+sacredHarpHeads =
+  \set shapeNoteStyles = ##(fa #f la fa #f la mi)
+
+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 = #(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")
+dynamicNeutral = {
+  \revert DynamicText #'direction
+  \revert DynamicLineSpanner #'direction
+}
 
-% 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
 
-       
-tiny  = 
-       \property Voice.fontSize= -2
+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
+}
 
+% 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)
 
-small  = 
-       \property Voice.fontSize= -1
+       
+tiny = 
+\set fontSize = #-2
 
+small = 
+\set fontSize = #-1
 
 normalsize = {
-       \property Voice.fontSize= 0
+  \set fontSize = #0
 }
 
-normalkey = {
-       \property Staff.keyOctaviation = ##f
-}
 
-specialkey = {
-       \property Staff.keyOctaviation = ##t
+%% 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 ""
 }
 
-% 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 ""
-}
+autoBeamOff = \set autoBeaming = ##f
+autoBeamOn = \set autoBeaming = ##t
 
-autoBeamOff = \property Voice.autoBeaming = ##f
-autoBeamOn = \property Voice.autoBeaming = ##t
+fatText = { \override TextScript  #'extra-spacing-width = #'(0 . 0)
+            \override TextScript  #'infinite-spacing-height = ##t }
 
-emptyText = \property Voice.textNonEmpty = ##f
-fatText = \property Voice.textNonEmpty = ##t
+emptyText = { \override TextScript  #'extra-spacing-width = #'(+inf.0 . -inf.0)
+              \override TextScript  #'infinite-spacing-height = ##f }
 
-showStaffSwitch = \property Voice.followVoice = ##t
-hideStaffSwitch = \property Voice.followVoice = ##f
+showStaffSwitch = \set followVoice = ##t
+hideStaffSwitch = \set followVoice = ##f
 
-% FIXME: Move this docu (to where?)
 
-% accidentals as they were common in the 18th century.
-defaultAccidentals = {
-  \property Score.extraNatural = ##t
-  \property Score.autoAccidentals = #'(Staff (same-octave . 0))
-  \property Score.autoCautionaries = #'()
-}
 
-% accidentals in voices instead of staves.
-% Notice that accidentals from one voice do NOT get cancelled in other voices
-voiceAccidentals = {
-  \property Score.extraNatural = ##t
-  \property Score.autoAccidentals = #'(Voice (same-octave . 0))
-  \property Score.autoCautionaries = #'()
-  
-}
+% 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. 
 
-% 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 = #'(Staff (same-octave . 0) (any-octave . 0) (any-octave . 1))
-  \property Score.autoCautionaries = #'()  
-}
+arpeggio = #(make-music 'ArpeggioEvent)
 
-% the accidentals that Stone adds to the old standard as cautionaries
-modernCautionaries = {
-  \property Score.extraNatural = ##f
-  \property Score.autoAccidentals = #'(Staff (same-octave . 0))
-  \property Score.autoCautionaries = #'(Staff (any-octave . 0) (any-octave . 1))  
+arpeggioUp = \sequential {
+  \revert Arpeggio  #'stencil
+  \override Arpeggio  #'arpeggio-direction = #UP
 }
-
-% Multivoice accidentals to be read both by musicians playing one voice
-% and musicians playing all voices.
-% Accidentals are typeset for each voice, but they ARE cancelled across voices.
-modernVoiceAccidentals = {
-  \property Staff.extraNatural = ##f
-  \property Staff.autoAccidentals = #'(
-    Voice (same-octave . 0) (any-octave . 0) (any-octave . 1)
-    Staff (same-octave . 0) (any-octave . 0) (any-octave . 1)
-  )
-  \property Staff.autoCautionaries = #'()  
+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)
 
-% same as modernVoiceAccidental eccept that all special accidentals are typeset
-% as cautionaries
-modernVoiceCautionaries = {
-  \property Staff.extraNatural = ##f
-  \property Staff.autoAccidentals = #'(
-    Voice (same-octave . 0) 
-  )
-  \property Staff.autoCautionaries = #'(
-    Voice (any-octave . 0) (any-octave . 1)
-    Staff (same-octave . 0) (any-octave . 0) (any-octave . 1)
-  )  
+fermataMarkup = \markup { \musicglyph #"scripts.ufermata" } 
+
+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
 }
 
-% stone's suggestions for accidentals on grand staff.
-% Accidentals are cancelled across the staves in the same grand staff as well
-pianoAccidentals = {
-  \property GrandStaff.autoAccidentals = #'(
-    Staff (same-octave . 0) (any-octave . 0) (any-octave . 1)
-    GrandStaff (any-octave . 1)
-  )
-  \property GrandStaff.autoCautionaries = #'()  
+
+unHideNotes = \sequential {
+  \revert Accidental #'transparent
+  \revert Beam #'transparent
+  \revert Stem #'transparent
+  \revert NoteHead #'transparent
+  \revert NoteHead #'no-ledgers
+  \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 = #'(Staff (same-octave . #t))
-  \property Score.autoCautionaries = #'()
+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
 }
 
-% 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 = #'(Staff (same-octave . -1))
-  \property Score.autoCautionaries = #'()  
+frenchChords = {
+    \set chordRootNamer = #(chord-name->italian-markup #t)
+    \set chordPrefixSpacer = #0.4
 }
 
+italianChords = {
+    \set chordRootNamer = #(chord-name->italian-markup #f)
+    \set chordPrefixSpacer = #0.4
+}
 
-% To remove a Volta bracket or some other graphical object,
-% set it to turnOff. Example: \property Staff.VoltaBracket = \turnOff
+improvisationOn =  {
+    \set squashedPosition = #0
+    \override NoteHead  #'style = #'slash
+}
 
-turnOff = #'()
+improvisationOff =  {
+    \unset squashedPosition 
+    \revert NoteHead #'style
+}
 
-% For drawing vertical chord brackets with \arpeggio
-% This is a shorthand for the value of the molecule-callback property 
-% of either Staff.Arpeggio or PianoStaff.Arpeggio, depending whether 
-% cross-staff brackets are desired. 
+textSpannerUp = \override TextSpanner #'direction = #UP
+textSpannerDown = \override TextSpanner #'direction = #DOWN
+textSpannerNeutral = \revert TextSpanner #'direction
 
-arpeggioBracket = #(lambda (grob) (Arpeggio::brew_chord_bracket grob))