]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/regression/offsets.ly
Run scripts/auxiliar/update-with-convert-ly.sh
[lilypond.git] / input / regression / offsets.ly
index 53489724036b8cabc7a89217f149cf98ed8d2b9f..c0d6a8dfedd578d7523e4c196c59a8066600b5b7 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.17.28"
+\version "2.19.21"
 
 \header {
   texidoc = "The @code{\\offset} command may be used to displace various properties
@@ -13,49 +13,50 @@ default appearance.  The command is demonstrated as a tweak and as an override."
   indent = 0
 }
 
-\relative c' {
+\relative {
 
   %% ARPEGGIO %%
   % default
-  <c e g b>1\arpeggio
-  <c e g b>1-\offset #'positions #'(-1 . 1) \arpeggio
+  <c' e g b>1\arpeggio
+  <c e g b>1-\offset positions #'(-1 . 1) \arpeggio
   \bar "||"
 
   %% BREATHING SIGN %%
   % default
   c1 \breathe
   c1
-  \once \offset #'Y-offset #1 BreathingSign
+  \once \offset Y-offset 1 BreathingSign
   \breathe
   \bar "||"
 
   %% DYNAMICS %%
   % default
   c1\f
-  \once \offset #'X-offset #-1 DynamicText
+  \once \offset X-offset #-1 DynamicText
   c1\f
   % DynamicLineSpanner
-  c1-\offset #'padding #1 \f
+  \once \offset padding 1 DynamicLineSpanner
+  c1\f
   \bar "||"
 
   %% BEAMS %%
   % default
   c'8 d e f
-  \once \offset #'positions #'(-1 . -1) Voice.Beam
+  \once \offset positions #'(-1 . -1) Voice.Beam
   c8 d e f
   % same effect as an offset of '(-2 . -2)
-  \once \offset #'positions #-2 Beam
+  \once \offset positions #-2 Beam
   c8 d e f
   \override Beam.breakable = ##t
-  c8-\offset #'positions #'((-1 . -3) (-3 . -1)) [ d e f
+  c8-\offset positions #'((-1 . -3) (-3 . -1)) [ d e f
   \break
-  g8 f e d] c-\offset #'beam-thickness #0.48 [ d e f]
+  g8 f e d] c-\offset beam-thickness 0.48 [ d e f]
   \bar "||"
 
   %% TEXT SPANNERS %%
   c4\startTextSpan d e f\stopTextSpan
-  \once \offset #'dash-fraction #'(0.1 0.3) TextSpanner
-  \once \offset #'staff-padding #'(1.0 2.0) TextSpanner
+  \once \offset dash-fraction #'(0.1 0.3) TextSpanner
+  \once \offset staff-padding #'(1.0 2.0) TextSpanner
   c4\startTextSpan d e f
   \break
   c4 d e f\stopTextSpan
@@ -63,11 +64,19 @@ default appearance.  The command is demonstrated as a tweak and as an override."
 
   %% SLURS %%
   % this duplicates the effect of the \shape command
-  \offset #'control-points #'(
+  \offset control-points #'(
    ((0 . 0) (0 . 1) (0 . 2) (0 . 1))
    ((1 . 0) (0 . 4) (0 . 4) (0 . 0))
    ) Slur
-  c4-\offset #'line-thickness #'(0 10) ( d e f
+  c4-\offset line-thickness #'(0 10) ( d e f
   \break
   c4 d e f)
+  \bar "||"
+
+  %% ACCIDENTAL, STEM %%
+  % this illustrates use of \offset as a directed tweak
+  cis2
+  \offset AccidentalPlacement.right-padding 0.5
+  \offset Stem.thickness 4.0
+  cis!2
 }