]> git.donarmstrong.com Git - lilypond.git/blobdiff - ly/property-init.ly
* scripts/mup2ly.py: Cut-n-paste include missing lilylib.
[lilypond.git] / ly / property-init.ly
index 5601b73a3343c431ec483fe1825268f0aa796f56..47750ece1344b79cf5bc5bb00229e96bb7292047 100644 (file)
@@ -1,30 +1,31 @@
 % property-init.ly
 
-\version "1.3.146"
+\version "1.5.49"
 
 stemUp = \property Voice.Stem \set #'direction = #1
 stemDown = \property Voice.Stem \set #'direction = #-1 
 stemBoth= \property Voice.Stem \revert #'direction
 
-slurUp   = \property Voice.Slur \override #'direction = #1
-slurDown = \property Voice.Slur \override #'direction = #-1
+slurUp   = \property Voice.Slur \set #'direction = #1
+slurDown = \property Voice.Slur \set #'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
+
+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 \override #'direction = #1
-tieDown = \property Voice.Tie \override #'direction = #-1
+tieUp = \property Voice.Tie \set #'direction = #1
+tieDown = \property Voice.Tie \set #'direction = #-1
 tieBoth = \property Voice.Tie \revert #'direction 
 
 dynamicUp  = {
-  \property Voice.DynamicText \override #'direction = #1
-  \property Voice.DynamicLineSpanner \override #'direction = #1
+  \property Voice.DynamicText \set #'direction = #1
+  \property Voice.DynamicLineSpanner \set #'direction = #1
 }
 dynamicDown = {
-  \property Voice.DynamicText \override #'direction = #-1
-  \property Voice.DynamicLineSpanner \override #'direction = #-1
+  \property Voice.DynamicText \set #'direction = #-1
+  \property Voice.DynamicLineSpanner \set #'direction = #-1
 }
 dynamicBoth = {
   \property Voice.DynamicText \revert #'direction
@@ -32,34 +33,31 @@ dynamicBoth = {
 }
 
 scriptUp  = {
-  \property Voice.TextScript \override #'direction = #1
-  \property Voice.Script \override #'direction = #1
+  \property Voice.TextScript \set #'direction = #1
+  \property Voice.Script \set #'direction = #1
 }
 scriptDown = {
-  \property Voice.TextScript \override #'direction = #-1
-  \property Voice.Script \override #'direction = #-1
+  \property Voice.TextScript \set #'direction = #-1
+  \property Voice.Script \set #'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
+dotsUp = \property Voice.Dots \set #'direction = #1
+dotsDown = \property Voice.Dots \set #'direction = #-1
 dotsBoth = \property Voice.Dots \revert #'direction 
 
 % why doubly?
 tupletUp  = {
-  \property Voice.TupletBracket \override #'direction = #1
-  \property Voice.TupletBracket \override #'direction = #1
+  \property Voice.TupletBracket \set #'direction = #1
 }
 tupletDown = {
-  \property Voice.TupletBracket \override #'direction = #-1
-  \property Voice.TupletBracket \override #'direction = #-1
+  \property Voice.TupletBracket \set #'direction = #-1
 }
 tupletBoth = {
   \property Voice.TupletBracket \revert #'direction
-  \property Voice.TupletBracket \revert #'direction
 }
 
 
@@ -85,22 +83,21 @@ 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 \override #'dashed = #1
+slurDotted = \property Voice.Slur \set #'dashed = #1
 slurSolid = \property Voice.Slur \revert #'dashed
-tieDotted = \property Voice.Tie \override #'dashed = #1
+tieDotted = \property Voice.Tie \set #'dashed = #1
 tieSolid = \property Voice.Tie \revert #'dashed
 
        
 tiny  = 
-       \property Voice.fontSize= -2
-
+       \property Voice.fontSize= #-2
 
 small  = 
-       \property Voice.fontSize= -1
+       \property Voice.fontSize= #-1
 
 
 normalsize = {
-       \property Voice.fontSize= 0
+       \property Voice.fontSize= #0
 }
 
 normalkey = {
@@ -119,11 +116,11 @@ endincipit = \notes{
     \bar ""
 }
 
-autoBeamOff = \property Voice.noAutoBeaming = ##t
-autoBeamOn = \property Voice.noAutoBeaming = ##f
+autoBeamOff = \property Voice.autoBeaming = ##f
+autoBeamOn = \property Voice.autoBeaming = ##t
 
-emptyText = \property Voice.textNonEmpty = ##f
-fatText = \property Voice.textNonEmpty = ##t
+fatText = \property Voice.TextScript \set #'no-spacing-rods = ##f
+emptyText = \property Voice.TextScript \set #'no-spacing-rods  = ##t
 
 showStaffSwitch = \property Voice.followVoice = ##t
 hideStaffSwitch = \property Voice.followVoice = ##f
@@ -133,8 +130,17 @@ hideStaffSwitch = \property Voice.followVoice = ##f
 % accidentals as they were common in the 18th century.
 defaultAccidentals = {
   \property Score.extraNatural = ##t
-  \property Score.autoAccidentals = #'((measure-same-octave . 0))
-  \property Score.autoCautionaries = #'()  
+  \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 = #'()
+  
 }
 
 % accidentals as suggested by Kurt Stone, Music Notation in the 20th century.
@@ -142,22 +148,68 @@ defaultAccidentals = {
 % 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.autoAccidentals = #'(Staff (same-octave . 0) (any-octave . 0) (same-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))  
+  \property Score.autoAccidentals = #'(Staff (same-octave . 0))
+  \property Score.autoCautionaries = #'(Staff (any-octave . 0) (same-octave . 1))  
+}
+
+% 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) (same-octave . 1)
+    Staff (same-octave . 0) (any-octave . 0) (same-octave . 1)
+  )
+  \property Staff.autoCautionaries = #'()  
+}
+
+% 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) (same-octave . 1)
+    Staff (same-octave . 0) (any-octave . 0) (same-octave . 1)
+  )  
+}
+
+% 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) (same-octave . 1)
+    GrandStaff (any-octave . 0) (same-octave . 1)
+  )
+  \property GrandStaff.autoCautionaries = #'()  
+}
+
+pianoCautionaries = {
+  \property GrandStaff.autoAccidentals = #'(
+    Staff (same-octave . 0)
+  )
+  \property GrandStaff.autoCautionaries = #'(
+    Staff (any-octave . 0) (same-octave . 1)
+    GrandStaff (any-octave . 0) (same-octave . 1)
+  )  
 }
 
+
 % 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.autoAccidentals = #'(Staff (same-octave . #t))
   \property Score.autoCautionaries = #'()
 }
 
@@ -167,7 +219,7 @@ noResetKey = {
 % 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.autoAccidentals = #'(Staff (same-octave . -1))
   \property Score.autoCautionaries = #'()  
 }
 
@@ -176,3 +228,10 @@ forgetAccidentals = {
 % set it to turnOff. Example: \property Staff.VoltaBracket = \turnOff
 
 turnOff = #'()
+
+% 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. 
+
+arpeggioBracket = #(lambda (grob) (Arpeggio::brew_chord_bracket grob))