]> git.donarmstrong.com Git - lilypond.git/blobdiff - ly/property.ly
release: 1.3.147
[lilypond.git] / ly / property.ly
index 0ac31ec8c632622e91d65a7790decad9f36447a4..5fa998727dd151daa881e4560c1ef6490d3e21c6 100644 (file)
@@ -1,98 +1,97 @@
 % property.ly
-% list of properties that lily recognises
-% and some shorthands (ugh)
 
-%{
+\version "1.3.146"
 
-SEE THE REFERENCE MANUAL FOR EXPLANATIONS.
+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
+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 
 
-\version "1.3.59";
+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
+}
+dynamicDown = {
+  \property Voice.DynamicText \override #'direction = #-1
+  \property Voice.DynamicLineSpanner \override #'direction = #-1
+}
+dynamicBoth = {
+  \property Voice.DynamicText \revert #'direction
+  \property Voice.DynamicLineSpanner \revert #'direction
+}
 
-%{
-stemup =        \property Voice.verticalDirection = \up 
-stemboth=      \property Voice.verticalDirection = \center
-stemdown =     \property Voice.verticalDirection = \down
-%}
-
-stemup = \property Voice.basicStemProperties \push #'direction = #1
-stemdown = \property Voice.basicStemProperties \push #'direction = #-1 
-stemboth= \property basicStemProperties \pop #'direction
+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
+}
 
-slurup   = \property Voice.slurVerticalDirection = \up 
-slurboth = \property Voice.slurVerticalDirection = \center
-slurdown = \property Voice.slurVerticalDirection = \down
-shifton  = \property Voice.horizontalNoteShift = #1
-shiftoff = \property Voice.horizontalNoteShift = #0
 
 cadenzaOn = \property Score.timing = ##f
-cadenzaOff = { \property Score.timing = ##t
-       \property Score.measurePosition = #(make-moment 0 1)
-       }
-
-       
-onevoice = {   
-       \stemboth \shiftoff     
+cadenzaOff = {
+  \property Score.timing = ##t
+  \property Score.measurePosition = #(make-moment 0 1)
 }
 
-voiceone = \stemup
-voicetwo = \stemdown
-voicethree = {
-       \stemup
-       \shifton
+% dynamic dir?  text script, articulation script dir?  
+oneVoice = {   
+  \stemBoth
+  \slurBoth
+  \tieBoth
+  \shiftOff
 }
 
-voicefour = {
-       \stemdown
-       \shifton
+voiceOne = {
+  \stemUp
+  \slurUp
+  \tieUp
 }
 
-% ugh, cluttering global namespace...
-
-% ugh2. 
-infinity=10000
-
-beamslopeproportional = 
-       \property Score.beamSlopedamping = 0
-
-beamslopedamped = 
-       \property Score.beamSlopedamping = 1
-
-
-beamslopezero = 
-       \property Score.beamSlopedamping = \infinity
-
-
-% this sucks, you'd want to pass an array, at least
-% (or embedded code: you still can't dictate the slope / stemlength)
-beamposfree = 
-       \property Score.beamQuantisation = 0
-
-
-beamposnormal = 
-       \property Score.beamQuantisation = 1
-
-
-beampostraditional = 
-       \property Score.beamQuantisation = 2
-
-
-slurnormal = 
-       \property Voice.slurDash = ##f
-
-
-slurdotted =                           
-       \property Voice.slurDash = 1
-
+voiceTwo = {
+  \stemDown
+  \slurDown
+  \tieDown
+}
+   
+voiceThree = {
+  \stemUp
+  \slurUp
+  \tieUp
+  \shiftOn
+}
 
-tupletoff =
-       \property Voice.tupletVisibility = 0
+voiceFour = {
+  \stemDown
+  \slurDown
+  \tieDown
+  \shiftOn
+}
 
-tupleton = 
-       \property Voice.tupletVisibility = 3
+% 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
 
@@ -115,15 +114,23 @@ specialkey = {
 
 % End the incipit and print a ``normal line start''.
 endincipit = \notes{
-    \partial 16; s16  % Hack to handle e.g. \bar ".|"; \endincipit
-    \property Staff.clefStyle = #"fullSizeChanges" 
-    \bar "";
+    \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 = \property Voice.noAutoBeaming = ##t
 autoBeamOn = \property Voice.noAutoBeaming = ##f
 
-
 emptyText = \property Voice.textNonEmpty = ##f
 fatText = \property Voice.textNonEmpty = ##t
 
+showStaffSwitch = \property PianoStaff.followVoice = ##t
+hideStaffSwitch = \property PianoStaff.followVoice = ##f
+
+
+% To remove a Volta bracet or some other graphical object,
+% set it to turnOff. Example: \property Staff.VoltaBracket = \turnOff
+
+turnOff = #'((meta .  ((interfaces . ()))))