]> git.donarmstrong.com Git - lilypond.git/blobdiff - ly/property-init.ly
Merge branch 'master' of ssh://kainhofer@git.sv.gnu.org/srv/git/lilypond into dev...
[lilypond.git] / ly / property-init.ly
index 6ff4c9ceba655ce6bc9ccb4e2153a064ab9a9b5a..7cae78ebb11726d36116ca26c1c55d0d196fddb6 100644 (file)
 % property-init.ly
 
-\version "1.7.3"
+\version "2.11.38"
 
-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 \set #'direction = #1
-slurDown = \property Voice.Slur \set #'direction = #-1
-slurBoth = \property Voice.Slur \revert #'direction 
+slurUp = \override Slur  #'direction = #UP
+slurDown = \override Slur  #'direction = #DOWN
+slurNeutral = \revert Slur #'direction
 
-phrasingSlurUp   = \property Voice.PhrasingSlur \set #'direction = #1
-phrasingSlurDown = \property Voice.PhrasingSlur \set #'direction = #-1
-phrasingSlurBoth = \property Voice.PhrasingSlur \revert #'direction 
+%% 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
+}
+slurDotted = {
+  \override Slur  #'dash-period = #0.75
+  \override Slur #'dash-fraction = #0.1
+}
+slurSolid = {
+  \revert Slur #'dash-period
+  \revert Slur #'dash-fraction
+}
 
-shiftOn  = \property Voice.NoteColumn \set #'horizontal-shift = #1
-shiftOnn  = \property Voice.NoteColumn \set #'horizontal-shift = #2
-shiftOnnn  = \property Voice.NoteColumn \set #'horizontal-shift = #3
-shiftOff  = \property Voice.NoteColumn \revert #'horizontal-shift 
 
-tieUp = \property Voice.Tie \set #'direction = #1
-tieDown = \property Voice.Tie \set #'direction = #-1
-tieBoth = \property Voice.Tie \revert #'direction 
+phrasingSlurUp = \override PhrasingSlur  #'direction = #UP
+phrasingSlurDown = \override PhrasingSlur  #'direction = #DOWN
+phrasingSlurNeutral = \revert PhrasingSlur #'direction
 
-dynamicUp  = {
-  \property Voice.DynamicText \set #'direction = #1
-  \property Voice.DynamicLineSpanner \set #'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
 }
