% -*-Scheme-*-
-\version "2.7.36"
+\version "2.7.39"
%% need SRFI-1 filter
shiftDurations =
#(define-music-function (parser location dur dots arg) (integer? integer? ly:music?)
+ ""
+
+
(music-map
(lambda (x)
(shift-one-duration-log x dur dots)) arg))
music)
applyOutput =
-#(define-music-function (parser location proc) (procedure?)
- (make-music 'ApplyOutputEvent
+#(define-music-function (parser location ctx proc) (symbol? procedure?)
+ (make-music 'ApplyOutputEvent
'origin location
- 'procedure proc))
+ 'procedure proc
+ 'context-type ctx))
overrideProperty =
#(define-music-function (parser location name property value)
(if (equal?
(cdr (assoc 'name (ly:grob-property grob 'meta)))
grob-name)
- (set! (ly:grob-property grob property) value)
- )))
+ (set! (ly:grob-property grob property) value))))
context-name)))
'origin location))
+transposedCueDuring = #
+(define-music-function
+ (parser location what dir pitch-note main-music)
+ (string? ly:dir? ly:music? ly:music?)
+
+ "Insert notes from the part @var{what} into a voice called @code{cue},
+using the transposition defined by @var{pitch-note}. 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."
+
+ (make-music 'QuoteMusic
+ 'element main-music
+ 'quoted-context-type 'Voice
+ 'quoted-context-id "cue"
+ 'quoted-music-name what
+ 'quoted-voice-direction dir
+ 'quoted-transposition (pitch-of-note pitch-note)
+ 'origin location))
+
+
quoteDuring = #
(define-music-function
(parser location what main-music)
'origin location))
-
pitchedTrill =
#(define-music-function
(parser location main-note secondary-note)
(set! (ly:music-property arg 'parenthesize) #t)
arg)
+
+
+featherDurations=
+#(define-music-function (parser location factor argument) (ly:moment? ly:music?)
+
+ "Rearrange durations in ARGUMENT so there is an
+acceleration/deceleration. "
+
+ (let*
+ ((orig-duration (ly:music-length argument))
+ (multiplier (ly:make-moment 1 1)))
+
+ (music-map
+ (lambda (mus)
+ (if (and (eq? (ly:music-property mus 'name) 'EventChord)
+ (< 0 (ly:moment-main-denominator (ly:music-length mus))))
+ (begin
+ (ly:music-compress mus multiplier)
+ (set! multiplier (ly:moment-mul factor multiplier)))
+ )
+ mus)
+ argument)
+
+ (ly:music-compress
+ argument
+ (ly:moment-div orig-duration (ly:music-length argument)))
+
+ argument))
+