]> git.donarmstrong.com Git - lilypond.git/blobdiff - ly/property.ly
release: 1.3.147
[lilypond.git] / ly / property.ly
index fbd082d12ff79ed6d650069b66038254db7e1dd6..5fa998727dd151daa881e4560c1ef6490d3e21c6 100644 (file)
 % property.ly
-% list of properties that lily recognises
-% and some shorthands (ugh)
 
-%{
+\version "1.3.146"
 
-PROPERTIES
+stemUp = \property Voice.Stem \set #'direction = #1
+stemDown = \property Voice.Stem \set #'direction = #-1 
+stemBoth= \property Voice.Stem \revert #'direction
 
-name                   value   effect                  shorthand
+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 
 
-[Voice]
-ydirection             -1      force stem down         \stemdown
-ydirection             0       stem direction free     \stemboth
-ydirection             1       force stem up           \stemup
+tieUp = \property Voice.Tie \override #'direction = #1
+tieDown = \property Voice.Tie \override #'direction = #-1
+tieBoth = \property Voice.Tie \revert #'direction 
 
-pletvisibility         0       show nothing
-pletvisibility         1       show number
-pletvisibility         2       show (number and bracket)-if-no-beam
-pletvisibility         3       show number, and bracket-if-no-beam
-pletvisibility         4       show number, and bracket
-
-slurdash               0       normal slurs
-slurdash               1       dotted slurs
-slurdash               >1      dashed slurs
-
-slurydirection         -1      force stem down         \slurdown
-slurydirection         0       stem direction free     \slurboth
-slurydirection         1       force stem up           \slurup
-
-slurydirection         -1      force stem down         \slurdown
-slurydirection         0       stem direction free     \slurboth
-slurydirection         1       force stem up           \slurup
-
-textalignment          -1      left alignment of text
-textalignment          0       center alignment of text
-textalignment          1       right alignment of text
-
-[Score?]
-beamslopedamping       0       no damping              \beamslopeproportional  
-beamslopedamping       1       damping1)               \beamslopedamped
-beamslopedamping       100000  zero slope              \beamslopezero
-
-[Score?]
-beamquantisation       0       no quantisations        \beamposfree
-beamquantisation       1       quantise pos and slope  \beamposnormal
-beamquantisation       2       quantise avoide wedge2) \beampostraditional
-
-[Staff]
-keyoctaviation 0       Key signature only for specified octave \specialkey
-keyoctaviation 1       Key signature for all octaves   \normalkey
-
-[Staff]
-barAlways              0       none
-barAlways              1       generate bar at every moment
-
-[Staff]
-barAuto                        0       none
-barAuto                        1       auto-generate bar every measure
-barAtLineStart         0/1     generate bar at beginning of line
-
-[Staff]
-beamAuto                0/1     auto-beam on/off
-beamAutoEnd            "num/den"    end auto-beam
-beamAutoEnd8           "num/den"    end auto-beam of 8ths
-beamAutoEnd16          "num/den"    end auto-beam of 16ths
-
-timeSignatureStyle     C       Use C and stroked C for 4/4,2/2
-timeSignatureStyle     old     Use old style mensuration marks
-timeSignatureStyle     1       Use single number
-timeSignatureStyle     ""      Use normal two-digit time signature
-timeSignatureStyle     Cn/m    Set symbol explicitly, n/m=2/2 or 4/4   
-timeSignatureStyle     oldn/m  Set symbol explicitly,
-                               n/m=2/2,3/2,3/4,4/4,6/4 or 9/4.
-[Staff]
-voltaVisibility         0/1     on/off
-voltaSpannerDuration    Rat.    Coda kludge: set length of volta-spanner,
-                                typically set to one measure: "1"
-
-[Staff?]
-instrument             ascii   midi instrument table lookup
-
-[Score]
-chordInversion         0/1     Find and display chord with inversion?
-
-
-1) after beam slope damping table suggested in [Wanske]
-2) [Wanske] as well as [Ross] suggests that beams sloped upward must not 
-   start sitting on a staffline, and beams sloped downward must not hang 
-   from a staffline (similar for beam-ends).  This would create a wedge
-   that is traditionally being avoided because it could easily be filled-up 
-   with ink.
-   However, avoiding these wedges restricts the freedom of beams quite a lot 
-   while they don't seem to be a problem in modern printing.
-   In no piece of sheetmusic engraved after 1953 (Baerenreiter) i've seen 
-   these wedges being avoided.
-
-%}
-
-%hmm, (these) abbrevs suck, imo
-% i guess they're meant as some form of doco
-% that's what i use them for...
-stemup = 
-       \property Voice.ydirection = \up 
-stemboth=      \property Voice.ydirection = \center
-stemdown =     \property Voice.ydirection = \down
-
-slurup = \notes {
-       s1*0
-       \property Voice.slurydirection = \up 
-       }
-slurboth= \notes {
-       s1*0
-       \property Voice.slurydirection = \center
+dynamicUp  = {
+  \property Voice.DynamicText \override #'direction = #1
+  \property Voice.DynamicLineSpanner \override #'direction = #1
 }
-slurdown = \notes {    
-       s1*0
-       \property Voice.slurydirection = \down
+dynamicDown = {
+  \property Voice.DynamicText \override #'direction = #-1
+  \property Voice.DynamicLineSpanner \override #'direction = #-1
 }
-
-shifton =      \property Voice.hshift = 1
-shiftoff =     \property Voice.hshift = 0
-
-onevoice = {   
-       \stemboth \shiftoff     
-}
-
-voiceone = {   
-       \type Voice = one 
-       \stemup
+dynamicBoth = {
+  \property Voice.DynamicText \revert #'direction
+  \property Voice.DynamicLineSpanner \revert #'direction
 }
 
-voicetwo = {   
-       \type Voice = two
-       \stemdown
+scriptUp  = {
+  \property Voice.TextScript \override #'direction = #1
+  \property Voice.Script \override #'direction = #1
 }
-
-voicethree = {         
-       \type Voice = three
-       \stemup
-
+scriptDown = {
+  \property Voice.TextScript \override #'direction = #-1
+  \property Voice.Script \override #'direction = #-1
 }
-
-voicefour = {  
-       \type Voice = four
-       \stemdown
-       \shifton
+scriptBoth = {
+  \property Voice.TextScript \revert #'direction
+  \property Voice.Script \revert #'direction
 }
 
-onestaff = {   
-       \translator Staff=one
-}
 
-staffone = {   
-       \translator Staff=one
-       \property Staff.ydirection = \center
-       \property Staff.hshift = 0
+cadenzaOn = \property Score.timing = ##f
+cadenzaOff = {
+  \property Score.timing = ##t
+  \property Score.measurePosition = #(make-moment 0 1)
 }
 
-stafftwo = {   
-       \translator Staff=two
-       \property Staff.ydirection = \center
-       \property Staff.hshift = 0
+% dynamic dir?  text script, articulation script dir?  
+oneVoice = {   
+  \stemBoth
+  \slurBoth
+  \tieBoth
+  \shiftOff
 }
 
-staffthree = {         
-       \translator Staff=three
-       \property Staff.ydirection = \center
-       \property Staff.hshift = 0
+voiceOne = {
+  \stemUp
+  \slurUp
+  \tieUp
 }
 
-stafffour = {  
-       \translator Staff=four
-       \property Staff.ydirection = \center
-       \property Staff.hshift = 0
+voiceTwo = {
+  \stemDown
+  \slurDown
+  \tieDown
 }
-
-% ugh, cluttering global namespace...
-none=0
-free=0
-normal=1
-traditional=2
-infinity=10000
-
-beamslopeproportional = {
-       \property Score.beamslopedamping = \none
+   
+voiceThree = {
+  \stemUp
+  \slurUp
+  \tieUp
+  \shiftOn
 }
 
-beamslopedamped = {
-       \property Score.beamslopedamping = \normal
+voiceFour = {
+  \stemDown
+  \slurDown
+  \tieDown
+  \shiftOn
 }
 
-beamslopezero = {
-       \property Score.beamslopedamping = \infinity
-}
+% 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
 
-% 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 = \none
-}
+       
+tiny  = 
+       \property Voice.fontSize= -2
 
-beamposnormal = {
-       \property Score.beamquantisation = \normal
-}
 
-beampostraditional = {
-       \property Score.beamquantisation = \traditional
-}
+small  = 
+       \property Voice.fontSize= -1
 
-slurnormal = {
-       \property Voice.slurdash = 0
-}
 
-slurdotted = {
-       \property Voice.slurdash = 1
+normalsize = {
+       \property Voice.fontSize= 0
 }
 
-%{
- for grace note hack, see input/test/grace.ly
-%}
-pletoff = {
-       \property Voice.pletvisibility = 0
-}
-pleton = {
-       \property Voice.pletvisibility = 3
-}
-tiny  = {
-       \property Voice.fontsize= "-2"
-       \pletoff %urg
+normalkey = {
+       \property Staff.keyOctaviation = ##f
 }
 
-small  = {
-       \property Voice.fontsize= "-1"
+specialkey = {
+       \property Staff.keyOctaviation = ##t
 }
 
-normalsize = {
-       \property Voice.fontsize= "0"
-       \pleton %urg
+% 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 ""
 }
 
-%{
-  [urg: try at] temporary grace note hack
-  the total visible duration of the grace notes must be half
-  the duration of the 'at' note: e.g.:
-
-  \grace b8 \graceat c4 \ecarg
-  \grace c16 b16 \graceat c4 \ecarg
-
-grace = {
-       \tiny
-% it would be so cool not to have to specify these factors each time...
-% :-(
-       \property Voice.pletvisibility = 0
-       \[1/16
-}
+autoBeamOff = \property Voice.noAutoBeaming = ##t
+autoBeamOn = \property Voice.noAutoBeaming = ##f
 
-graceat = \melodic {
-       \normalsize
-       \property Voice.pletvisibility = 0
-       \] \[31/32
-}
+emptyText = \property Voice.textNonEmpty = ##f
+fatText = \property Voice.textNonEmpty = ##t
 
-ecarg =  \melodic {
-       \property Voice.pletvisibility = 0
-       \]
-       \property Voice.pletvisibility = 3
-}
-%}
+showStaffSwitch = \property PianoStaff.followVoice = ##t
+hideStaffSwitch = \property PianoStaff.followVoice = ##f
 
-normalkey = {
-       \property Staff.keyoctaviation = 1
-}
 
-specialkey = {
-       \property Staff.keyoctaviation = 0
-}
+% To remove a Volta bracet or some other graphical object,
+% set it to turnOff. Example: \property Staff.VoltaBracket = \turnOff
 
+turnOff = #'((meta .  ((interfaces . ()))))