(_i "Attach @var{text} to @var{grob-name} at offset @var{offset},
with @var{text} referring to @var{footnote} (use like @code{\\once})")
(make-music 'FootnoteEvent
+ 'automatically-numbered #f
'symbol grob-name
'X-offset (car offset)
'Y-offset (cdr offset)
the number appears at @var{offset}. Note that, for this to take effect,
auto-numbering must be turned on in the paper block. Otherwise, no
number will appear. Use like @code{\\once})")
- #{
- \footnoteGrob $grob-name $offset \markup { \null } $footnote
- #})
+ (make-music 'FootnoteEvent
+ 'automatically-numbered #t
+ 'symbol grob-name
+ 'X-offset (car offset)
+ 'Y-offset (cdr offset)
+ 'text (make-null-markup)
+ 'footnote-text footnote))
+
footnote =
#(define-music-function (parser location offset text footnote)
(_i "Attach @var{text} at @var{offset} with @var{text} referring
to @var{footnote} (use like @code{\\tweak})")
(make-music 'FootnoteEvent
+ 'automatically-numbered #f
'X-offset (car offset)
'Y-offset (cdr offset)
'text text
'footnote-text footnote))
-% this function can't be a simple copy and past of the above because
-% it needs to be encapsulated in a Sequential Music.
-% so, there's a code dup of above :-(
autoFootnote =
#(define-music-function (parser location offset footnote)
(number-pair? markup?)
take effect, auto-numbering must be turned on in the paper block.
Otherwise, no number will appear. Use like @code{\\tweak})")
(make-music 'FootnoteEvent
+ 'automatically-numbered #t
'X-offset (car offset)
'Y-offset (cdr offset)
'text (make-null-markup)
modalInversion =
#(define-music-function (parser location around to scale music)
- (ly:music? ly:music? ly:music? ly:music?)
+ (ly:pitch? ly:pitch? ly:music? ly:music?)
(_i "Invert @var{music} about @var{around} using @var{scale} and
transpose from @var{around} to @var{to}.")
(let ((inverter (make-modal-inverter around to scale)))
modalTranspose =
#(define-music-function (parser location from to scale music)
- (ly:music? ly:music? ly:music? ly:music?)
+ (ly:pitch? ly:pitch? ly:music? ly:music?)
(_i "Transpose @var{music} from pitch @var{from} to pitch @var{to}
using @var{scale}.")
(let ((transposer (make-modal-transposer from to scale)))
inversion =
#(define-music-function
- (parser location around to music) (ly:music? ly:music? ly:music?)
+ (parser location around to music) (ly:pitch? ly:pitch? ly:music?)
(_i "Invert @var{music} about @var{around} and
transpose from @var{around} to @var{to}.")
(music-invert around to music))
octaveCheck =
-#(define-music-function (parser location pitch-note) (ly:music?)
+#(define-music-function (parser location pitch) (ly:pitch?)
(_i "Octave check.")
(make-music 'RelativeOctaveCheck
- 'pitch (pitch-of-note pitch-note)))
+ 'pitch pitch))
ottava =
#(define-music-function (parser location octave) (integer?)
partcombineAutomatic = \partcombineForce ##f ##f
partcombineAutomaticOnce = \partcombineForce ##f ##t
+partial =
+#(define-music-function (parser location dur) (ly:duration?)
+ (_i "Make a partial measure.")
+
+ ;; We use `descend-to-context' here instead of `context-spec-music' to
+ ;; ensure \partial still works if the Timing_translator is moved
+ (descend-to-context
+ (context-spec-music (make-music 'PartialSet
+ 'origin location
+ 'partial-duration dur)
+ 'Timing)
+ 'Score))
pitchedTrill =
#(define-music-function
music))
resetRelativeOctave =
-#(define-music-function (parser location reference-note) (ly:music?)
+#(define-music-function (parser location pitch) (ly:pitch?)
(_i "Set the octave inside a \\relative section.")
- (let* ((notes (ly:music-property reference-note 'elements))
- (pitch (ly:music-property (car notes) 'pitch)))
-
- (set! (ly:music-property reference-note 'elements) '())
- (set! (ly:music-property reference-note 'to-relative-callback)
- (lambda (music last-pitch)
- pitch))
-
- reference-note))
+ (make-music 'SequentialMusic
+ 'to-relative-callback
+ (lambda (music last-pitch) pitch)))
retrograde =
#(define-music-function (parser location music)
#(define-music-function (parser location finger) (number-or-string?)
(_i "Apply @var{finger} as a fingering indication.")
- (apply make-music
- (append
- (list
- 'StrokeFingerEvent
- 'origin location)
- (if (string? finger)
- (list 'text finger)
- (list 'digit finger)))))
-
-
+ (make-music
+ 'StrokeFingerEvent
+ 'origin location
+ (if (string? finger) 'text 'digit)
+ finger))
scaleDurations =
#(define-music-function (parser location fraction music)
(lambda (x)
(shift-one-duration-log x dur dots)) arg))
+skip =
+#(define-music-function (parser location dur) (ly:duration?)
+ (_i "Skip forward by @var{dur}.")
+ (make-music 'SkipMusic
+ 'duration dur))
+
+
slashedGrace =
#(def-grace-function startSlashedGraceMusic stopSlashedGraceMusic
(_i "Create slashed graces (slashes through stems, but no slur) from
(ly:music-property arg 'tags)))
arg)
+transpose =
+#(define-music-function
+ (parser location from to music)
+ (ly:pitch? ly:pitch? ly:music?)
+
+ (_i "Transpose @var{music} from pitch @var{from} to pitch @var{to}.")
+ (make-music 'TransposedMusic
+ 'element (ly:music-transpose music (ly:pitch-diff to from))))
+
transposedCueDuring =
#(define-music-function
- (parser location what dir pitch-note main-music)
- (string? ly:dir? ly:music? ly:music?)
+ (parser location what dir pitch main-music)
+ (string? ly:dir? ly:pitch? ly:music?)
(_i "Insert notes from the part @var{what} into a voice called @code{cue},
-using the transposition defined by @var{pitch-note}. This happens
+using the transposition defined by @var{pitch}. This happens
simultaneously with @var{main-music}, which is usually a rest. The
argument @var{dir} determines whether the cue notes should be notated
as a first or second voice.")
'quoted-context-id "cue"
'quoted-music-name what
'quoted-voice-direction dir
- 'quoted-transposition (pitch-of-note pitch-note)))
+ 'quoted-transposition pitch))
transposition =
-#(define-music-function (parser location pitch-note) (ly:music?)
+#(define-music-function (parser location pitch) (ly:pitch?)
(_i "Set instrument transposition")
(context-spec-music
(make-property-set 'instrumentTransposition
- (ly:pitch-negate (pitch-of-note pitch-note)))
+ (ly:pitch-negate pitch))
'Staff))
tweak =