]> git.donarmstrong.com Git - lilypond.git/blobdiff - ly/spanners-init.ly
Web-ja: update introduction
[lilypond.git] / ly / spanners-init.ly
index e86ea4ea748e4c5669c4ac80ddc495f25ef99c22..8d8a69444f8815af37d8080a75fdcf6a9a34688c 100644 (file)
@@ -1,4 +1,16 @@
-\version "2.11.52"
+\version "2.19.29"
+
+"\\=" =
+#(define-event-function (id event) (key? ly:event?)
+  (_i "This sets the @code{spanner-id} property of the following
+@var{event} to the given @var{id} (non-negative integer or symbol).
+This can be used to tell LilyPond how to connect overlapping
+or parallel slurs or phrasing slurs within a single @code{Voice}.
+@lilypond[quote,verbatim]
+\\fixed c' { c\\=1( d\\=2( e\\=1) f\\=2) }
+@end lilypond\n")
+  (set! (ly:music-property event 'spanner-id) id)
+  event)
 
 startGroup = #(make-span-event 'NoteGroupingEvent START)
 stopGroup = #(make-span-event 'NoteGroupingEvent STOP)
@@ -7,7 +19,11 @@ stopGroup = #(make-span-event 'NoteGroupingEvent STOP)
 cr = #(make-span-event 'CrescendoEvent START)
 decr = #(make-span-event 'DecrescendoEvent START)
 enddecr = #(make-span-event 'DecrescendoEvent STOP)
-endcr = #(make-span-event 'CrescendoEvent STOP) 
+endcr = #(make-span-event 'CrescendoEvent STOP)
+
+
+startMeasureCount = #(make-span-event 'MeasureCounterEvent START)
+stopMeasureCount = #(make-span-event 'MeasureCounterEvent STOP)
 
 
 startTextSpan = #(make-span-event 'TextSpanEvent START)
@@ -18,69 +34,75 @@ startTrillSpan = #(make-span-event 'TrillSpanEvent START)
 stopTrillSpan = #(make-span-event 'TrillSpanEvent STOP)
 
 
-% STOP: junkme!
-cresc =  {
-  #(ly:export (make-event-chord (list cr)))
-  \set crescendoText = \markup { \italic "cresc." }
-  \set crescendoSpanner = #'text
-}
+episemInitium = #(make-span-event 'EpisemaEvent START)
+episemFinis = #(make-span-event 'EpisemaEvent STOP)
+
 
+cresc = #(make-music 'CrescendoEvent 'span-direction START 'span-type 'text 'span-text "cresc.")
+endcresc =  #(make-span-event 'CrescendoEvent STOP)
+dim = #(make-music 'DecrescendoEvent 'span-direction START 'span-type 'text 'span-text "dim.")
+enddim =  #(make-span-event 'DecrescendoEvent STOP)
+decresc = #(make-music 'DecrescendoEvent 'span-direction START 'span-type 'text 'span-text "decresc.")
+enddecresc =  #(make-span-event 'DecrescendoEvent STOP)
+
+% Deprecated functions:
+% TODO: DEPRECATED_2_13_19
+deprecatedcresc =  {
+  $(make-event-chord (list cr))
+  \once \set crescendoText = \markup { \italic "cresc." }
+  \once \set crescendoSpanner = #'text
+}
 
-dim =  {
-  #(ly:export (make-event-chord (list decr)))
 
-  \set decrescendoText = \markup { \italic "dim." }
-  \set decrescendoSpanner = #'text
+deprecateddim =  {
+  $(make-event-chord (list decr))
+  \once \set decrescendoText = \markup { \italic "dim." }
+  \once \set decrescendoSpanner = #'text
 }
 
-enddim =  {
-  #(ly:export (make-event-chord (list enddecr)))
-  \unset decrescendoText 
-  \unset decrescendoSpanner 
+deprecatedenddim =  {
+  $(make-event-chord (list enddecr))
+%  \unset decrescendoText
+%  \unset decrescendoSpanner
 }
 
-% ah, this is handy: maybe drop resetting of properties in
-% dynamic-engraver ?
-endcresc =  {
-  #(ly:export (make-event-chord (list endcr)))
-  \unset crescendoText 
-  \unset crescendoSpanner 
+deprecatedendcresc =  {
+  $(make-event-chord (list endcr))
+%  \unset crescendoText
+%  \unset crescendoSpanner
 }
 
+
 %%%%%%%%%%%%%%%%
 
 crescTextCresc = {
     \set crescendoText = \markup { \italic "cresc." }
     \set crescendoSpanner = #'text
-    \override DynamicTextSpanner #'style = #'dashed-line
 }
 
 dimTextDecresc = {
     \set decrescendoText = \markup { \italic "decresc." }
     \set decrescendoSpanner = #'text
-    \override DynamicTextSpanner #'style = #'dashed-line
 }
 
 dimTextDecr = {
     \set decrescendoText = \markup { \italic "decr." }
     \set decrescendoSpanner = #'text
-    \override DynamicTextSpanner #'style = #'dashed-line
 }
 
 dimTextDim = {
     \set decrescendoText = \markup { \italic "dim." }
     \set decrescendoSpanner = #'text
-    \override DynamicTextSpanner #'style = #'dashed-line
 }
 
 crescHairpin = {
-    \unset crescendoText 
-    \unset crescendoSpanner 
+    \unset crescendoText
+    \unset crescendoSpanner
 }
 
 dimHairpin = {
-    \unset decrescendoText 
-    \unset decrescendoSpanner 
+    \unset decrescendoText
+    \unset decrescendoSpanner
 }
 
 
@@ -98,3 +120,5 @@ sostenutoOff = #(make-span-event 'SostenutoEvent STOP)
 %dim = \set crescendoText = "dim."
 
 newSpacingSection = #(make-event-chord (list (make-music 'SpacingSectionEvent)))
+
+breakDynamicSpan = #(make-music 'BreakDynamicSpanEvent)