% -*-Scheme-*-
-\version "2.7.32"
+\version "2.7.39"
%% need SRFI-1 filter
'origin location
'procedure proc))
+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))
+
musicMap =
#(define-music-function (parser location proc mus) (procedure? ly:music?)
(music-map proc mus))
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)
(set! grob-name (string->symbol (list-ref name-components 1)))
(set! context-name (string->symbol (list-ref name-components 0)))))
- (context-spec-music
- (make-music 'ApplyOutputEvent
- 'origin location
- 'procedure
- (lambda (grob orig-context context)
- (if (equal?
- (cdr (assoc 'name (ly:grob-property grob 'meta)))
- grob-name)
- (set! (ly:grob-property grob property) value)
- )))
-
- context-name)))
+ (make-music 'ApplyOutputEvent
+ 'origin location
+ 'context-type context-name
+ 'procedure
+ (lambda (grob orig-context context)
+ (if (equal?
+ (cdr (assoc 'name (ly:grob-property grob 'meta)))
+ grob-name)
+ (set! (ly:grob-property grob property) value))))))
breathe =
#(define-music-function (parser location) ()
'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))
+
+
+
+
+resetRelativeOctave =
+#(define-music-function
+ (parser location reference-note)
+ (ly:music?)
+ "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))
+