summaryrefslogtreecommitdiff
path: root/scm
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@xs4all.nl>2006-07-19 12:02:22 +0000
committerHan-Wen Nienhuys <hanwen@xs4all.nl>2006-07-19 12:02:22 +0000
commite864a61c53a13b5b53843dc702f6ba4e54a8fc6b (patch)
tree45867cece53d0d2c93919803fd00a621a3ed3c71 /scm
parent1a61d0b5a931377348f579b3379cc6ccb129af8e (diff)
*** empty log message ***
Diffstat (limited to 'scm')
-rw-r--r--scm/define-grobs.scm9
-rw-r--r--scm/define-music-properties.scm31
-rw-r--r--scm/define-music-types.scm6
-rw-r--r--scm/define-stencil-commands.scm7
-rw-r--r--scm/output-lib.scm35
-rw-r--r--scm/output-ps.scm8
6 files changed, 79 insertions, 17 deletions
diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm
index 9ac56f093c..6c91ae3159 100644
--- a/scm/define-grobs.scm
+++ b/scm/define-grobs.scm
@@ -314,6 +314,14 @@
(interfaces . (staff-symbol-referencer-interface
beam-interface))))))
+ (BendAfter
+ . (
+ (stencil . ,fall::print)
+ (thickness . 2.0)
+ (meta . ((class . Spanner)
+ (interfaces . (spanner-interface
+ fall-interface))))))
+
(BreakAlignment
. (
(non-musical . #t)
@@ -603,6 +611,7 @@
dynamic-text-spanner-interface
spanner-interface))))))
+
(Fingering
. (
diff --git a/scm/define-music-properties.scm b/scm/define-music-properties.scm
index 9bf878ed6a..5ee322a5ca 100644
--- a/scm/define-music-properties.scm
+++ b/scm/define-music-properties.scm
@@ -16,12 +16,8 @@
(map
(lambda (x) (apply music-property-description x))
`(
- (iterator-ctor ,procedure? "Function to construct music-event-iterator object for this Music")
- (duration ,ly:duration? "Duration of this note/lyric.")
- (metronome-count ,number? "How many beats in a minute?")
- (span-type ,string? "What kind of spanner should be created?
+ (alteration ,number? "alteration for figured bass")
-TODO: consider making type into symbol")
(absolute-octave ,integer?
"The absolute octave for a octave check note.")
(articulations ,ly:music-list?
@@ -32,6 +28,9 @@ TODO: consider making type into symbol ")
(augmented ,boolean? "This figure is for an augmented figured bass (with +) sign.")
(associated-context ,string? "Name of the Voice context associated with this \\newaddlyrics section")
(bass ,boolean? "Set if this note is a bass note in a chord")
+ (bracket-start ,boolean? "start a bracket
+here. TODO: use SpanEvents?")
+ (bracket-stop ,boolean? "stop a bracket here.")
(break-penalty ,number? "Penalty for line break hint.")
(break-permission ,symbol? "Whether to allow, forbid or force a line break.")
(cautionary ,boolean? "If set, this alteration needs cautionary accidental")
@@ -40,34 +39,43 @@ TODO: consider making type into symbol ")
(compress-procedure ,procedure? "compress this music expression. Argument 1: the music, arg 2: factor")
(context-id ,string? "name of context")
(context-type ,symbol? "type of context")
- (create-new ,boolean? "Create a fresh context.")
+ (create-new ,boolean? "Create a fresh context.")
+ (delta-pitch ,number? "How much should a fall change pitch?")
(descend-only ,boolean? "If set, this @code{\\context} will only descend in the context tree.")
(denominator ,integer? "denominator in a time signature")
(digit ,integer? "digit for fingering")
(diminished ,boolean? "This bass figure should be slashed.")
(direction ,ly:dir? "Print this up or down?")
(drum-type ,symbol? "Which percussion instrument to play this note on.")
+ (duration ,ly:duration? "Duration of this note/lyric.")
(error-found ,boolean? "If true, a parsing error was found in this expression")
(element ,ly:music? "The single child of a Music_wrapper music object, or the body of a repeat.")
(elements ,ly:music-list? "A list of elements for sequential of simultaneous music, or the alternatives of repeated music. ")
(elements-callback ,procedure? "Return a list of children, for use by a sequential iterator. Takes a single Music parameter")
(expected-beam-count ,integer? "Expected number of non-tremolo beams in a tremolo repeat")
+ (figure ,integer? "a bass figure")
(force-accidental ,boolean? "If set, a cautionary accidental should always be printed on this note")
(grob-property ,symbol? "The symbol of the grob property to set. ")
(grob-property-path ,list? "A list of symbols, locating a nested grob property, e.g. (beamed-lengths details). ")
(grob-value ,scheme? "The value of the grob property to set")
(input-tag ,scheme? "Arbitrary marker to relate input and output")
(inversion ,boolean? "If set, this chord note is inverted.")
+ (iterator-ctor ,procedure? "Function to construct music-event-iterator object for this Music")
+
(label ,markup? "label of a mark.")
(last-pitch ,ly:pitch? "The last pitch after relativization.")
(length ,ly:moment? "The duration of this music")
(length-callback ,procedure? "How to compute the duration of this music. This property can only be defined as initializer in @file{define-music-types.scm}.")
+ (metronome-count ,number? "How many beats in a minute?")
(name ,symbol? "Name of this music object")
(no-continuation ,boolean? "If set, disallow continuation lines")
(numerator ,integer? "numerator of a time signature")
(once ,boolean? "Apply this operation only during one time step?")
(octavation ,integer? "This pitch was octavated by how many octaves? For chord inversions, this is negative.")
(origin ,ly:input-location? "where was this piece of music defined?")
+ (part-combine-status ,symbol?
+ "Change to what kind of state? Options are
+solo1, solo2 and unisono")
(parenthesize ,boolean? "Enclose resulting objects in parentheses?")
(pitch ,ly:pitch? "the pitch of this note")
(pitch-alist ,list? "list of pitches jointly forming the scale of a key signature")
@@ -90,6 +98,9 @@ for the grob made of this event.")
(repeat-count ,integer? "do a @code{\repeat} how ofen?")
(span-direction ,ly:dir? "Does this start or stop a spanner?")
+ (span-type ,string? "What kind of spanner should be created?
+
+TODO: consider making type into symbol")
(split-list ,list? "splitting moments for part combiner.")
(start-callback ,procedure? "Function to compute the negative
length of starting grace notes. This property can only be defined as
@@ -113,14 +124,6 @@ translation property")
(void ,boolean? "If this property is #t, then the music expression is to be
discarded by the toplevel music handler.")
(what ,symbol? "What to change for auto-change. FIXME, naming")
- (part-combine-status ,symbol?
- "Change to what kind of state? Options are
-solo1, solo2 and unisono")
- (figure ,integer? "a bass figure")
- (alteration ,number? "alteration for figured bass")
- (bracket-start ,boolean? "start a bracket
-here. TODO: use SpanEvents?")
- (bracket-stop ,boolean? "stop a bracket here.")
(untransposable ,boolean? "If set, this music is not transposed.")
)))
diff --git a/scm/define-music-types.scm b/scm/define-music-types.scm
index 251de0488e..3043c8aa52 100644
--- a/scm/define-music-types.scm
+++ b/scm/define-music-types.scm
@@ -104,6 +104,11 @@ Syntax for manual control:
c8-[ c c-] c8")
(types . (general-music event beam-event span-event))
))
+
+ (BendAfterEvent
+ . ((description . "A drop/fall/doit jazz articulation")
+ (types . (general-music fall-event event))))
+
(BreakEvent
. (
(description . "Create a line break, Syntax: \\break or page break, Syntax: \\pagebreak.")
@@ -189,6 +194,7 @@ Syntax: @var{note}\\cr
(types . (general-music event-chord simultaneous-music))
))
+
(FingerEvent
. (
(description . "Specify what finger to use for this note.")
diff --git a/scm/define-stencil-commands.scm b/scm/define-stencil-commands.scm
index 7a9740c76e..9b0b9422d6 100644
--- a/scm/define-stencil-commands.scm
+++ b/scm/define-stencil-commands.scm
@@ -17,20 +17,21 @@
dashed-slur
dot
draw-line
+ embedded-ps
glyph-string
named-glyph
+ path
polygon
repeat-slash
+ resetcolor
round-filled-box
+ setcolor
text
url-link
utf-8-string
white-dot
white-text
- embedded-ps
zigzag-line
- setcolor
- resetcolor
grob-cause
no-origin
diff --git a/scm/output-lib.scm b/scm/output-lib.scm
index 950e552e2a..572fcaff43 100644
--- a/scm/output-lib.scm
+++ b/scm/output-lib.scm
@@ -340,3 +340,38 @@ centered, X==1 is at the right, X == -1 is at the left."
value)
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; falls
+
+(define-public (fall::print spanner)
+ (let*
+ ((delta (ly:grob-property spanner 'delta-position))
+ (left-span (ly:spanner-bound spanner LEFT))
+ (right-span (ly:spanner-bound spanner RIGHT))
+ (thickness (* (ly:grob-property spanner 'thickness)
+ (ly:output-def-lookup (ly:grob-layout spanner) 'line-thickness)))
+ (padding (ly:grob-property spanner 'padding 0.5))
+ (common (ly:grob-common-refpoint right-span
+ (ly:grob-common-refpoint spanner
+ left-span X)
+ X))
+ (left-x (+ padding (interval-end (ly:grob-robust-relative-extent left-span common X))))
+ (right-x (- (interval-start (ly:grob-robust-relative-extent right-span common X)) padding))
+ (self-x (ly:grob-relative-coordinate spanner common X))
+ (dx (- right-x left-x))
+ (exp (list 'path thickness
+ `(quote
+ (,(- left-x self-x) 0
+ rmoveto
+ ,(/ dx 3)
+ 0
+ ,dx ,(* 0.66 delta)
+ ,dx ,delta
+ rcurveto))))
+ )
+
+ (ly:make-stencil
+ exp
+ (cons 0 dx)
+ (cons (min 0 delta)
+ (max 0 delta)))))
diff --git a/scm/output-ps.scm b/scm/output-ps.scm
index 1beaef6361..f71bc3dfce 100644
--- a/scm/output-ps.scm
+++ b/scm/output-ps.scm
@@ -320,3 +320,11 @@
(str4 thick)
(str4 dx)
(str4 dy)))
+
+(define (path thickness exps)
+ (format
+ "1 setlinecap ~a setlinewidth\n~a stroke"
+ thickness
+ (string-join (map (lambda (x) (format "~a" x)) exps)
+ " ")))
+