\Score
keyAlterationOrder =
#`(
- (6 . ,FLAT) (2 . ,FLAT) (5 . ,FLAT ) (1 . ,FLAT)
- (4 . ,FLAT) (0 . ,FLAT) (3 . ,FLAT)
- (6 . ,SEMI-FLAT) (2 . ,SEMI-FLAT) (5 . ,SEMI-FLAT ) (1 . ,SEMI-FLAT)
- (4 . ,SEMI-FLAT) (0 . ,SEMI-FLAT) (3 . ,SEMI-FLAT)
- (3 . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP)
- (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP)
- (3 . ,SEMI-SHARP) (0 . ,SEMI-SHARP) (4 . ,SEMI-SHARP) (1 . ,SEMI-SHARP)
- (5 . ,SEMI-SHARP) (2 . ,SEMI-SHARP) (6 . ,SEMI-SHARP)
- (6 . ,DOUBLE-FLAT) (2 . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT ) (1 . ,DOUBLE-FLAT)
- (4 . ,DOUBLE-FLAT) (0 . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT)
- (3 . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP) (1 . ,DOUBLE-SHARP)
- (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP)
- )
+ (6 . ,FLAT) (2 . ,FLAT) (5 . ,FLAT ) (1 . ,FLAT)
+ (4 . ,FLAT) (0 . ,FLAT) (3 . ,FLAT)
+ (6 . ,SEMI-FLAT) (2 . ,SEMI-FLAT) (5 . ,SEMI-FLAT ) (1 . ,SEMI-FLAT)
+ (4 . ,SEMI-FLAT) (0 . ,SEMI-FLAT) (3 . ,SEMI-FLAT)
+ (3 . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP)
+ (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP)
+ (3 . ,SEMI-SHARP) (0 . ,SEMI-SHARP) (4 . ,SEMI-SHARP) (1 . ,SEMI-SHARP)
+ (5 . ,SEMI-SHARP) (2 . ,SEMI-SHARP) (6 . ,SEMI-SHARP)
+ (6 . ,DOUBLE-FLAT) (2 . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT ) (1 . ,DOUBLE-FLAT)
+ (4 . ,DOUBLE-FLAT) (0 . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT)
+ (3 . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP) (1 . ,DOUBLE-SHARP)
+ (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP)
+ )
}
}
%%%USAGE
% In the \score section do:
% \articulate <<
-% all the rest of the score
+% all the rest of the score
% >>
% or use the lilywrap script.
%
% -- accent needs better control of dynamics.
% -- Articulations: mezzo-staccato, portato.
% -- Handling of generic ornaments (in lily, `\stopped'; in
-% most early music: ornament this note (trill, turn
-% or mordent as the player wishes))
+% most early music: ornament this note (trill, turn
+% or mordent as the player wishes))
% * Automatic gruppetto at end of trill; better handling of
% initial/final grace notes on trill
% * Automatic ornaments.
#t)
(begin
(if (any (lambda (z) (eq? 'NoteEvent (ly:music-property z 'name)))
- (ly:music-property lastev 'elements))
- (ly:warning (_ "stealing the entirety of a note's time")))
+ (ly:music-property lastev 'elements))
+ (ly:warning (_ "stealing the entirety of a note's time")))
(set! (ly:music-property lastev 'elements) '())
(set! ac:eventsBackward (cdr ac:eventsBackward))
(ac:stealTimeBackward (- tosteal levlen))))))))
% Raise note one step in the current diatonic scale.
#(define (ac:up note)
(let* ((pitch (ly:music-property note 'pitch))
- (notename (ly:pitch-notename pitch))
- (new-notename (if (eq? notename 6) 0 (+ 1 notename)))
- (alterations (ly:music-property ac:current-key 'pitch-alist))
- (new-alteration (cdr (assq new-notename alterations)))
- (new-octave (if (eq? new-notename 0) (+ 1 (ly:pitch-octave pitch))
- (ly:pitch-octave pitch)))
+ (notename (ly:pitch-notename pitch))
+ (new-notename (if (eq? notename 6) 0 (+ 1 notename)))
+ (alterations (ly:music-property ac:current-key 'pitch-alist))
+ (new-alteration (cdr (assq new-notename alterations)))
+ (new-octave (if (eq? new-notename 0) (+ 1 (ly:pitch-octave pitch))
+ (ly:pitch-octave pitch)))
)
(set! (ly:music-property note 'pitch)(ly:make-pitch new-octave new-notename new-alteration))))
% Lower note one step in the current diatonic scale.
#(define (ac:down note)
(begin (let* ((pitch (ly:music-property note 'pitch))
- (notename (ly:pitch-notename pitch))
- (new-notename (if (eq? notename 0) 6 (- notename 1)))
- (alterations (ly:music-property ac:current-key 'pitch-alist))
- (new-alteration (cdr (assq new-notename alterations)))
- (new-octave (if (eq? new-notename 6) (- (ly:pitch-octave pitch) 1)
- (ly:pitch-octave pitch)))
+ (notename (ly:pitch-notename pitch))
+ (new-notename (if (eq? notename 0) 6 (- notename 1)))
+ (alterations (ly:music-property ac:current-key 'pitch-alist))
+ (new-alteration (cdr (assq new-notename alterations)))
+ (new-octave (if (eq? new-notename 6) (- (ly:pitch-octave pitch) 1)
+ (ly:pitch-octave pitch)))
)
(set! (ly:music-property note 'pitch)(ly:make-pitch new-octave new-notename new-alteration))))
)
% Used in afterGrace to mark all notes as tenuto, so they're not shortened
#(define (ac:add-articulation type music)
(music-map (lambda (m)
- (if (eq? 'EventChord (ly:music-property m 'name))
- (set! (ly:music-property m 'elements)
- (append (ly:music-property m 'elements)
- (list (make-music 'ArticulationEvent 'articulation-type type)))))
- m)
+ (if (eq? 'EventChord (ly:music-property m 'name))
+ (set! (ly:music-property m 'elements)
+ (append (ly:music-property m 'elements)
+ (list (make-music 'ArticulationEvent 'articulation-type type)))))
+ m)
music))
% Convert a long note to an equivalent set of short notes, tied together.
#(define (ac:to128_disabled music)
(if (or (eq? 'SkipEvent (ly:music-property music 'name))
- (eq? 'NoteEvent (ly:music-property music 'name)))
+ (eq? 'NoteEvent (ly:music-property music 'name)))
(let* ((dur (ly:music-property music 'duration))
- (log2 (ly:duration-log dur))
- (shiftcount (- 6 log2))
- (lastm (ly:music-deep-copy (shift-duration-log music shiftcount 0))))
+ (log2 (ly:duration-log dur))
+ (shiftcount (- 6 log2))
+ (lastm (ly:music-deep-copy (shift-duration-log music shiftcount 0))))
(set! (ly:music-property music 'elements)
(cons (make-music 'TieEvent) (ly:music-property music 'elements)))
(make-sequential-music (list
- (make-repeat "unfold" (1- (expt 2 shiftcount))
- (make-sequential-music (list music)) '())
- lastm)))
+ (make-repeat "unfold" (1- (expt 2 shiftcount))
+ (make-sequential-music (list music)) '())
+ lastm)))
music))
% If the music has a precomputed twiddletime (e.g., from \afterGrace) use that.
#(define (ac:twiddletime music)
(let* ((tr (filter (lambda (x)
- (and (eq? 'ArticulationEvent (ly:music-property x 'name))
- (string= "trill" (ly:music-property x 'articulation-type))))
- (ly:music-property music 'elements)))
- (pre-t (if (pair? tr) (ly:music-property (car tr) 'twiddle)
- '()))
- (hemisemimom (ly:make-moment 1/64))
- (t (ac:targetTwiddleTime)))
+ (and (eq? 'ArticulationEvent (ly:music-property x 'name))
+ (string= "trill" (ly:music-property x 'articulation-type))))
+ (ly:music-property music 'elements)))
+ (pre-t (if (pair? tr) (ly:music-property (car tr) 'twiddle)
+ '()))
+ (hemisemimom (ly:make-moment 1/64))
+ (t (ac:targetTwiddleTime)))
(if (ly:moment? pre-t)
pre-t
hemisemimom)))
" Replace music with time-compressed repeats of the music,
maybe accelerating if the length is longer than a crotchet "
(let* ((hemisemidur (ly:make-duration 5 0 1/1))
- (orig-len (ly:music-length music))
- (t (ac:twiddletime music))
- (uppernote '())
- (note_moment (ly:moment-mul t (ly:make-moment 1/2)))
- (c1 (ly:moment-div orig-len t))
- (c2 (inexact->exact
- (round (/ (ly:moment-main-numerator c1)
- (* 2 (ly:moment-main-denominator c1))))))
- (count (if (< c2 2) 2 c2)))
+ (orig-len (ly:music-length music))
+ (t (ac:twiddletime music))
+ (uppernote '())
+ (note_moment (ly:moment-mul t (ly:make-moment 1/2)))
+ (c1 (ly:moment-div orig-len t))
+ (c2 (inexact->exact
+ (round (/ (ly:moment-main-numerator c1)
+ (* 2 (ly:moment-main-denominator c1))))))
+ (count (if (< c2 2) 2 c2)))
(set! (ly:music-property music 'elements)
(filter (lambda (y) (eq? 'NoteEvent (ly:music-property y 'name)))
(ly:music-property uppernote 'elements)))
(let* ((trillMusicElements
- (let loop ((so_far (list uppernote music))
- (c count))
- (if (> c 1)
- (loop (append (list (ly:music-deep-copy uppernote) (ly:music-deep-copy music)) so_far) (1- c))
- so_far)))
- (trillMusic (make-sequential-music trillMusicElements))
- (newlen (ly:music-length trillMusic))
- (factor (ly:moment-div orig-len newlen)))
+ (let loop ((so_far (list uppernote music))
+ (c count))
+ (if (> c 1)
+ (loop (append (list (ly:music-deep-copy uppernote) (ly:music-deep-copy music)) so_far) (1- c))
+ so_far)))
+ (trillMusic (make-sequential-music trillMusicElements))
+ (newlen (ly:music-length trillMusic))
+ (factor (ly:moment-div orig-len newlen)))
(ly:music-compress trillMusic factor)
; accelerating the music seems to put lily into an infinite loop in
; its layout and midi engines.
; (let* ((realfactor (exp (* (/ 1.0 count) (log 0.75))))
-; (factor (ly:make-moment (inexact->exact (round (* 1024 realfactor)))
-; 1024)))
+; (factor (ly:make-moment (inexact->exact (round (* 1024 realfactor)))
+; 1024)))
; (ac:accel trillMusic factor))
)))
#(define (ac:tempoChange tempo)
(make-sequential-music
(list (make-music 'TempoChangeEvent
- 'metronome-count
- tempo
- 'tempo-unit
- (ly:make-duration 0 0 1/1))
+ 'metronome-count
+ tempo
+ 'tempo-unit
+ (ly:make-duration 0 0 1/1))
(context-spec-music
(make-property-set 'tempoWholesPerMinute tempo) 'Score))))
((UnfoldedRepeatedMusic)
(let
((body (ly:music-property m 'element))
- (altl (ly:music-property m 'elements))
- (rc (ly:music-property m 'repeat-count)))
+ (altl (ly:music-property m 'elements))
+ (rc (ly:music-property m 'repeat-count)))
(if (null? altl)
- (make-sequential-music
- (list-tabulate rc (lambda (i) (ly:music-deep-copy body))))
- (let ((ealtl (if (> (length altl) rc) (take altl rc) altl)))
- (make-sequential-music
- (apply append!
- (append!
- (list-tabulate
- (- rc (length ealtl))
- (lambda (i) (list (ly:music-deep-copy body) (ly:music-deep-copy (car ealtl)))))
- (map (lambda (alt) (list (ly:music-deep-copy body) alt)) ealtl))))))))
+ (make-sequential-music
+ (list-tabulate rc (lambda (i) (ly:music-deep-copy body))))
+ (let ((ealtl (if (> (length altl) rc) (take altl rc) altl)))
+ (make-sequential-music
+ (apply append!
+ (append!
+ (list-tabulate
+ (- rc (length ealtl))
+ (lambda (i) (list (ly:music-deep-copy body) (ly:music-deep-copy (car ealtl)))))
+ (map (lambda (alt) (list (ly:music-deep-copy body) alt)) ealtl))))))))
((EventChord)
(let-values
(((trem evl)
- (partition (lambda (v) (eq? (ly:music-property v 'name) 'TremoloEvent))
- (ly:music-property m 'elements))))
+ (partition (lambda (v) (eq? (ly:music-property v 'name) 'TremoloEvent))
+ (ly:music-property m 'elements))))
(if (null? trem)
- m
- (let*
- ((tremtype (ly:music-property (car trem) 'tremolo-type))
- (tremtype-log (1- (integer-length tremtype)))
- (durev (find (lambda (v) (not (null? (ly:music-property v 'duration)))) evl))
- (totaldur (if durev (ly:music-property durev 'duration) (ly:make-duration tremtype-log 0 1)))
- (tgt-nrep (/ (duration-visual-length totaldur) (duration-log-factor tremtype-log)))
- (eff-nrep (max (truncate tgt-nrep) 1))
- (tremdur (ly:make-duration tremtype-log 0
- (* (/ tgt-nrep eff-nrep) (ly:duration-scale totaldur)))))
- (or (and (= eff-nrep tgt-nrep) (= (ash 1 tremtype-log) tremtype))
- (ly:warning (_ "non-integer tremolo ~a:~a")
- (duration->lily-string (duration-visual totaldur) #:force-duration #t #:time-scale 1)
- tremtype))
- (for-each
- (lambda (v)
- (or (null? (ly:music-property v 'duration))
- (set! (ly:music-property v 'duration) tremdur)))
- evl)
- (set! (ly:music-property m 'elements) evl)
- (make-sequential-music
- (list-tabulate eff-nrep (lambda (i) (ly:music-deep-copy m))))))))
+ m
+ (let*
+ ((tremtype (ly:music-property (car trem) 'tremolo-type))
+ (tremtype-log (1- (integer-length tremtype)))
+ (durev (find (lambda (v) (not (null? (ly:music-property v 'duration)))) evl))
+ (totaldur (if durev (ly:music-property durev 'duration) (ly:make-duration tremtype-log 0 1)))
+ (tgt-nrep (/ (duration-visual-length totaldur) (duration-log-factor tremtype-log)))
+ (eff-nrep (max (truncate tgt-nrep) 1))
+ (tremdur (ly:make-duration tremtype-log 0
+ (* (/ tgt-nrep eff-nrep) (ly:duration-scale totaldur)))))
+ (or (and (= eff-nrep tgt-nrep) (= (ash 1 tremtype-log) tremtype))
+ (ly:warning (_ "non-integer tremolo ~a:~a")
+ (duration->lily-string (duration-visual totaldur) #:force-duration #t #:time-scale 1)
+ tremtype))
+ (for-each
+ (lambda (v)
+ (or (null? (ly:music-property v 'duration))
+ (set! (ly:music-property v 'duration) tremdur)))
+ evl)
+ (set! (ly:music-property m 'elements) evl)
+ (make-sequential-music
+ (list-tabulate eff-nrep (lambda (i) (ly:music-deep-copy m))))))))
((MultiMeasureRestMusic)
(make-sequential-music
(list
- (make-music 'BarCheck)
- (make-music 'SkipMusic 'duration (ly:music-property m 'duration))
- (make-music 'BarCheck))))
+ (make-music 'BarCheck)
+ (make-music 'SkipMusic 'duration (ly:music-property m 'duration))
+ (make-music 'BarCheck))))
(else
m)))
(unfold-repeats music)))
% trills, turns, ornaments etc. are also treated as Articulations.
% Split into two functions:
% ac:getactions traverses the elements in the EventChord
-% and calculates the parameters.
+% and calculates the parameters.
% ac:articulate-chord applies the actions to each NoteEvent in
-% the EventChord.
+% the EventChord.
#(define (ac:getactions music)
(let loop ((factor ac:normalFactor)
- (newelements '())
- (es (ly:music-property music 'elements))
- (actions '()))
+ (newelements '())
+ (es (ly:music-property music 'elements))
+ (actions '()))
(if (null? es)
(begin
(set! (ly:music-property music 'elements) (reverse newelements))
(if
(not (any (lambda (m) (music-is-of-type? m 'rhythmic-event))
- newelements))
+ newelements))
actions
(append
(let ((st ac:stealForward))
- (if (= st 0)
- '()
- (begin
- (set! ac:stealForward 0)
- (list 'steal st))))
+ (if (= st 0)
+ '()
+ (begin
+ (set! ac:stealForward 0)
+ (list 'steal st))))
actions
(cond
- (ac:inTrill '(trill))
- ((and (eq? factor ac:normalFactor) (or ac:inSlur ac:inPhrasingSlur))
- (list 'articulation '(1 . 1)))
- (else (list 'articulation factor))))))
+ (ac:inTrill '(trill))
+ ((and (eq? factor ac:normalFactor) (or ac:inSlur ac:inPhrasingSlur))
+ (list 'articulation '(1 . 1)))
+ (else (list 'articulation factor))))))
; else part
(let ((e (car es))
- (tail (cdr es)))
+ (tail (cdr es)))
(case (ly:music-property e 'name)
((BeamEvent) ; throw away beam events, or they'll be duplicated by turn or trill
((ArticulationEvent)
(let ((articname (ly:music-property e 'articulation-type)))
- ; TODO: add more here
- (cond
- ((string= articname "staccato")
- (loop ac:staccatoFactor newelements tail actions))
- ((string= articname "staccatissimo")
- (loop ac:staccatissimoFactor newelements tail actions))
- ((string= articname "tenuto")
- (loop ac:tenutoFactor newelements tail actions))
- ((string= articname "mordent")
- (loop (cons 1 1) newelements tail (cons 'mordent actions)))
- ((string= articname "prall")
- (loop (cons 1 1) newelements tail (cons 'prall actions)))
- ((string= articname "trill")
- (loop (cons 1 1) newelements tail (cons 'trill actions)))
- ((string= articname "turn")
- (loop (cons 1 1) newelements tail (cons 'turn actions)))
- (else (loop factor (cons e newelements) tail actions)))))
+ ; TODO: add more here
+ (cond
+ ((string= articname "staccato")
+ (loop ac:staccatoFactor newelements tail actions))
+ ((string= articname "staccatissimo")
+ (loop ac:staccatissimoFactor newelements tail actions))
+ ((string= articname "tenuto")
+ (loop ac:tenutoFactor newelements tail actions))
+ ((string= articname "mordent")
+ (loop (cons 1 1) newelements tail (cons 'mordent actions)))
+ ((string= articname "prall")
+ (loop (cons 1 1) newelements tail (cons 'prall actions)))
+ ((string= articname "trill")
+ (loop (cons 1 1) newelements tail (cons 'trill actions)))
+ ((string= articname "turn")
+ (loop (cons 1 1) newelements tail (cons 'turn actions)))
+ (else (loop factor (cons e newelements) tail actions)))))
((TextScriptEvent)
(let ((t (ly:music-property e 'text)))
- (if (not (string? t))
- (loop factor (cons e newelements) tail actions)
- (begin
- (cond
- ((or
- (string= t "rall")
- (string= t "Rall")
- (string= t "rit.")
- (string= t "rall."))
- (loop factor (cons e newelements) tail (cons 'rall actions)))
- ((or
- (string= t "accelerando")
- (string= t "accel")
- (string= t "accel."))
- (loop factor (cons e newelements) tail (cons 'accel actions)))
- ((or
- (string= t "poco accel."))
- (loop factor (cons e newelements) tail (cons 'pocoAccel actions)))
- ((or
- (string= t "poco rall.")
- (string= t "poco rit."))
- (loop factor (cons e newelements) tail (cons 'pocoRall actions)))
- ((or (string= t "a tempo")
- (string= t "tempo I"))
- (loop factor (cons e newelements) tail (cons 'aTempo actions)))
- (else (loop factor (cons e newelements) tail actions)))))))
+ (if (not (string? t))
+ (loop factor (cons e newelements) tail actions)
+ (begin
+ (cond
+ ((or
+ (string= t "rall")
+ (string= t "Rall")
+ (string= t "rit.")
+ (string= t "rall."))
+ (loop factor (cons e newelements) tail (cons 'rall actions)))
+ ((or
+ (string= t "accelerando")
+ (string= t "accel")
+ (string= t "accel."))
+ (loop factor (cons e newelements) tail (cons 'accel actions)))
+ ((or
+ (string= t "poco accel."))
+ (loop factor (cons e newelements) tail (cons 'pocoAccel actions)))
+ ((or
+ (string= t "poco rall.")
+ (string= t "poco rit."))
+ (loop factor (cons e newelements) tail (cons 'pocoRall actions)))
+ ((or (string= t "a tempo")
+ (string= t "tempo I"))
+ (loop factor (cons e newelements) tail (cons 'aTempo actions)))
+ (else (loop factor (cons e newelements) tail actions)))))))
((SlurEvent)
(let ((direction (ly:music-property e 'span-direction)))
- (set! ac:inSlur (eq? direction -1))
- (loop factor newelements tail actions)))
+ (set! ac:inSlur (eq? direction -1))
+ (loop factor newelements tail actions)))
((TrillSpanEvent)
(let ((direction (ly:music-property e 'span-direction)))
- (set! ac:inTrill (eq? direction -1))
- (if ac:inTrill
- (loop factor newelements tail (cons 'trill actions))
- (loop factor (cons e newelements) tail actions))))
+ (set! ac:inTrill (eq? direction -1))
+ (if ac:inTrill
+ (loop factor newelements tail (cons 'trill actions))
+ (loop factor (cons e newelements) tail actions))))
((PhrasingSlurEvent)
(let ((direction (ly:music-property e 'span-direction)))
- (set! ac:inPhrasingSlur (eq? direction -1))
- (loop factor newelements tail actions)))
+ (set! ac:inPhrasingSlur (eq? direction -1))
+ (loop factor newelements tail actions)))
(else (loop factor (cons e newelements) tail actions)))))))
(ac:logEventsBackward
(let loop ((actions (ac:getactions music)))
(if (null? actions)
- (if (ly:moment<? (ly:make-moment 1/4) (ly:music-length music))
- (ac:to128 music)
- music)
+ (if (ly:moment<? (ly:make-moment 1/4) (ly:music-length music))
+ (ac:to128 music)
+ music)
(case (car actions)
((articulation)
- (map
- (lambda (x) (ac:articulate-one-note x (cadr actions)))
- (ly:music-property music 'elements))
- (let*
- ((num (caadr actions))
- (denom (cdadr actions))
- (mult (ly:duration-factor ac:currentDuration))
- (newnum (* (- denom num) (car mult)))
- (newdenom (* (cdr mult) denom))
- (len (ly:duration-log ac:currentDuration))
- (dots (ly:duration-dot-count ac:currentDuration)))
-
- (if (not (eq? num denom))
- (make-sequential-music
- (list (ac:to128 music)
- (make-music 'EventChord 'elements
- (list
- (make-music 'RestEvent 'duration (ly:make-duration len dots newnum newdenom))))))
- music)))
+ (map
+ (lambda (x) (ac:articulate-one-note x (cadr actions)))
+ (ly:music-property music 'elements))
+ (let*
+ ((num (caadr actions))
+ (denom (cdadr actions))
+ (mult (ly:duration-factor ac:currentDuration))
+ (newnum (* (- denom num) (car mult)))
+ (newdenom (* (cdr mult) denom))
+ (len (ly:duration-log ac:currentDuration))
+ (dots (ly:duration-dot-count ac:currentDuration)))
+
+ (if (not (eq? num denom))
+ (make-sequential-music
+ (list (ac:to128 music)
+ (make-music 'EventChord 'elements
+ (list
+ (make-music 'RestEvent 'duration (ly:make-duration len dots newnum newdenom))))))
+ music)))
((accel)
- (set! ac:lastTempo ac:currentTempo)
- (set! ac:currentTempo (ly:moment-div ac:currentTempo ac:rallFactor))
- (let ((pset (ac:tempoChange ac:currentTempo)))
- (if (null? (cdr actions))
- (make-sequential-music (list pset music))
- (make-sequential-music
- (list pset (loop (cdr actions)))))))
+ (set! ac:lastTempo ac:currentTempo)
+ (set! ac:currentTempo (ly:moment-div ac:currentTempo ac:rallFactor))
+ (let ((pset (ac:tempoChange ac:currentTempo)))
+ (if (null? (cdr actions))
+ (make-sequential-music (list pset music))
+ (make-sequential-music
+ (list pset (loop (cdr actions)))))))
((pocoAccel)
- (set! ac:lastTempo ac:currentTempo)
- (set! ac:currentTempo (ly:moment-div ac:currentTempo ac:pocoRallFactor))
- (let ((pset (ac:tempoChange ac:currentTempo)))
- (if (null? (cdr actions))
- (make-sequential-music (list pset music))
- (make-sequential-music
- (list pset (loop (cdr actions)))))))
+ (set! ac:lastTempo ac:currentTempo)
+ (set! ac:currentTempo (ly:moment-div ac:currentTempo ac:pocoRallFactor))
+ (let ((pset (ac:tempoChange ac:currentTempo)))
+ (if (null? (cdr actions))
+ (make-sequential-music (list pset music))
+ (make-sequential-music
+ (list pset (loop (cdr actions)))))))
((rall)
- (set! ac:lastTempo ac:currentTempo)
- (set! ac:currentTempo (ly:moment-mul ac:currentTempo ac:rallFactor))
- (let ((pset (ac:tempoChange ac:currentTempo)))
- (if (null? (cdr actions))
- (make-sequential-music (list pset music))
- (make-sequential-music
- (list pset (loop (cdr actions)))))))
+ (set! ac:lastTempo ac:currentTempo)
+ (set! ac:currentTempo (ly:moment-mul ac:currentTempo ac:rallFactor))
+ (let ((pset (ac:tempoChange ac:currentTempo)))
+ (if (null? (cdr actions))
+ (make-sequential-music (list pset music))
+ (make-sequential-music
+ (list pset (loop (cdr actions)))))))
((pocoRall)
- (set! ac:lastTempo ac:currentTempo)
- (set! ac:currentTempo (ly:moment-mul ac:currentTempo ac:pocoRallFactor))
- (let ((pset (ac:tempoChange ac:currentTempo)))
- (if (null? (cdr actions))
- (make-sequential-music (list pset music))
- (make-sequential-music
- (list pset (loop (cdr actions)))))))
+ (set! ac:lastTempo ac:currentTempo)
+ (set! ac:currentTempo (ly:moment-mul ac:currentTempo ac:pocoRallFactor))
+ (let ((pset (ac:tempoChange ac:currentTempo)))
+ (if (null? (cdr actions))
+ (make-sequential-music (list pset music))
+ (make-sequential-music
+ (list pset (loop (cdr actions)))))))
((aTempo)
- (set! ac:currentTempo ac:lastTempo)
+ (set! ac:currentTempo ac:lastTempo)
- (let ((pset (ac:tempoChange ac:currentTempo)))
- (if (null? (cdr actions))
- (make-sequential-music (list pset music))
- (make-sequential-music
- (list pset (loop (cdr actions)))))))
+ (let ((pset (ac:tempoChange ac:currentTempo)))
+ (if (null? (cdr actions))
+ (make-sequential-music (list pset music))
+ (make-sequential-music
+ (list pset (loop (cdr actions)))))))
((trill)
- (ac:trill music))
+ (ac:trill music))
((prall)
- ; A pralltriller symbol can either mean an inverted mordent
- ; or a half-shake -- a short, two twiddle trill.
- ; We implement as a half-shake.
- (let*
- ((origlength (ly:music-length music))
- (gracedur (ly:make-duration 5 0 1/1))
- (gracenote (ac:note-copy music))
- (abovenote (ac:note-copy music))
- (abovenoteTwo (ac:note-copy music))
- (mainnote (ly:music-deep-copy music)))
-
- (map (lambda (y) (ac:setduration y gracedur))
- (ly:music-property gracenote 'elements))
- (map (lambda (y) (ac:setduration y gracedur))
- (ly:music-property abovenote 'elements))
- (map (lambda (y) (ac:setduration y gracedur))
- (ly:music-property abovenoteTwo 'elements))
- (map (lambda (y) (ac:up y))
- (filter
- (lambda (z) (eq? 'NoteEvent (ly:music-property z 'name)))
- (ly:music-property abovenote 'elements)))
- (map (lambda (y) (ac:up y))
- (filter
- (lambda (z) (eq? 'NoteEvent (ly:music-property z 'name)))
- (ly:music-property abovenoteTwo 'elements)))
- (let* ((prallMusic (make-sequential-music
+ ; A pralltriller symbol can either mean an inverted mordent
+ ; or a half-shake -- a short, two twiddle trill.
+ ; We implement as a half-shake.
+ (let*
+ ((origlength (ly:music-length music))
+ (gracedur (ly:make-duration 5 0 1/1))
+ (gracenote (ac:note-copy music))
+ (abovenote (ac:note-copy music))
+ (abovenoteTwo (ac:note-copy music))
+ (mainnote (ly:music-deep-copy music)))
+
+ (map (lambda (y) (ac:setduration y gracedur))
+ (ly:music-property gracenote 'elements))
+ (map (lambda (y) (ac:setduration y gracedur))
+ (ly:music-property abovenote 'elements))
+ (map (lambda (y) (ac:setduration y gracedur))
+ (ly:music-property abovenoteTwo 'elements))
+ (map (lambda (y) (ac:up y))
+ (filter
+ (lambda (z) (eq? 'NoteEvent (ly:music-property z 'name)))
+ (ly:music-property abovenote 'elements)))
+ (map (lambda (y) (ac:up y))
+ (filter
+ (lambda (z) (eq? 'NoteEvent (ly:music-property z 'name)))
+ (ly:music-property abovenoteTwo 'elements)))
+ (let* ((prallMusic (make-sequential-music
(list abovenote gracenote abovenoteTwo mainnote)))
(newlen (ly:music-length prallMusic))
(factor (ly:moment-div origlength newlen)))
- (ly:music-compress prallMusic factor))))
+ (ly:music-compress prallMusic factor))))
((mordent)
- (let*
- ((origlength (ly:music-length music))
- (gracedur (ly:make-duration 5 0 1/1))
- (gracenote (ac:note-copy music))
- (belownote (ac:note-copy music)))
- (map (lambda (y) (ac:setduration y gracedur))
- (ly:music-property gracenote 'elements))
- (map (lambda (y) (ac:setduration y gracedur))
+ (let*
+ ((origlength (ly:music-length music))
+ (gracedur (ly:make-duration 5 0 1/1))
+ (gracenote (ac:note-copy music))
+ (belownote (ac:note-copy music)))
+ (map (lambda (y) (ac:setduration y gracedur))
+ (ly:music-property gracenote 'elements))
+ (map (lambda (y) (ac:setduration y gracedur))
(ly:music-property belownote 'elements))
- (map (lambda (y) (ac:down y))
- (filter
- (lambda (z) (eq? 'NoteEvent (ly:music-property z 'name)))
- (ly:music-property belownote 'elements)))
- (display belownote)
+ (map (lambda (y) (ac:down y))
+ (filter
+ (lambda (z) (eq? 'NoteEvent (ly:music-property z 'name)))
+ (ly:music-property belownote 'elements)))
+ (display belownote)
- (let* ((mordentMusic (make-sequential-music (list gracenote belownote music)))
- (newlen (ly:music-length mordentMusic))
- (factor (ly:moment-div origlength newlen)))
- (ly:music-compress mordentMusic factor))))
+ (let* ((mordentMusic (make-sequential-music (list gracenote belownote music)))
+ (newlen (ly:music-length mordentMusic))
+ (factor (ly:moment-div origlength newlen)))
+ (ly:music-compress mordentMusic factor))))
((turn)
- (let*
- ((dur (ly:music-property
- (car (ly:music-property music 'elements)) 'duration))
- (factor (ly:duration-factor dur))
- (newdur (ly:make-duration (+ (ly:duration-log dur) 2)
- (ly:duration-dot-count dur) (car factor)(cdr factor))))
- (begin
- (map (lambda (y) (ac:setduration y newdur))
- (ly:music-property music 'elements))
- (let* ((above (ly:music-deep-copy music))
- (below (ly:music-deep-copy music))
- (newmusic (make-sequential-music (list above music below music))))
- (begin
- (map (lambda (y) (ac:down y))
- (filter
- (lambda (z) (eq? 'NoteEvent (ly:music-property z 'name)))
- (ly:music-property below 'elements)))
- (map (lambda (y) (ac:up y))
- (filter
- (lambda (z) (eq? 'NoteEvent (ly:music-property z 'name)))
- (ly:music-property above 'elements)))
- newmusic)))))
+ (let*
+ ((dur (ly:music-property
+ (car (ly:music-property music 'elements)) 'duration))
+ (factor (ly:duration-factor dur))
+ (newdur (ly:make-duration (+ (ly:duration-log dur) 2)
+ (ly:duration-dot-count dur) (car factor)(cdr factor))))
+ (begin
+ (map (lambda (y) (ac:setduration y newdur))
+ (ly:music-property music 'elements))
+ (let* ((above (ly:music-deep-copy music))
+ (below (ly:music-deep-copy music))
+ (newmusic (make-sequential-music (list above music below music))))
+ (begin
+ (map (lambda (y) (ac:down y))
+ (filter
+ (lambda (z) (eq? 'NoteEvent (ly:music-property z 'name)))
+ (ly:music-property below 'elements)))
+ (map (lambda (y) (ac:up y))
+ (filter
+ (lambda (z) (eq? 'NoteEvent (ly:music-property z 'name)))
+ (ly:music-property above 'elements)))
+ newmusic)))))
((steal)
- (let
- ((totallen (ly:moment-main (ly:music-length music)))
- (steallen (cadr actions)))
- (if (>= steallen totallen)
- (begin
- (if (any (lambda (z) (eq? 'NoteEvent (ly:music-property z 'name)))
- (ly:music-property music 'elements))
- (ly:warning (_ "stealing the entirety of a note's time")))
- (set! ac:stealForward (- steallen totallen))
- (make-sequential-music '()))
- (begin
- (ly:music-compress music (ly:make-moment (/ (- totallen steallen) totallen)))
- (loop (cddr actions))))))
+ (let
+ ((totallen (ly:moment-main (ly:music-length music)))
+ (steallen (cadr actions)))
+ (if (>= steallen totallen)
+ (begin
+ (if (any (lambda (z) (eq? 'NoteEvent (ly:music-property z 'name)))
+ (ly:music-property music 'elements))
+ (ly:warning (_ "stealing the entirety of a note's time")))
+ (set! ac:stealForward (- steallen totallen))
+ (make-sequential-music '()))
+ (begin
+ (ly:music-compress music (ly:make-moment (/ (- totallen steallen) totallen)))
+ (loop (cddr actions))))))
)))))
((eq? 'GraceMusic (ly:music-property music 'name))
(let
((first-ev
(call-with-current-continuation
- (lambda (yield-fev)
- (music-map
- (lambda (m)
- (if (eq? 'EventChord (ly:music-property m 'name))
- (yield-fev m)
- m))
- music)
- #f))))
+ (lambda (yield-fev)
+ (music-map
+ (lambda (m)
+ (if (eq? 'EventChord (ly:music-property m 'name))
+ (yield-fev m)
+ m))
+ music)
+ #f))))
(if first-ev
(let ((fev-pos (find-tail (lambda (m) (eq? m first-ev)) ac:eventsBackward)))
(if fev-pos
- (set! ac:eventsBackward (cdr fev-pos))
- (ly:warning (_ "articulation of grace notes has gone awry"))))))
+ (set! ac:eventsBackward (cdr fev-pos))
+ (ly:warning (_ "articulation of grace notes has gone awry"))))))
(let*
((gmus (ly:music-compress (ly:music-property music 'element)
- (ly:make-moment ac:defaultGraceFactor)))
+ (ly:make-moment ac:defaultGraceFactor)))
(glen (ly:moment-main (ly:music-length gmus))))
(ac:stealTimeBackward (* glen ac:defaultGraceBackwardness))
(set! ac:stealForward (+ ac:stealForward (* glen (- 1 ac:defaultGraceBackwardness))))
((memq (ly:music-property music 'name) '(BarCheck SkipMusic))
(let ((totallen (ly:moment-main (ly:music-length music)))
- (steallen ac:stealForward))
+ (steallen ac:stealForward))
(cond
((= steallen 0)
(ac:logEventsBackward music))
((< steallen totallen)
(set! ac:stealForward 0)
(ac:logEventsBackward
- (ly:music-compress music (ly:make-moment (/ (- totallen steallen) totallen)))))
+ (ly:music-compress music (ly:make-moment (/ (- totallen steallen) totallen)))))
(else
(set! ac:stealForward (- steallen totallen))
(make-sequential-music '())))))
% At last ... here's the music function that applies all the above to a
% score.
articulate = #(define-music-function (parser location music)
- (ly:music?)
- "Adjust times of note to add tenuto, staccato and
+ (ly:music?)
+ "Adjust times of note to add tenuto, staccato and
normal articulations.
- "
- (dynamic-wind
- (lambda ()
- (set! ac:stealForward 0)
- (set! ac:eventsBackward '()))
- (lambda ()
- (music-map
- ac:articulate-chord
- (ac:unfoldMusic (event-chord-wrap! music parser))))
- (lambda ()
- (or (= ac:stealForward 0)
- (begin
- (ly:warning (_ "articulation failed to steal ~a note at end of music") ac:stealForward)
- (set! ac:stealForward 0)))
- (set! ac:eventsBackward '()))))
+ "
+ (dynamic-wind
+ (lambda ()
+ (set! ac:stealForward 0)
+ (set! ac:eventsBackward '()))
+ (lambda ()
+ (music-map
+ ac:articulate-chord
+ (ac:unfoldMusic (event-chord-wrap! music parser))))
+ (lambda ()
+ (or (= ac:stealForward 0)
+ (begin
+ (ly:warning (_ "articulation failed to steal ~a note at end of music") ac:stealForward)
+ (set! ac:stealForward 0)))
+ (set! ac:eventsBackward '()))))
% Override \afterGrace to be in terms of audio, not spacing.
(factor (ly:moment-div new-main-length main-length))
)
(map (lambda (y) (set! (ly:music-property y 'twiddle) gracelen))
- (filter (lambda (z)
- (and
- (eq? 'ArticulationEvent (ly:music-property z 'name))
- (string= "trill" (ly:music-property z 'articulation-type))))
- (ly:music-property main 'elements)))
+ (filter (lambda (z)
+ (and
+ (eq? 'ArticulationEvent (ly:music-property z 'name))
+ (string= "trill" (ly:music-property z 'articulation-type))))
+ (ly:music-property main 'elements)))
(ac:add-articulation "tenuto" grace)
(make-sequential-music (list (ly:music-compress main factor) (ly:music-compress grace grace-factor)))))
(set! grace (event-chord-wrap! grace parser))
(set! main (event-chord-wrap! main parser))
(let* ((maindur (ly:music-length main))
- (grace-orig-len (ly:music-length grace))
- (main-orig-len (ly:music-length main))
- (numerator (ly:moment-main-numerator maindur))
- (factor (if (eq? (remainder numerator 3) 0)
- (ly:make-moment 1/3) (ly:make-moment 1/2))))
+ (grace-orig-len (ly:music-length grace))
+ (main-orig-len (ly:music-length main))
+ (numerator (ly:moment-main-numerator maindur))
+ (factor (if (eq? (remainder numerator 3) 0)
+ (ly:make-moment 1/3) (ly:make-moment 1/2))))
(ly:music-compress grace
(ly:moment-mul factor (ly:moment-div main-orig-len grace-orig-len)))
(ly:music-compress main (ly:moment-sub (ly:make-moment 1/1) factor))
%% 2206 : delta from the symbol font.
% #(ly:wide-char->utf-8 #x2206)
-
+
%% up pointing triangle
% #(ly:wide-char->utf-8 #x25B3)
-}
+}
blackTriangleMarkup = \markup {
\triangle ##t
(_i "Include the string and fingering information in a chord repetition.
This function is deprecated; try using @code{\\tabChordRepeats} instead.")
(ly:parser-define! parser '$chord-repeat-events
- '(string-number-event fingering-event)))
+ '(string-number-event fingering-event)))
(de . fivedown)
)
-midiDrumPitches = #`(
- (acousticbassdrum . ,(ly:make-pitch -3 6 NATURAL))
- (bassdrum . ,(ly:make-pitch -2 0 NATURAL))
- (hisidestick . ,(ly:make-pitch -3 6 DOUBLE-SHARP))
- (sidestick . ,(ly:make-pitch -2 0 SHARP))
- (losidestick . ,(ly:make-pitch -2 1 FLAT))
- (acousticsnare . ,(ly:make-pitch -2 1 NATURAL))
- (snare . ,(ly:make-pitch -2 2 DOUBLE-FLAT))
- (handclap . ,(ly:make-pitch -2 1 SHARP))
- (electricsnare . ,(ly:make-pitch -2 2 NATURAL))
- (lowfloortom . ,(ly:make-pitch -2 3 NATURAL))
- (closedhihat . ,(ly:make-pitch -2 3 SHARP))
- (hihat . ,(ly:make-pitch -2 4 FLAT))
- (highfloortom . ,(ly:make-pitch -2 4 NATURAL))
- (pedalhihat . ,(ly:make-pitch -2 4 SHARP))
- (lowtom . ,(ly:make-pitch -2 5 NATURAL))
- (openhihat . ,(ly:make-pitch -2 5 SHARP))
- (halfopenhihat . ,(ly:make-pitch -2 5 SHARP))
- (lowmidtom . ,(ly:make-pitch -2 6 NATURAL))
- (himidtom . ,(ly:make-pitch -1 0 NATURAL))
- (crashcymbala . ,(ly:make-pitch -1 0 SHARP))
- (crashcymbal . ,(ly:make-pitch -1 1 FLAT))
- (hightom . ,(ly:make-pitch -1 1 NATURAL))
- (ridecymbala . ,(ly:make-pitch -1 1 SHARP))
- (ridecymbal . ,(ly:make-pitch -1 2 FLAT))
- (chinesecymbal . ,(ly:make-pitch -1 2 NATURAL))
- (ridebell . ,(ly:make-pitch -1 3 NATURAL))
- (tambourine . ,(ly:make-pitch -1 3 SHARP))
- (splashcymbal . ,(ly:make-pitch -1 4 NATURAL))
- (cowbell . ,(ly:make-pitch -1 4 SHARP))
- (crashcymbalb . ,(ly:make-pitch -1 5 NATURAL))
- (vibraslap . ,(ly:make-pitch -1 5 SHARP))
- (ridecymbalb . ,(ly:make-pitch -1 6 NATURAL))
- (mutehibongo . ,(ly:make-pitch -1 6 SHARP))
- (hibongo . ,(ly:make-pitch 0 0 NATURAL))
- (openhibongo . ,(ly:make-pitch 0 1 DOUBLE-FLAT))
- (mutelobongo . ,(ly:make-pitch -1 6 DOUBLE-SHARP))
- (lobongo . ,(ly:make-pitch 0 0 SHARP))
- (openlobongo . ,(ly:make-pitch 0 1 FLAT))
- (mutehiconga . ,(ly:make-pitch 0 1 NATURAL))
- (muteloconga . ,(ly:make-pitch 0 2 DOUBLE-FLAT))
- (openhiconga . ,(ly:make-pitch 0 1 SHARP))
- (hiconga . ,(ly:make-pitch 0 2 FLAT))
- (openloconga . ,(ly:make-pitch 0 1 DOUBLE-SHARP))
- (loconga . ,(ly:make-pitch 0 2 NATURAL))
- (hitimbale . ,(ly:make-pitch 0 3 NATURAL))
- (lotimbale . ,(ly:make-pitch 0 3 SHARP))
- (hiagogo . ,(ly:make-pitch 0 4 NATURAL))
- (loagogo . ,(ly:make-pitch 0 4 SHARP))
- (cabasa . ,(ly:make-pitch 0 5 NATURAL))
- (maracas . ,(ly:make-pitch 0 5 SHARP))
- (shortwhistle . ,(ly:make-pitch 0 6 NATURAL))
- (longwhistle . ,(ly:make-pitch 1 0 NATURAL))
- (shortguiro . ,(ly:make-pitch 1 0 SHARP))
- (longguiro . ,(ly:make-pitch 1 1 NATURAL))
- (guiro . ,(ly:make-pitch 1 0 DOUBLE-SHARP))
- (claves . ,(ly:make-pitch 1 1 SHARP))
- (hiwoodblock . ,(ly:make-pitch 1 2 NATURAL))
- (lowoodblock . ,(ly:make-pitch 1 3 NATURAL))
- (mutecuica . ,(ly:make-pitch 1 3 SHARP))
- (opencuica . ,(ly:make-pitch 1 4 NATURAL))
- (mutetriangle . ,(ly:make-pitch 1 4 SHARP))
- (triangle . ,(ly:make-pitch 1 4 DOUBLE-SHARP))
- (opentriangle . ,(ly:make-pitch 1 5 NATURAL))
-
- ;; "transposing" pitches:
- (oneup . ,(ly:make-pitch 0 1 NATURAL))
- (twoup . ,(ly:make-pitch 0 2 NATURAL))
- (threeup . ,(ly:make-pitch 0 3 NATURAL))
- (fourup . ,(ly:make-pitch 0 4 NATURAL))
- (fiveup . ,(ly:make-pitch 0 5 NATURAL))
- (onedown . ,(ly:make-pitch -1 6 NATURAL))
- (twodown . ,(ly:make-pitch -1 5 NATURAL))
- (threedown . ,(ly:make-pitch -1 4 NATURAL))
- (fourdown . ,(ly:make-pitch -1 3 NATURAL))
- (fivedown . ,(ly:make-pitch -1 2 NATURAL))
-)
+midiDrumPitches =
+#`((acousticbassdrum . ,(ly:make-pitch -3 6 NATURAL))
+ (bassdrum . ,(ly:make-pitch -2 0 NATURAL))
+ (hisidestick . ,(ly:make-pitch -3 6 DOUBLE-SHARP))
+ (sidestick . ,(ly:make-pitch -2 0 SHARP))
+ (losidestick . ,(ly:make-pitch -2 1 FLAT))
+ (acousticsnare . ,(ly:make-pitch -2 1 NATURAL))
+ (snare . ,(ly:make-pitch -2 2 DOUBLE-FLAT))
+ (handclap . ,(ly:make-pitch -2 1 SHARP))
+ (electricsnare . ,(ly:make-pitch -2 2 NATURAL))
+ (lowfloortom . ,(ly:make-pitch -2 3 NATURAL))
+ (closedhihat . ,(ly:make-pitch -2 3 SHARP))
+ (hihat . ,(ly:make-pitch -2 4 FLAT))
+ (highfloortom . ,(ly:make-pitch -2 4 NATURAL))
+ (pedalhihat . ,(ly:make-pitch -2 4 SHARP))
+ (lowtom . ,(ly:make-pitch -2 5 NATURAL))
+ (openhihat . ,(ly:make-pitch -2 5 SHARP))
+ (halfopenhihat . ,(ly:make-pitch -2 5 SHARP))
+ (lowmidtom . ,(ly:make-pitch -2 6 NATURAL))
+ (himidtom . ,(ly:make-pitch -1 0 NATURAL))
+ (crashcymbala . ,(ly:make-pitch -1 0 SHARP))
+ (crashcymbal . ,(ly:make-pitch -1 1 FLAT))
+ (hightom . ,(ly:make-pitch -1 1 NATURAL))
+ (ridecymbala . ,(ly:make-pitch -1 1 SHARP))
+ (ridecymbal . ,(ly:make-pitch -1 2 FLAT))
+ (chinesecymbal . ,(ly:make-pitch -1 2 NATURAL))
+ (ridebell . ,(ly:make-pitch -1 3 NATURAL))
+ (tambourine . ,(ly:make-pitch -1 3 SHARP))
+ (splashcymbal . ,(ly:make-pitch -1 4 NATURAL))
+ (cowbell . ,(ly:make-pitch -1 4 SHARP))
+ (crashcymbalb . ,(ly:make-pitch -1 5 NATURAL))
+ (vibraslap . ,(ly:make-pitch -1 5 SHARP))
+ (ridecymbalb . ,(ly:make-pitch -1 6 NATURAL))
+ (mutehibongo . ,(ly:make-pitch -1 6 SHARP))
+ (hibongo . ,(ly:make-pitch 0 0 NATURAL))
+ (openhibongo . ,(ly:make-pitch 0 1 DOUBLE-FLAT))
+ (mutelobongo . ,(ly:make-pitch -1 6 DOUBLE-SHARP))
+ (lobongo . ,(ly:make-pitch 0 0 SHARP))
+ (openlobongo . ,(ly:make-pitch 0 1 FLAT))
+ (mutehiconga . ,(ly:make-pitch 0 1 NATURAL))
+ (muteloconga . ,(ly:make-pitch 0 2 DOUBLE-FLAT))
+ (openhiconga . ,(ly:make-pitch 0 1 SHARP))
+ (hiconga . ,(ly:make-pitch 0 2 FLAT))
+ (openloconga . ,(ly:make-pitch 0 1 DOUBLE-SHARP))
+ (loconga . ,(ly:make-pitch 0 2 NATURAL))
+ (hitimbale . ,(ly:make-pitch 0 3 NATURAL))
+ (lotimbale . ,(ly:make-pitch 0 3 SHARP))
+ (hiagogo . ,(ly:make-pitch 0 4 NATURAL))
+ (loagogo . ,(ly:make-pitch 0 4 SHARP))
+ (cabasa . ,(ly:make-pitch 0 5 NATURAL))
+ (maracas . ,(ly:make-pitch 0 5 SHARP))
+ (shortwhistle . ,(ly:make-pitch 0 6 NATURAL))
+ (longwhistle . ,(ly:make-pitch 1 0 NATURAL))
+ (shortguiro . ,(ly:make-pitch 1 0 SHARP))
+ (longguiro . ,(ly:make-pitch 1 1 NATURAL))
+ (guiro . ,(ly:make-pitch 1 0 DOUBLE-SHARP))
+ (claves . ,(ly:make-pitch 1 1 SHARP))
+ (hiwoodblock . ,(ly:make-pitch 1 2 NATURAL))
+ (lowoodblock . ,(ly:make-pitch 1 3 NATURAL))
+ (mutecuica . ,(ly:make-pitch 1 3 SHARP))
+ (opencuica . ,(ly:make-pitch 1 4 NATURAL))
+ (mutetriangle . ,(ly:make-pitch 1 4 SHARP))
+ (triangle . ,(ly:make-pitch 1 4 DOUBLE-SHARP))
+ (opentriangle . ,(ly:make-pitch 1 5 NATURAL))
+
+ ;; "transposing" pitches:
+ (oneup . ,(ly:make-pitch 0 1 NATURAL))
+ (twoup . ,(ly:make-pitch 0 2 NATURAL))
+ (threeup . ,(ly:make-pitch 0 3 NATURAL))
+ (fourup . ,(ly:make-pitch 0 4 NATURAL))
+ (fiveup . ,(ly:make-pitch 0 5 NATURAL))
+ (onedown . ,(ly:make-pitch -1 6 NATURAL))
+ (twodown . ,(ly:make-pitch -1 5 NATURAL))
+ (threedown . ,(ly:make-pitch -1 4 NATURAL))
+ (fourdown . ,(ly:make-pitch -1 3 NATURAL))
+ (fivedown . ,(ly:make-pitch -1 2 NATURAL))
+ )
#(for-each
(lambda (k-v)
(module-define! (current-module)
- (car k-v)
- (alist->hash-table (cdr k-v)))
+ (car k-v)
+ (alist->hash-table (cdr k-v)))
)
'((drums-style .
(
(handclap () #f 0)
))
))
-
-
sp = #(make-dynamic-script "sp")
spp = #(make-dynamic-script "spp")
rfz = #(make-dynamic-script "rfz")
-
(stretchability . 1))
\override VerticalAxisGroup.nonstaff-nonstaff-spacing =
#'((basic-distance . 0)
- (minimum-distance . 2.8)
- (padding . 0.2)
- (stretchability . 0))
+ (minimum-distance . 2.8)
+ (padding . 0.2)
+ (stretchability . 0))
\override VerticalAxisGroup.nonstaff-unrelatedstaff-spacing.padding = #1.5
\override InstrumentName.self-alignment-Y = ##f
%% the direction for glissando lines will be automatically corrected
\override Glissando.extra-dy = #glissando::calc-tab-extra-dy
\override Glissando.bound-details.right = #`((attach-dir . ,LEFT)
- (padding . 0.3))
+ (padding . 0.3))
\override Glissando.bound-details.left = #`((attach-dir . ,RIGHT)
- (padding . 0.3))
+ (padding . 0.3))
%% dead notes
\override TabNoteHead.glyph-name = #tab-note-head::calc-glyph-name
\override TabNoteHead.stencil = #tab-note-head::whiteout-if-style-set
\Voice
\consists #(make-engraver
(listeners
- (tempo-change-event . format-tempo)
- (rest-event . format-rest)
- (note-event . format-note)
- (articulation-event . format-articulation)
- (text-script-event . format-text)
- (slur-event . format-slur)
- (breathing-event . format-breathe)
- (dynamic-event . format-dynamic)
- (crescendo-event . format-cresc)
- (decrescendo-event . format-decresc)
- (text-span-event . format-textspan)
- (glissando-event . format-glissando)
- (tie-event . format-tie)))
+ (tempo-change-event . format-tempo)
+ (rest-event . format-rest)
+ (note-event . format-note)
+ (articulation-event . format-articulation)
+ (text-script-event . format-text)
+ (slur-event . format-slur)
+ (breathing-event . format-breathe)
+ (dynamic-event . format-dynamic)
+ (crescendo-event . format-cresc)
+ (decrescendo-event . format-decresc)
+ (text-span-event . format-textspan)
+ (glissando-event . format-glissando)
+ (tie-event . format-tie)))
}
}
#(define (grob-name g)
(let* ((meta (ly:grob-property g 'meta))
- (name-pair (assq 'name meta)))
+ (name-pair (assq 'name meta)))
(if (pair? name-pair)
(cdr name-pair)
#f)))
#(define (grob-event-node grob label cluster)
(let ((node-id (add-node graph label cluster))
- (prev (assv grob last-grob-action)))
+ (prev (assv grob last-grob-action)))
(if (pair? prev)
(add-edge graph (cdr prev) node-id))
(set! last-grob-action (assv-set! last-grob-action grob node-id))))
#(define (grob-mod grob file line func prop val)
(let* ((val-str (truncate-value val))
- (label (format #f "~a\\n~a:~a\\n~a <- ~a" (grob-name grob) file line prop val-str)))
+ (label (format #f "~a\\n~a:~a\\n~a <- ~a" (grob-name grob) file line prop val-str)))
(if (relevant? grob file line prop)
(grob-event-node grob label file))))
#(define (grob-cache grob prop callback value)
(let* ((val-str (truncate-value value))
- (label (format #f "caching ~a.~a\\n~a -> ~a" (grob-name grob) prop callback value)))
+ (label (format #f "caching ~a.~a\\n~a -> ~a" (grob-name grob) prop callback value)))
(if (relevant? grob #f #f prop)
(grob-event-node grob label #f))))
%
% Declare memorable shortcuts for special unicode characters
% that are used in chant notation.
-%
+%
% unicode 0132 (latin capital ligature IJ)
IJ = \lyricmode { IJ }
(let ((found? #f))
(map-some-music
(lambda (m)
- (if found? m
- (and (music-is-of-type? m 'lyric-event)
- (begin
- (set! (ly:music-property m 'text)
- (string-append prefix (ly:music-property m 'text)))
- (set! found? #t)
- m))))
+ (if found? m
+ (and (music-is-of-type? m 'lyric-event)
+ (begin
+ (set! (ly:music-property m 'text)
+ (string-append prefix (ly:music-property m 'text)))
+ (set! found? #t)
+ m))))
music)))
% Add unicode 2123 (versicle) as prefix to lyrics.
#(define (make-ligature music)
(make-music 'SequentialMusic
- 'elements (append
- (cons
- (make-music 'EventChord
- 'elements (list
- (make-span-event 'LigatureEvent START)))
- (ly:music-property music 'elements))
- (list
- (make-music 'EventChord
- 'elements (list
- (make-span-event 'LigatureEvent STOP)))))))
+ 'elements (append
+ (cons
+ (make-music 'EventChord
+ 'elements (list
+ (make-span-event 'LigatureEvent START)))
+ (ly:music-property music 'elements))
+ (list
+ (make-music 'EventChord
+ 'elements (list
+ (make-span-event 'LigatureEvent STOP)))))))
ligature = #(define-music-function
- (location music) (ly:music?)
- (make-ligature music))
+ (location music) (ly:music?)
+ (make-ligature music))
%#(define (make-script x)
% (make-music 'ArticulationEvent
% 'articulation-type x))
-%
+%
%#(define (add-script m x)
% (if
% (equal? (ly:music-property m 'name) 'EventChord)
% `(define-music-function (location music) (ly:music?)
% (make-music 'SequentialMusic
% 'elements (list 'LigatureStartEvent
-% (ly:music-deep-copy ,start)
+% (ly:music-deep-copy ,start)
% music
% (ly:music-deep-copy ,stop)
-% 'LigatureStopEvent))))
+% 'LigatureStopEvent))))
%climacus = #(def-climacus-function startSequentialMusic stopSequentialMusic)
%
line-thickness = #(/ (ly:output-def-lookup $defaultpaper 'staff-space) 7.0)
\context {
- \VaticanaStaff
- \override StaffSymbol.color = #red
- \override LedgerLineSpanner.color = #red
+ \VaticanaStaff
+ \override StaffSymbol.color = #red
+ \override LedgerLineSpanner.color = #red
}
\context {
- \Score
- \remove "Bar_number_engraver"
-
- %%%
- %%% FIXME: Musicologically seen, timing should be set to #f.
- %%% Unfortunately, setting it to #f will result in no
- %%% line-breakable items being created, such that the whole
- %%% music will end up in a single line. Therefore, we
- %%% currently set it to #t, until the ligature code is fixed
- %%% to automatically insert breakable items.
- %%%
- timing = ##t
-
- %%%
- %%% FIXME: Setting barAlways to #t would fix the above
- %%% "timing = ##t" problem, but, surprisingly, it increases
- %%% the space between ligatures. Hence, we set it to #f.
- %%%
- barAlways = ##f
-
- \override SpacingSpanner.packed-spacing = ##t
-
- %%%
- %%% TODO: Play around with the following SpacingSpanner
- %%% settings to yield better spacing between ligatures.
- %%%
- %%% FIXME: setting #'spacing-increment to a small value
- %%% causes tons of "programming error: adding reverse spring,
- %%% setting to unit" messages.
- %%%
- %\override SpacingSpanner.base-shortest-duration = #(ly:make-moment 1/4)
- %\override SpacingSpanner.shortest-duration-space = #0
- %\override SpacingSpanner.average-spacing-wishes = ##f
- %\override SpacingSpanner.spacing-increment = #0.0
- %\override SpacingSpanner.uniform-stretching = ##t
+ \Score
+ \remove "Bar_number_engraver"
+
+ %%%
+ %%% FIXME: Musicologically seen, timing should be set to #f.
+ %%% Unfortunately, setting it to #f will result in no
+ %%% line-breakable items being created, such that the whole
+ %%% music will end up in a single line. Therefore, we
+ %%% currently set it to #t, until the ligature code is fixed
+ %%% to automatically insert breakable items.
+ %%%
+ timing = ##t
+
+ %%%
+ %%% FIXME: Setting barAlways to #t would fix the above
+ %%% "timing = ##t" problem, but, surprisingly, it increases
+ %%% the space between ligatures. Hence, we set it to #f.
+ %%%
+ barAlways = ##f
+
+ \override SpacingSpanner.packed-spacing = ##t
+
+ %%%
+ %%% TODO: Play around with the following SpacingSpanner
+ %%% settings to yield better spacing between ligatures.
+ %%%
+ %%% FIXME: setting #'spacing-increment to a small value
+ %%% causes tons of "programming error: adding reverse spring,
+ %%% setting to unit" messages.
+ %%%
+ %\override SpacingSpanner.base-shortest-duration = #(ly:make-moment 1/4)
+ %\override SpacingSpanner.shortest-duration-space = #0
+ %\override SpacingSpanner.average-spacing-wishes = ##f
+ %\override SpacingSpanner.spacing-increment = #0.0
+ %\override SpacingSpanner.uniform-stretching = ##t
}
}
neumeDemoLayout = \layout {
interscoreline = 1
\context {
- \Score
- \remove "Bar_number_engraver"
+ \Score
+ \remove "Bar_number_engraver"
}
\context {
- \Staff
- \remove "Clef_engraver"
- \remove "Key_engraver"
- \hide StaffSymbol
- \remove "Time_signature_engraver"
- \remove "Bar_engraver"
- \override VerticalAxisGroup.staff-staff-spacing = #'()
+ \Staff
+ \remove "Clef_engraver"
+ \remove "Key_engraver"
+ \hide StaffSymbol
+ \remove "Time_signature_engraver"
+ \remove "Bar_engraver"
+ \override VerticalAxisGroup.staff-staff-spacing = #'()
}
\context {
- \Voice
- \remove "Ligature_bracket_engraver"
- \consists "Vaticana_ligature_engraver"
- \override NoteHead.style = #'vaticana.punctum
- \hide Stem
+ \Voice
+ \remove "Ligature_bracket_engraver"
+ \consists "Vaticana_ligature_engraver"
+ \override NoteHead.style = #'vaticana.punctum
+ \hide Stem
}
}
-%% Toplevel initialisation file.
+%% Toplevel initialisation file.
%% switch on debugging.
#(if (and #t (defined? 'set-debug-cell-accesses!))
(set! toplevel-scores (list))
(book-handler parser book)))
((or (pair? toplevel-scores) output-empty-score-list)
- (let ((book (apply ly:make-book $defaultpaper
+ (let ((book (apply ly:make-book $defaultpaper
$defaultheader toplevel-scores)))
(set! toplevel-scores (list))
(book-handler parser book)))))
%}
-
+
#(define-public EKSIK-IKI 5/18)
#(define-public EKSIK-UC 6/18)
(g . ,(ly:make-pitch -1 4 NATURAL))
(a . ,(ly:make-pitch -1 5 NATURAL))
(b . ,(ly:make-pitch -1 6 NATURAL))
-
+
(cc . ,(ly:make-pitch -1 0 KOMA))
(dc . ,(ly:make-pitch -1 1 KOMA))
(ec . ,(ly:make-pitch -1 2 KOMA))
(gfc . ,(ly:make-pitch -1 4 (- KOMA)))
(afc . ,(ly:make-pitch -1 5 (- KOMA)))
(bfc . ,(ly:make-pitch -1 6 (- KOMA)))
-
+
(cfb . ,(ly:make-pitch -1 0 (- BAKIYE)))
(dfb . ,(ly:make-pitch -1 1 (- BAKIYE)))
(efb . ,(ly:make-pitch -1 2 (- BAKIYE)))
(gfk . ,(ly:make-pitch -1 4 (- KUCUK)))
(afk . ,(ly:make-pitch -1 5 (- KUCUK)))
(bfk . ,(ly:make-pitch -1 6 (- KUCUK)))
-
+
(cfi . ,(ly:make-pitch -1 0 (- EKSIK-IKI)))
(dfi . ,(ly:make-pitch -1 1 (- EKSIK-IKI)))
(efi . ,(ly:make-pitch -1 2 (- EKSIK-IKI)))
(gfu . ,(ly:make-pitch -1 4 (- EKSIK-UC)))
(afu . ,(ly:make-pitch -1 5 (- EKSIK-UC)))
(bfu . ,(ly:make-pitch -1 6 (- EKSIK-UC)))
-
-
+
+
(cfbm . ,(ly:make-pitch -1 0 (- BUYUKMUCENNEB)))
(dfbm . ,(ly:make-pitch -1 1 (- BUYUKMUCENNEB)))
(efbm . ,(ly:make-pitch -1 2 (- BUYUKMUCENNEB)))
%% set pitch names.
-pitchnames = \makamPitchNames
+pitchnames = \makamPitchNames
#(ly:parser-set-note-names parser makamPitchNames)
#(define eksikMirroredSlashedFlat
(0 . "accidentals.natural")
(-1/9 . "accidentals.mirroredflat")
(-5/18 . ,(if eksikMirroredSlashedFlat
- "accidentals.mirroredflat.backslash"
- "accidentals.mirroredflat"))
+ "accidentals.mirroredflat.backslash"
+ "accidentals.mirroredflat"))
(-6/18 . ,(if eksikMirroredSlashedFlat
- "accidentals.mirroredflat.backslash"
- "accidentals.mirroredflat"))
+ "accidentals.mirroredflat.backslash"
+ "accidentals.mirroredflat"))
(-4/9 . "accidentals.flat.slash")
(-5/9 . "accidentals.flat")
(-8/9 . "accidentals.flat.slashslash")
\override AmbitusAccidental.glyph-name-alist = \makamGlyphs
}
}
-
\midi {
\include "performer-init.ly"
}
-
%% need SRFI-1 for filter; optargs for lambda*
#(use-modules (srfi srfi-1)
- (ice-9 optargs))
+ (ice-9 optargs))
%% TODO: using define-music-function in a .scm causes crash.
#(define-music-function (parser location main grace) (ly:music? ly:music?)
(_i "Create @var{grace} note(s) after a @var{main} music expression.")
(let ((main-length (ly:music-length main))
- (fraction (ly:parser-lookup parser 'afterGraceFraction)))
+ (fraction (ly:parser-lookup parser 'afterGraceFraction)))
(make-simultaneous-music
(list
main
(make-sequential-music
- (list
+ (list
- (make-music 'SkipMusic
- 'duration (ly:make-duration
- 0 0
- (* (ly:moment-main-numerator main-length)
- (car fraction))
- (* (ly:moment-main-denominator main-length)
- (cdr fraction))))
- (make-music 'GraceMusic
- 'element grace)))))))
+ (make-music 'SkipMusic
+ 'duration (ly:make-duration
+ 0 0
+ (* (ly:moment-main-numerator main-length)
+ (car fraction))
+ (* (ly:moment-main-denominator main-length)
+ (cdr fraction))))
+ (make-music 'GraceMusic
+ 'element grace)))))))
%% music identifiers not allowed at top-level,
(_i "Allow a page turn. May be used at toplevel (ie between scores or
markups), or inside a score.")
(make-music 'EventChord
- 'page-marker #t
- 'page-turn-permission 'allow
- 'elements (list (make-music 'PageTurnEvent
- 'break-permission 'allow))))
+ 'page-marker #t
+ 'page-turn-permission 'allow
+ 'elements (list (make-music 'PageTurnEvent
+ 'break-permission 'allow))))
alterBroken =
#(define-music-function (parser location property arg item)
(_i "Append @var{more} to the @code{elements} of all music
expressions in @var{music} that are tagged with @var{tag}.")
(music-map (lambda (m)
- (if (memq tag (ly:music-property m 'tags))
- (set! (ly:music-property m 'elements)
- (append (ly:music-property m 'elements)
- (list more))))
- m)
- music))
+ (if (memq tag (ly:music-property m 'tags))
+ (set! (ly:music-property m 'elements)
+ (append (ly:music-property m 'elements)
+ (list more))))
+ m)
+ music))
applyContext =
#(define-music-function (parser location proc) (procedure?)
(_i "Modify context properties with Scheme procedure @var{proc}.")
(make-music 'ApplyContext
- 'procedure proc))
+ 'procedure proc))
applyMusic =
#(define-music-function (parser location func music) (procedure? ly:music?)
#(define-music-function (parser location ctx proc) (symbol? procedure?)
(_i "Apply function @code{proc} to every layout object in context @code{ctx}")
(make-music 'ApplyOutputEvent
- 'procedure proc
- 'context-type ctx))
+ 'procedure proc
+ 'context-type ctx))
appoggiatura =
#(def-grace-function startAppoggiaturaMusic stopAppoggiaturaMusic
#(define-event-function (parser location offset text) (number-pair? markup?)
(_i "Attach @var{text} at @var{offset} (use like @code{\\tweak})")
(make-music 'AnnotateOutputEvent
- 'X-offset (car offset)
- 'Y-offset (cdr offset)
- 'text text))
+ 'X-offset (car offset)
+ 'Y-offset (cdr offset)
+ 'text text))
bar =
#(define-music-function (parser location type) (string?)
#(define-music-function (parser location n) (integer?)
(_i "Print a warning if the current bar number is not @var{n}.")
(make-music 'ApplyContext
- 'procedure
- (lambda (c)
- (let ((cbn (ly:context-property c 'currentBarNumber)))
- (if (and (number? cbn) (not (= cbn n)))
- (ly:input-warning location
- "Barcheck failed got ~a expect ~a"
- cbn n))))))
+ 'procedure
+ (lambda (c)
+ (let ((cbn (ly:context-property c 'currentBarNumber)))
+ (if (and (number? cbn) (not (= cbn n)))
+ (ly:input-warning location
+ "Barcheck failed got ~a expect ~a"
+ cbn n))))))
beamExceptions =
#(define-scheme-function (parser location music) (ly:music?)
#(define-event-function (parser location delta) (real?)
(_i "Create a fall or doit of pitch interval @var{delta}.")
(make-music 'BendAfterEvent
- 'delta-step delta))
+ 'delta-step delta))
bookOutputName =
#(define-void-function (parser location newfilename) (string?)
(_i "Insert contents of quote @var{what} corresponding to @var{main-music},
in a CueVoice oriented by @var{dir}.")
(make-music 'QuoteMusic
- 'element main-music
- 'quoted-context-type 'CueVoice
- 'quoted-context-id "cue"
- 'quoted-music-name what
- 'quoted-voice-direction dir))
+ 'element main-music
+ 'quoted-context-type 'CueVoice
+ 'quoted-context-id "cue"
+ 'quoted-music-name what
+ 'quoted-voice-direction dir))
cueDuringWithClef =
#(define-music-function
(_i "Insert contents of quote @var{what} corresponding to @var{main-music},
in a CueVoice oriented by @var{dir}.")
(make-music 'QuoteMusic
- 'element main-music
- 'quoted-context-type 'CueVoice
- 'quoted-context-id "cue"
- 'quoted-music-name what
- 'quoted-music-clef clef
- 'quoted-voice-direction dir))
+ 'element main-music
+ 'quoted-context-type 'CueVoice
+ 'quoted-context-id "cue"
+ 'quoted-music-name what
+ 'quoted-music-clef clef
+ 'quoted-voice-direction dir))
(_i "Terminate the next spanner prematurely after exactly one note
without the need of a specific end spanner.")
(let* ((start-span-evs (filter (lambda (ev)
- (equal? (ly:music-property ev 'span-direction)
- START))
- (extract-typed-music music 'span-event)))
- (stop-span-evs
- (map (lambda (m)
- (music-clone m 'span-direction STOP))
+ (equal? (ly:music-property ev 'span-direction)
+ START))
+ (extract-typed-music music 'span-event)))
+ (stop-span-evs
+ (map (lambda (m)
+ (music-clone m 'span-direction STOP))
start-span-evs))
- (end-ev-chord (make-music 'EventChord
- 'elements stop-span-evs))
- (total (make-music 'SequentialMusic
- 'elements (list music
- end-ev-chord))))
+ (end-ev-chord (make-music 'EventChord
+ 'elements stop-span-evs))
+ (total (make-music 'SequentialMusic
+ 'elements (list music
+ end-ev-chord))))
total))
eventChords =
#(define-music-function (parser location factor argument) (ly:moment? ly:music?)
(_i "Adjust durations of music in @var{argument} by rational @var{factor}.")
(let ((orig-duration (ly:music-length argument))
- (multiplier (ly:make-moment 1 1)))
+ (multiplier (ly:make-moment 1 1)))
(for-each
(lambda (mus)
- (if (< 0 (ly:moment-main-denominator (ly:music-length mus)))
- (begin
- (ly:music-compress mus multiplier)
- (set! multiplier (ly:moment-mul factor multiplier)))))
+ (if (< 0 (ly:moment-main-denominator (ly:music-length mus)))
+ (begin
+ (ly:music-compress mus multiplier)
+ (set! multiplier (ly:moment-mul factor multiplier)))))
(extract-named-music argument '(EventChord NoteEvent RestEvent SkipEvent)))
(ly:music-compress
argument
post-event, the @code{\\footnote} command itself needs to be attached
to the preceding note or rest as a post-event with @code{-}.")
(let ((mus (make-music
- 'FootnoteEvent
- 'X-offset (car offset)
- 'Y-offset (cdr offset)
- 'automatically-numbered (not mark)
- 'text (or mark (make-null-markup))
- 'footnote-text footnote)))
+ 'FootnoteEvent
+ 'X-offset (car offset)
+ 'Y-offset (cdr offset)
+ 'automatically-numbered (not mark)
+ 'text (or mark (make-null-markup))
+ 'footnote-text footnote)))
#{ \once \tweak footnote-music #mus #item #}))
grace =
in the format of @code{all-grob-descriptions}.")
(ly:make-context-mod
(map (lambda (p)
- (list 'assign (car p) (ly:make-grob-properties (cdr p))))
+ (list 'assign (car p) (ly:make-grob-properties (cdr p))))
descriptions)))
harmonicByFret = #(define-music-function (parser location fret music) (number? ly:music?)
(_i "Switch instrument to @var{name}, which must be predefined with
@code{\\addInstrumentDefinition}.")
(let* ((handle (assoc name instrument-definitions))
- (instrument-def (if handle (cdr handle) '())))
+ (instrument-def (if handle (cdr handle) '())))
(if (not handle)
- (ly:input-warning location "No such instrument: ~a" name))
+ (ly:input-warning location "No such instrument: ~a" name))
(context-spec-music
(make-music 'SimultaneousMusic
- 'elements
- (map (lambda (kv)
- (make-property-set
- (car kv)
- (cdr kv)))
- instrument-def))
+ 'elements
+ (map (lambda (kv)
+ (make-property-set
+ (car kv)
+ (cdr kv)))
+ instrument-def))
'Staff)))
(_i "Set key to @var{tonic} and scale @var{pitch-alist}.
If both are null, just generate @code{KeyChangeEvent}.")
(cond ((null? tonic) (make-music 'KeyChangeEvent))
- ((null? pitch-alist)
- (ly:parser-error parser (_ "second argument must be pitch list")
- location)
- (make-music 'SequentialMusic 'void #t))
- (else
- (ly:music-transpose
- (make-music 'KeyChangeEvent
- 'tonic (ly:make-pitch 0 0 0)
- 'pitch-alist pitch-alist)
- tonic))))
+ ((null? pitch-alist)
+ (ly:parser-error parser (_ "second argument must be pitch list")
+ location)
+ (make-music 'SequentialMusic 'void #t))
+ (else
+ (ly:music-transpose
+ (make-music 'KeyChangeEvent
+ 'tonic (ly:make-pitch 0 0 0)
+ 'pitch-alist pitch-alist)
+ tonic))))
killCues =
#(define-music-function (parser location music) (ly:music?)
(music-map
(lambda (mus)
(if (and (string? (ly:music-property mus 'quoted-music-name))
- (string=? (ly:music-property mus 'quoted-context-id "") "cue"))
- (ly:music-property mus 'element)
- mus))
+ (string=? (ly:music-property mus 'quoted-context-id "") "cue"))
+ (ly:music-property mus 'element)
+ mus))
music))
#(define-music-function (parser location label) (symbol?)
(_i "Create @var{label} as a bookmarking label.")
(make-music 'EventChord
- 'page-marker #t
- 'page-label label
- 'elements (list (make-music 'LabelEvent
- 'page-label label))))
+ 'page-marker #t
+ 'page-label label
+ 'elements (list (make-music 'LabelEvent
+ 'page-label label))))
language =
(parser location label) ((scheme? '()))
"Make the music for the \\mark command."
(let* ((set (and (integer? label)
- (context-spec-music (make-property-set 'rehearsalMark label)
- 'Score)))
- (ev (make-music 'MarkEvent
- 'origin location)))
+ (context-spec-music (make-property-set 'rehearsalMark label)
+ 'Score)))
+ (ev (make-music 'MarkEvent
+ 'origin location)))
(if set
- (make-sequential-music (list set ev))
- (begin
- (set! (ly:music-property ev 'label) label)
- ev))))
+ (make-sequential-music (list set ev))
+ (begin
+ (set! (ly:music-property ev 'label) label)
+ ev))))
musicMap =
#(define-music-function (parser location proc mus) (procedure? ly:music?)
(_i "Forbid a page break. May be used at toplevel (i.e., between scores or
markups), or inside a score.")
(make-music 'EventChord
- 'page-marker #t
- 'page-break-permission 'forbid
- 'elements (list (make-music 'PageBreakEvent
- 'break-permission '()))))
+ 'page-marker #t
+ 'page-break-permission 'forbid
+ 'elements (list (make-music 'PageBreakEvent
+ 'break-permission '()))))
noPageTurn =
#(define-music-function (location parser) ()
(_i "Forbid a page turn. May be used at toplevel (i.e., between scores or
markups), or inside a score.")
(make-music 'EventChord
- 'page-marker #t
- 'page-turn-permission 'forbid
- 'elements (list (make-music 'PageTurnEvent
- 'break-permission '()))))
+ 'page-marker #t
+ 'page-turn-permission 'forbid
+ 'elements (list (make-music 'PageTurnEvent
+ 'break-permission '()))))
#(define-music-function (parser location octave) (integer?)
(_i "Set the octavation.")
(make-music 'OttavaMusic
- 'ottava-number octave))
+ 'ottava-number octave))
overrideTimeSignatureSettings =
#(define-music-function
of @var{base-moment}, @var{beat-structure}, and @var{beam-exceptions}.")
;; TODO -- add warning if largest value of grouping is
- ;; greater than time-signature.
+ ;; greater than time-signature.
(let ((setting (make-setting base-moment beat-structure beam-exceptions)))
(override-time-signature-setting time-signature setting)))
(_i "Force a page break. May be used at toplevel (i.e., between scores or
markups), or inside a score.")
(make-music 'EventChord
- 'page-marker #t
- 'line-break-permission 'force
- 'page-break-permission 'force
- 'elements (list (make-music 'LineBreakEvent
- 'break-permission 'force)
- (make-music 'PageBreakEvent
- 'break-permission 'force))))
+ 'page-marker #t
+ 'line-break-permission 'force
+ 'page-break-permission 'force
+ 'elements (list (make-music 'LineBreakEvent
+ 'break-permission 'force)
+ (make-music 'PageBreakEvent
+ 'break-permission 'force))))
pageTurn =
#(define-music-function (location parser) ()
(_i "Force a page turn between two scores or top-level markups.")
(make-music 'EventChord
- 'page-marker #t
- 'line-break-permission 'force
- 'page-break-permission 'force
- 'page-turn-permission 'force
- 'elements (list (make-music 'LineBreakEvent
- 'break-permission 'force)
- (make-music 'PageBreakEvent
- 'break-permission 'force)
- (make-music 'PageTurnEvent
- 'break-permission 'force))))
+ 'page-marker #t
+ 'line-break-permission 'force
+ 'page-break-permission 'force
+ 'page-turn-permission 'force
+ 'elements (list (make-music 'LineBreakEvent
+ 'break-permission 'force)
+ (make-music 'PageBreakEvent
+ 'break-permission 'force)
+ (make-music 'PageTurnEvent
+ 'break-permission 'force))))
parallelMusic =
#(define-void-function (parser location voice-ids music) (list? ly:music?)
;; arg is an EventChord -> set the parenthesize property
;; on all child notes and rests
(for-each
- (lambda (ev)
- (if (or (memq 'note-event (ly:music-property ev 'types))
- (memq 'rest-event (ly:music-property ev 'types)))
- (set! (ly:music-property ev 'parenthesize) #t)))
- (ly:music-property arg 'elements))
+ (lambda (ev)
+ (if (or (memq 'note-event (ly:music-property ev 'types))
+ (memq 'rest-event (ly:music-property ev 'types)))
+ (set! (ly:music-property ev 'parenthesize) #t)))
+ (ly:music-property arg 'elements))
;; No chord, simply set property for this expression:
(set! (ly:music-property arg 'parenthesize) #t))
arg)
#(define-music-function (location parser type once) (symbol-or-boolean? boolean?)
(_i "Override the part-combiner.")
(make-music 'EventChord
- 'elements (list (make-music 'PartCombineForceEvent
- 'forced-type type
- 'once once))))
+ 'elements (list (make-music 'PartCombineForceEvent
+ 'forced-type type
+ 'once once))))
partcombineApart = \partcombineForce #'apart ##f
partcombineApartOnce = \partcombineForce #'apart ##t
partcombineChords = \partcombineForce #'chords ##f
;; ensure \partial still works if the Timing_translator is moved
(descend-to-context
(context-spec-music (make-music 'PartialSet
- 'origin location
- 'duration dur)
- 'Timing)
+ 'origin location
+ 'duration dur)
+ 'Timing)
'Score))
pitchedTrill =
(_i "Print a trill with @var{main-note} as the main note of the trill and
print @var{secondary-note} as a stemless note head in parentheses.")
(let* ((get-notes (lambda (ev-chord)
- (extract-named-music ev-chord 'NoteEvent)))
+ (extract-named-music ev-chord 'NoteEvent)))
(sec-note-events (get-notes secondary-note))
(trill-events (extract-named-music main-note 'TrillSpanEvent)))
(if (pair? sec-note-events)
(_i "Add @var{more} to the front of @code{elements} of all music
expressions in @var{music} that are tagged with @var{tag}.")
(music-map (lambda (m)
- (if (memq tag (ly:music-property m 'tags))
- (set! (ly:music-property m 'elements)
- (cons more (ly:music-property m 'elements))))
- m)
- music))
+ (if (memq tag (ly:music-property m 'tags))
+ (set! (ly:music-property m 'elements)
+ (cons more (ly:music-property m 'elements))))
+ m)
+ music))
quoteDuring =
#(define-music-function (parser location what main-music) (string? ly:music?)
(ly:pitch-steps (ly:make-pitch 1 0))
2))))
(make-music 'RelativeOctaveMusic
- 'element music))
+ 'element music))
removeWithTag =
#(define-music-function (parser location tags music)
(fraction? ly:music?)
(_i "Multiply the duration of events in @var{music} by @var{fraction}.")
(ly:music-compress music
- (ly:make-moment (car fraction) (cdr fraction))))
+ (ly:make-moment (car fraction) (cdr fraction))))
settingsFrom =
#(define-scheme-function (parser location ctx music)
(let ((mods (ly:make-context-mod)))
(define (musicop m)
(if (music-is-of-type? m 'layout-instruction-event)
- (ly:add-context-mod
- mods
- (case (ly:music-property m 'name)
- ((PropertySet)
- (list 'assign
- (ly:music-property m 'symbol)
- (ly:music-property m 'value)))
- ((PropertyUnset)
- (list 'unset
- (ly:music-property m 'symbol)))
- ((OverrideProperty)
- (cons* 'push
- (ly:music-property m 'symbol)
- (ly:music-property m 'grob-value)
+ (ly:add-context-mod
+ mods
+ (case (ly:music-property m 'name)
+ ((PropertySet)
+ (list 'assign
+ (ly:music-property m 'symbol)
+ (ly:music-property m 'value)))
+ ((PropertyUnset)
+ (list 'unset
+ (ly:music-property m 'symbol)))
+ ((OverrideProperty)
+ (cons* 'push
+ (ly:music-property m 'symbol)
+ (ly:music-property m 'grob-value)
(cond
((ly:music-property m 'grob-property #f) => list)
(else
(ly:music-property m 'grob-property-path)))))
- ((RevertProperty)
- (cons* 'pop
- (ly:music-property m 'symbol)
+ ((RevertProperty)
+ (cons* 'pop
+ (ly:music-property m 'symbol)
(cond
((ly:music-property m 'grob-property #f) => list)
(else
(ly:music-property m 'grob-property-path)))))))
- (case (ly:music-property m 'name)
- ((ApplyContext)
- (ly:add-context-mod mods
- (list 'apply
- (ly:music-property m 'procedure))))
- ((ContextSpeccedMusic)
- (if (or (not ctx)
- (eq? ctx (ly:music-property m 'context-type)))
- (musicop (ly:music-property m 'element))))
- (else
- (let ((callback (ly:music-property m 'elements-callback)))
- (if (procedure? callback)
- (for-each musicop (callback m))))))))
+ (case (ly:music-property m 'name)
+ ((ApplyContext)
+ (ly:add-context-mod mods
+ (list 'apply
+ (ly:music-property m 'procedure))))
+ ((ContextSpeccedMusic)
+ (if (or (not ctx)
+ (eq? ctx (ly:music-property m 'context-type)))
+ (musicop (ly:music-property m 'element))))
+ (else
+ (let ((callback (ly:music-property m 'elements-callback)))
+ (if (procedure? callback)
+ (for-each musicop (callback m))))))))
(musicop music)
mods))
#(define-music-function (parser location dur) (ly:duration?)
(_i "Skip forward by @var{dur}.")
(make-music 'SkipMusic
- 'duration dur))
+ 'duration dur))
slashedGrace =
#{
\overrideProperty Score.NonMusicalPaperColumn.line-break-system-details
#(list (cons 'alignment-extra-space (cdr (assoc 'system-stretch parameters)))
- (cons 'system-Y-extent (cdr (assoc 'system-Y-extent parameters))))
+ (cons 'system-Y-extent (cdr (assoc 'system-Y-extent parameters))))
#})
styledNoteHeads =
(fraction? ly:music?)
(_i "Scale @var{music} in time by @var{fraction}.")
(make-music 'TimeScaledMusic
- 'element (ly:music-compress music (ly:make-moment (car fraction) (cdr fraction)))
- 'numerator (car fraction)
- 'denominator (cdr fraction)))
+ 'element (ly:music-compress music (ly:make-moment (car fraction) (cdr fraction)))
+ 'numerator (car fraction)
+ 'denominator (cdr fraction)))
transpose =
#(define-music-function
(_i "Insert notes from the part @var{what} into a voice called @code{cue},
using the transposition defined by @var{pitch}. This happens
-simultaneously with @var{main-music}, which is usually a rest. The
+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 'CueVoice
- 'quoted-context-id "cue"
- 'quoted-music-name what
- 'quoted-voice-direction dir
+ 'element main-music
+ 'quoted-context-type 'CueVoice
+ 'quoted-context-id "cue"
+ 'quoted-music-name what
+ 'quoted-voice-direction dir
;; following is inverse of instrumentTransposition for
;; historical reasons
- 'quoted-transposition pitch))
+ 'quoted-transposition pitch))
transposition =
#(define-music-function (parser location pitch) (ly:pitch?)
\storePredefinedDiagram #default-fret-table \chordmode {c:9}
#guitar-tuning
- #(chord-shape 'c:9 guitar-tuning)
+ #(chord-shape 'c:9 guitar-tuning)
\storePredefinedDiagram #default-fret-table \chordmode {cis:9}
#guitar-tuning
- #(offset-fret 1 (chord-shape 'c:9 guitar-tuning))
+ #(offset-fret 1 (chord-shape 'c:9 guitar-tuning))
\storePredefinedDiagram #default-fret-table \chordmode {des:9}
#guitar-tuning
- #(offset-fret 1 (chord-shape 'c:9 guitar-tuning))
+ #(offset-fret 1 (chord-shape 'c:9 guitar-tuning))
\storePredefinedDiagram #default-fret-table \chordmode {d:9}
#guitar-tuning
- #(offset-fret 2 (chord-shape 'c:9 guitar-tuning))
+ #(offset-fret 2 (chord-shape 'c:9 guitar-tuning))
\storePredefinedDiagram #default-fret-table \chordmode {dis:9}
#guitar-tuning
- #(offset-fret 3 (chord-shape 'c:9 guitar-tuning))
+ #(offset-fret 3 (chord-shape 'c:9 guitar-tuning))
\storePredefinedDiagram #default-fret-table \chordmode {ees:9}
#guitar-tuning
- #(offset-fret 3 (chord-shape 'c:9 guitar-tuning))
+ #(offset-fret 3 (chord-shape 'c:9 guitar-tuning))
\storePredefinedDiagram #default-fret-table \chordmode {e:9}
#guitar-tuning
- #"o;2-2;o;1-1;o;2-3;"
+ #"o;2-2;o;1-1;o;2-3;"
\storePredefinedDiagram #default-fret-table \chordmode {f:9}
#guitar-tuning
- #(chord-shape 'f:9 guitar-tuning)
+ #(chord-shape 'f:9 guitar-tuning)
\storePredefinedDiagram #default-fret-table \chordmode {fis:9}
#guitar-tuning
- #(offset-fret 1 (chord-shape 'f:9 guitar-tuning))
+ #(offset-fret 1 (chord-shape 'f:9 guitar-tuning))
\storePredefinedDiagram #default-fret-table \chordmode {ges:9}
#guitar-tuning
- #(offset-fret 1 (chord-shape 'f:9 guitar-tuning))
+ #(offset-fret 1 (chord-shape 'f:9 guitar-tuning))
\storePredefinedDiagram #default-fret-table \chordmode {g:9}
#guitar-tuning
- #(offset-fret 2 (chord-shape 'f:9 guitar-tuning))
+ #(offset-fret 2 (chord-shape 'f:9 guitar-tuning))
\storePredefinedDiagram #default-fret-table \chordmode {gis:9}
#guitar-tuning
- #(offset-fret 3 (chord-shape 'f:9 guitar-tuning))
+ #(offset-fret 3 (chord-shape 'f:9 guitar-tuning))
\storePredefinedDiagram #default-fret-table \chordmode {aes:9}
#guitar-tuning
- #(offset-fret 3 (chord-shape 'f:9 guitar-tuning))
+ #(offset-fret 3 (chord-shape 'f:9 guitar-tuning))
\storePredefinedDiagram #default-fret-table \chordmode {a:9}
#guitar-tuning
- #(offset-fret 4 (chord-shape 'f:9 guitar-tuning))
+ #(offset-fret 4 (chord-shape 'f:9 guitar-tuning))
\storePredefinedDiagram #default-fret-table \chordmode {ais:9}
#guitar-tuning
- #(offset-fret 5 (chord-shape 'f:9 guitar-tuning))
+ #(offset-fret 5 (chord-shape 'f:9 guitar-tuning))
\storePredefinedDiagram #default-fret-table \chordmode {bes:9}
#guitar-tuning
- #(offset-fret 5 (chord-shape 'f:9 guitar-tuning))
+ #(offset-fret 5 (chord-shape 'f:9 guitar-tuning))
\storePredefinedDiagram #default-fret-table \chordmode {b:9}
#guitar-tuning
- #(offset-fret -1 (chord-shape 'c:9 guitar-tuning))
+ #(offset-fret -1 (chord-shape 'c:9 guitar-tuning))
fermataMarkup =
#(make-music 'MultiMeasureTextEvent
- ;; Set the 'text based on the 'direction
- 'text (make-fermata-markup)
+ ;; Set the 'text based on the 'direction
+ 'text (make-fermata-markup)
'tweaks '((outside-staff-priority . 40)
- (outside-staff-padding . 0)))
+ (outside-staff-padding . 0)))
%% font sizes
\override PhrasingSlur.dash-definition = #'((0 1 0.1 0.75))
phrasingSlurHalfDashed =
\override PhrasingSlur.dash-definition = #'((0 0.5 0.4 0.75)
- (0.5 1 1 1))
+ (0.5 1 1 1))
phrasingSlurHalfSolid =
\override PhrasingSlur.dash-definition = #'((0 0.5 1 1)
- (0.5 1 0.4 0.75))
+ (0.5 1 0.4 0.75))
phrasingSlurSolid =
\revert PhrasingSlur.dash-definition
slurDashed = \override Slur.dash-definition = #'((0 1 0.4 0.75))
slurDotted = \override Slur.dash-definition = #'((0 1 0.1 0.75))
slurHalfDashed = \override Slur.dash-definition = #'((0 0.5 0.4 0.75)
- (0.5 1 1 1))
+ (0.5 1 1 1))
slurHalfSolid = \override Slur.dash-definition = #'((0 0.5 1 1)
- (0.5 1 0.4 0.75))
+ (0.5 1 0.4 0.75))
slurSolid = \revert Slur.dash-definition
tieDashed = \override Tie.dash-definition = #'((0 1 0.4 0.75))
tieDotted = \override Tie.dash-definition = #'((0 1 0.1 0.75))
tieHalfDashed = \override Tie.dash-definition = #'((0 0.5 0.4 0.75)
- (0.5 1 1 1))
+ (0.5 1 1 1))
tieHalfSolid = \override Tie.dash-definition = #'((0 0.5 1 1)
- (0.5 1 0.4 0.75))
+ (0.5 1 0.4 0.75))
tieSolid = \revert Tie.dash-definition
(if (defined? sname)
sname
`(substring (defaulting ,(sym part "InstrumentName") ,part)
- 0 1)))
+ 0 1)))
""))
#(defmacro lyrics-if-defined (name voice . optionals)
(let ((above (if (pair? optionals) (car optionals) #f)))
(if (defined? name)
`(make-music 'ContextSpeccedMusic
- 'create-new #t
- 'context-type 'Lyrics
- 'property-operations ',(if above `((assign alignAboveContext ,above)) '())
- 'element (make-music 'LyricCombineMusic
- 'associated-context ,voice
- 'element ,name))
+ 'create-new #t
+ 'context-type 'Lyrics
+ 'property-operations ',(if above `((assign alignAboveContext ,above)) '())
+ 'element (make-music 'LyricCombineMusic
+ 'associated-context ,voice
+ 'element ,name))
#{#})))
#(defmacro one-voice-staff (name clef)
#(defaulting Key)
\clef #(identity ,clef)
\new Voice = #(identity ,name) <<
- #(defaulting Time)
- \dynamicUp
- #(defaulting ,(sym name "Music"))
+ #(defaulting Time)
+ \dynamicUp
+ #(defaulting ,(sym name "Music"))
>>
}
#(lyrics-if-defined ,(sym name "Lyrics") ,name)
#(defaulting ,(sym v2name "InstrumentName") ,v2name)
}
shortInstrumentName = \markup \right-column \smallCaps {
- #(short-name ,v1name)
- #(short-name ,v2name)
+ #(short-name ,v1name)
+ #(short-name ,v2name)
}
midiInstrument = "clarinet"
} <<
#(defaulting Key)
\clef #(identity ,clef)
\new Voice = #(identity ,v1name) <<
- #(defaulting Time)
- \voiceOne
- \dynamicUp
- #(defaulting ,(sym v1name "Music"))
+ #(defaulting Time)
+ \voiceOne
+ \dynamicUp
+ #(defaulting ,(sym v1name "Music"))
>>
\new Voice = #(identity ,v2name) <<
- #(defaulting Time)
- \voiceTwo
- #(defaulting ,(sym v2name "Music"))
+ #(defaulting Time)
+ \voiceTwo
+ #(defaulting ,(sym v2name "Music"))
>>
>>
#(lyrics-if-defined ,(sym v1name "Lyrics") ,v1name ,name)
#(if (defaulting TwoVoicesPerStaff #f)
(two-voice-staff "Women" "treble" "Soprano" "Alto")
(make-simultaneous-music (list (one-voice-staff "Soprano" "treble")
- (one-voice-staff "Alto" "treble"))))
+ (one-voice-staff "Alto" "treble"))))
#(lyrics-if-defined VerseOne "Soprano")
#(lyrics-if-defined VerseTwo "Soprano")
#(if (defaulting TwoVoicesPerStaff #f)
(two-voice-staff "Men" "bass" "Tenor" "Bass")
(make-simultaneous-music (list (one-voice-staff "Tenor" "treble_8")
- (one-voice-staff "Bass" "bass"))))
+ (one-voice-staff "Bass" "bass"))))
>> % End ChoirStaff
\new PianoStaff
\clef "treble"
#(defaulting Key)
\new Voice <<
- #(defaulting Time)
- #(defaulting PianoRHMusic)
+ #(defaulting Time)
+ #(defaulting PianoRHMusic)
>>
}
\new Dynamics {
\clef "bass"
#(defaulting Key)
\new Voice <<
- #(defaulting Time)
- #(defaulting PianoLHMusic)
+ #(defaulting Time)
+ #(defaulting PianoLHMusic)
>>
}
>>
\keepWithTag #'play \SATB
\midi { }
}
-
(4 . 0)
(5 . 0)
(6 . 0)
- )
+ )
locrian = #`(
(4 . ,FLAT)
(5 . ,FLAT)
(6 . ,FLAT)
- )
+ )
aeolian = #`(
(4 . 0)
(5 . 0)
(6 . ,FLAT)
- )
+ )
lydian = #`(
(4 . 0)
(5 . 0)
(6 . 0)
- )
+ )
phrygian = #`(
(4 . 0)
(5 . ,FLAT)
(6 . ,FLAT)
-)
+)
dorian = #`(
(5 . 0)
(6 . ,FLAT)
)
-
harmonic = #(make-music 'HarmonicEvent)
accent = #(make-articulation "accent"
- 'midi-extra-velocity 20)
+ 'midi-extra-velocity 20)
coda = #(make-articulation "coda")
downbow = #(make-articulation "downbow")
downmordent = #(make-articulation "downmordent")
longfermata = #(make-articulation "longfermata")
ltoe = #(make-articulation "ltoe")
marcato = #(make-articulation "marcato"
- 'midi-extra-velocity 40)
+ 'midi-extra-velocity 40)
mordent = #(make-articulation "mordent")
open = #(make-articulation "open")
portato = #(make-articulation "portato"
- 'midi-length
- (lambda (len context)
- (ly:moment-mul len (ly:make-moment 3/4))))
+ 'midi-length
+ (lambda (len context)
+ (ly:moment-mul len (ly:make-moment 3/4))))
prall = #(make-articulation "prall")
pralldown = #(make-articulation "pralldown")
prallmordent = #(make-articulation "prallmordent")
signumcongruentiae = #(make-articulation "signumcongruentiae")
snappizzicato = #(make-articulation "snappizzicato")
staccatissimo = #(make-articulation "staccatissimo"
- 'midi-length
- (lambda (len context)
- (seconds->moment 1/8 context))
- 'midi-extra-velocity 6)
+ 'midi-length
+ (lambda (len context)
+ (seconds->moment 1/8 context))
+ 'midi-extra-velocity 6)
staccato = #(make-articulation "staccato"
- 'midi-length
- (lambda (len context)
- (moment-min (ly:moment-mul len (ly:make-moment 1/2))
- (seconds->moment 1/2 context)))
- 'midi-extra-velocity 4)
+ 'midi-length
+ (lambda (len context)
+ (moment-min (ly:moment-mul len (ly:make-moment 1/2))
+ (seconds->moment 1/2 context)))
+ 'midi-extra-velocity 4)
stopped = #(make-articulation "stopped")
tenuto = #(make-articulation "tenuto")
thumb = \finger \markup \scale #(cons (magstep 5) (magstep 5))
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)
deprecatedenddim = {
$(make-event-chord (list enddecr))
-% \unset decrescendoText
-% \unset decrescendoSpanner
+% \unset decrescendoText
+% \unset decrescendoSpanner
}
deprecatedendcresc = {
$(make-event-chord (list endcr))
-% \unset crescendoText
-% \unset crescendoSpanner
+% \unset crescendoText
+% \unset crescendoSpanner
}
}
crescHairpin = {
- \unset crescendoText
- \unset crescendoSpanner
+ \unset crescendoText
+ \unset crescendoSpanner
}
dimHairpin = {
- \unset decrescendoText
- \unset decrescendoSpanner
+ \unset decrescendoText
+ \unset decrescendoSpanner
}
%% convert 5-string banjo tuning to 4-string by removing the 5th string
four-string-banjo = #(lambda (tuning)
- (take tuning 4))
+ (take tuning 4))
#(define (add-text-replacements! alist)
(set! text-font-defaults
- (assoc-set! text-font-defaults 'replacement-alist
- (cdaar
- (internal-add-text-replacements (list text-font-defaults) alist)))))
+ (assoc-set! text-font-defaults 'replacement-alist
+ (cdaar
+ (internal-add-text-replacements (list text-font-defaults) alist)))))
#(define (include-special-characters)
(add-text-replacements!
#(let ((toc-item-list (list)))
(call-after-session (lambda () (set! toc-item-list '())))
(set! add-toc-item!
- (lambda (markup-symbol text)
- (let ((label (gensym "toc")))
- (set! toc-item-list
- (cons (list label markup-symbol text)
- toc-item-list))
- (make-music 'EventChord
- 'page-marker #t
- 'page-label label
- 'elements (list (make-music 'LabelEvent
- 'page-label label))))))
+ (lambda (markup-symbol text)
+ (let ((label (gensym "toc")))
+ (set! toc-item-list
+ (cons (list label markup-symbol text)
+ toc-item-list))
+ (make-music 'EventChord
+ 'page-marker #t
+ 'page-label label
+ 'elements (list (make-music 'LabelEvent
+ 'page-label label))))))
(set! toc-items (lambda ()
- (reverse toc-item-list))))
+ (reverse toc-item-list))))
\paper {
tocTitleMarkup = \markup \huge \column {
built using the @code{tocItem} music function
Usage: @code{\\markuplist \\table-of-contents}" )
(cons (interpret-markup layout props
- (ly:output-def-lookup layout 'tocTitleMarkup))
- (space-lines (chain-assoc-get 'baseline-skip props)
- (map (lambda (toc-item)
- (let ((label (car toc-item))
- (toc-markup (cadr toc-item))
- (text (caddr toc-item)))
- (interpret-markup
- layout
- (cons (list (cons 'toc:page
- (markup #:with-link label #:page-ref label "XXX" "?"))
- (cons 'toc:text (markup #:with-link label text))
- (cons 'toc:label label))
- props)
- (ly:output-def-lookup layout toc-markup))))
- (toc-items)))))
+ (ly:output-def-lookup layout 'tocTitleMarkup))
+ (space-lines (chain-assoc-get 'baseline-skip props)
+ (map (lambda (toc-item)
+ (let ((label (car toc-item))
+ (toc-markup (cadr toc-item))
+ (text (caddr toc-item)))
+ (interpret-markup
+ layout
+ (cons (list (cons 'toc:page
+ (markup #:with-link label #:page-ref label "XXX" "?"))
+ (cons 'toc:text (markup #:with-link label text))
+ (cons 'toc:label label))
+ props)
+ (ly:output-def-lookup layout toc-markup))))
+ (toc-items)))))
-tocItem =
+tocItem =
#(define-music-function (parser location text) (markup?)
"Add a line to the table of content, using the @code{tocItemMarkup} paper
variable markup"