-dynamicDown = {
-  \property Voice.DynamicText \set #'direction = #-1
-  \property Voice.DynamicLineSpanner \set #'direction = #-1
+tieDotted = {
+  \override Tie #'dash-period = #0.75
+  \override Tie #'dash-fraction = #0.1
 }
-dynamicBoth = {
-  \property Voice.DynamicText \revert #'direction
-  \property Voice.DynamicLineSpanner \revert #'direction
+tieSolid = {
+  \revert Tie #'dash-period
+  \revert Tie #'dash-fraction
 }
 
-scriptUp  = {
-  \property Voice.TextScript \set #'direction = #1
-  \property Voice.Script \set #'direction = #1
+easyHeadsOn = {
+  \override NoteHead  #'stencil = #ly:note-head::brew-ez-stencil
+  \override NoteHead #'font-size = #-7
+  \override NoteHead #'font-family = #'sans
+  \override NoteHead #'font-series = #'bold
 }
-scriptDown = {
-  \property Voice.TextScript \set #'direction = #-1
-  \property Voice.Script \set #'direction = #-1
-}
-scriptBoth = {
-  \property Voice.TextScript \revert #'direction
-  \property Voice.Script \revert #'direction
+
+easyHeadsOff = {
+  \revert NoteHead #'stencil
+  \revert NoteHead #'font-size
+  \revert NoteHead #'font-family
+  \revert NoteHead #'font-series
 }
 
-dotsUp = \property Voice.Dots \set #'direction = #1
-dotsDown = \property Voice.Dots \set #'direction = #-1
-dotsBoth = \property Voice.Dots \revert #'direction 
+aikenHeads = \set shapeNoteStyles = ##(do re mi fa #f la ti)
+
+sacredHarpHeads =
+  \set shapeNoteStyles = ##(fa #f la fa #f la mi)
 
-% why doubly?
-tupletUp  = {
-  \property Voice.TupletBracket \set #'direction = #1
+dynamicUp = {
+  \override DynamicText  #'direction = #UP
+  \override DynamicLineSpanner  #'direction = #UP
 }
-tupletDown = {
-  \property Voice.TupletBracket \set #'direction = #-1
+
+dynamicDown = {
+  \override DynamicText  #'direction = #DOWN
+  \override DynamicLineSpanner  #'direction = #DOWN
 }
-tupletBoth = {
-  \property Voice.TupletBracket \revert #'direction
+
+dynamicNeutral = {
+  \revert DynamicText #'direction
+  \revert DynamicLineSpanner #'direction
 }
 
 
+dotsUp = \override Dots  #'direction = #UP
+dotsDown = \override Dots  #'direction = #DOWN
+dotsNeutral = \revert Dots #'direction 
 
-cadenzaOn = \property Timing.timing = ##f
-cadenzaOff = {
-  \property Timing.timing = ##t
-  \property Timing.measurePosition = #(ly:make-moment 0 1)
-}
+tupletUp = \override TupletBracket  #'direction = #UP
+tupletDown = \override TupletBracket  #'direction = #DOWN
+tupletNeutral = \revert TupletBracket #'direction
 
-newpage = \notes
-{
-  \break
-  % urg, only works for TeX output
-  \context Score \outputproperty #(make-type-checker 'paper-column-interface)
-    #'between-system-string = #"\\newpage"
+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")
-
-% There's also dash, but setting dash period/length should be fixed.
-slurDotted = \property Voice.Slur \set #'dashed = #1
-slurSolid = \property Voice.Slur \revert #'dashed
-tieDotted = \property Voice.Tie \set #'dashed = #1
-tieSolid = \property Voice.Tie \revert #'dashed
+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)
+
+voiceOneStyle = {
+  \override NoteHead #'style = #'diamond
+  \override NoteHead #'color = #red
+  \override Stem #'color = #red
+  \override Beam #'color = #red
+}
+voiceTwoStyle = {
+  \override NoteHead #'style = #'triangle
+  \override NoteHead #'color = #blue
+  \override Stem #'color = #blue
+  \override Beam #'color = #blue
+}
+voiceThreeStyle = {
+  \override NoteHead #'style = #'xcircle
+  \override NoteHead #'color = #green
+  \override Stem #'color = #green
+  \override Beam #'color = #green
+}
+voiceFourStyle = {
+  \override NoteHead #'style = #'cross
+  \override NoteHead #'color = #magenta
+  \override Stem #'color = #magenta
+  \override Beam #'color = #magenta
+}
+voiceNeutralStyle = {
+  \revert NoteHead #'style
+  \revert NoteHead #'color
+  \revert Stem #'color
+  \revert Beam #'color
+}
 
        
-tiny  = 
-       \property Voice.fontSize= #-2
-
-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
+large = {
+  \set fontSize = #1
 }
 
-specialkey = {
-       \property Staff.keyOctaviation = ##t
+huge = {
+  \set fontSize = #2
 }
 
-% 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 ""
+%% 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 ""
 }
 
-autoBeamOff = \property Voice.autoBeaming = ##f
-autoBeamOn = \property Voice.autoBeaming = ##t
-
-fatText = \property Voice.TextScript \set #'no-spacing-rods = ##f
-emptyText = \property Voice.TextScript \set #'no-spacing-rods  = ##t
+autoBeamOff = \set autoBeaming = ##f
+autoBeamOn = \set autoBeaming = ##t
 
-showStaffSwitch = \property Voice.followVoice = ##t
-hideStaffSwitch = \property Voice.followVoice = ##f
-
-% accidentals as they were common in the 18th century.
-defaultAccidentals = {
-  \property Current.extraNatural = ##t
-  \property Current.autoAccidentals = #'(Staff (same-octave . 0))
-  \property Current.autoCautionaries = #'()
+textLengthOn = {
+  \override TextScript  #'extra-spacing-width = #'(0 . 0)
+  \override TextScript  #'infinite-spacing-height = ##t
 }
 
-% accidentals in voices instead of staves.
-% Notice that accidentals from one voice do NOT get cancelled in other voices
-voiceAccidentals = {
-  \property Current.extraNatural = ##t
-  \property Current.autoAccidentals = #'(Voice (same-octave . 0))
-  \property Current.autoCautionaries = #'()
-  
+textLengthOff = {
+  \override TextScript  #'extra-spacing-width = #'(+inf.0 . -inf.0)
+  \override TextScript  #'infinite-spacing-height = ##f
 }
 
-% 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 Current.extraNatural = ##f
-  \property Current.autoAccidentals = #'(Staff (same-octave . 0) (any-octave . 0) (same-octave . 1))
-  \property Current.autoCautionaries = #'()  
+showStaffSwitch = \set followVoice = ##t
+hideStaffSwitch = \set followVoice = ##f
+
+expandFullBarRests = {
+  \set Score.skipBars = ##f
 }
 
-% the accidentals that Stone adds to the old standard as cautionaries
-modernCautionaries = {
-  \property Current.extraNatural = ##f
-  \property Current.autoAccidentals = #'(Staff (same-octave . 0))
-  \property Current.autoCautionaries = #'(Staff (any-octave . 0) (same-octave . 1))  
+compressFullBarRests = {
+  \set Score.skipBars = ##t
 }
 
-% 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 Current.extraNatural = ##f
-  \property Current.autoAccidentals = #'(
-    Voice (same-octave . 0) (any-octave . 0) (same-octave . 1)
-    Staff (same-octave . 0) (any-octave . 0) (same-octave . 1)
-  )
-  \property Current.autoCautionaries = #'()  
+numericTimeSignature = {
+  \override Staff.TimeSignature #'style = #'()
 }
 
-% same as modernVoiceAccidental eccept that all special accidentals are typeset
-% as cautionaries
-modernVoiceCautionaries = {
-  \property Current.extraNatural = ##f
-  \property Current.autoAccidentals = #'(
-    Voice (same-octave . 0) 
-  )
-  \property Current.autoCautionaries = #'(
-    Voice (any-octave . 0) (same-octave . 1)
-    Staff (same-octave . 0) (any-octave . 0) (same-octave . 1)
-  )  
+defaultTimeSignature = {
+  \revert Staff.TimeSignature #'style
 }
 
-% stone's suggestions for accidentals on grand staff.
-% Accidentals are cancelled across the staves in the same grand staff as well
-pianoAccidentals = {
-  \property Current.autoAccidentals = #'(
-    Staff (same-octave . 0) (any-octave . 0) (same-octave . 1)
-    GrandStaff (any-octave . 0) (same-octave . 1)
-  )
-  \property Current.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. 
+
+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)
 
-pianoCautionaries = {
-  \property Current.autoAccidentals = #'(
-    Staff (same-octave . 0)
-  )
-  \property Current.autoCautionaries = #'(
-    Staff (any-octave . 0) (same-octave . 1)
-    GrandStaff (any-octave . 0) (same-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
 }
 
 
-% 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 Current.autoAccidentals = #'(Staff (same-octave . #t))
-  \property Current.autoCautionaries = #'()
+unHideNotes = \sequential {
+  \revert Accidental #'transparent
+  \revert Beam #'transparent
+  \revert Stem #'transparent
+  \revert NoteHead #'transparent
+  \revert NoteHead #'no-ledgers
+  \revert Dots #'transparent 
 }
 
-% 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 Current.autoAccidentals = #'(Staff (same-octave . -1))
-  \property Current.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
+}
 
+frenchChords = {
+    \set chordRootNamer = #(chord-name->italian-markup #t)
+    \set chordPrefixSpacer = #0.4
+}
 
-% To remove a Volta bracket or some other graphical object,
-% set it to turnOff. Example: \property Staff.VoltaBracket = \turnOff
+italianChords = {
+    \set chordRootNamer = #(chord-name->italian-markup #f)
+    \set chordPrefixSpacer = #0.4
+}
 
-turnOff = #'()
+improvisationOn =  {
+    \set squashedPosition = #0
+    \override NoteHead  #'style = #'slash
+    \override Accidental #'stencil = ##f
+}
 
-% 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. 
+improvisationOff =  {
+    \unset squashedPosition 
+    \revert NoteHead #'style
+    \revert Accidental #'stencil
+}
+
+textSpannerUp = \override TextSpanner #'direction = #UP
+textSpannerDown = \override TextSpanner #'direction = #DOWN
+textSpannerNeutral = \revert TextSpanner #'direction
 
-arpeggioBracket = #(lambda (grob) (Arpeggio::brew_chord_bracket grob))
-arpeggio = #(make-music-by-name 'ArpeggioEvent)
-glissando = #(make-music-by-name 'GlissandoEvent)
 
-setMmRestFermata =
-  \once \property Voice.MultiMeasureRestNumber \override #'text = #'(music "scripts-ufermata")