;;;;
;;;; LilyPond is free software: you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
;;;;
;;;; LilyPond is free software: you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
("french" . ("clefs.G" -4 0))
("soprano" . ("clefs.C" -4 0))
("mezzosoprano" . ("clefs.C" -2 0))
("alto" . ("clefs.C" 0 0))
("C" . ("clefs.C" 0 0))
("french" . ("clefs.G" -4 0))
("soprano" . ("clefs.C" -4 0))
("mezzosoprano" . ("clefs.C" -2 0))
("alto" . ("clefs.C" 0 0))
("C" . ("clefs.C" 0 0))
("bass" . ("clefs.F" 2 0))
("F" . ("clefs.F" 2 0))
("subbass" . ("clefs.F" 4 0))
("percussion" . ("clefs.percussion" 0 0))
("bass" . ("clefs.F" 2 0))
("F" . ("clefs.F" 2 0))
("subbass" . ("clefs.F" 4 0))
("percussion" . ("clefs.percussion" 0 0))
"Generate the clef setting commands for a clef with name @var{clef-name}."
(define (make-prop-set props)
(let ((m (make-music 'PropertySet)))
"Generate the clef setting commands for a clef with name @var{clef-name}."
(define (make-prop-set props)
(let ((m (make-music 'PropertySet)))
- (begin
- (set! clef-name (match:substring match 1))
- (set! oct
- (* (if (equal? (match:substring match 2) "^") -1 1)
- (- (string->number (match:substring match 4)) 1)))
+ (begin
+ (set! clef-name (match:substring match 1))
+ (set! oct
+ (* (if (equal? (match:substring match 2) "^") -1 1)
+ (- (string->number (match:substring match 4)) 1)))
(set! style
(cond ((equal? (match:substring match 3) "(") 'parenthesized)
((equal? (match:substring match 3) "[") 'bracketed)
(else style)))))
(set! e (assoc-get clef-name supported-clefs))
(if e
(set! style
(cond ((equal? (match:substring match 3) "(") 'parenthesized)
((equal? (match:substring match 3) "[") 'bracketed)
(else style)))))
(set! e (assoc-get clef-name supported-clefs))
(if e
- prop-list
- `(((symbol . clefTranspositionStyle)
- (value . ,style))))))
- (musics (map make-prop-set prop-list))
- (recalc-mid-C (make-music 'ApplyContext))
- (seq (make-music 'SequentialMusic
- 'elements (append musics (list recalc-mid-C))))
- (csp (make-music 'ContextSpeccedMusic)))
- (set! (ly:music-property recalc-mid-C 'procedure) ly:set-middle-C!)
- (context-spec-music seq 'Staff))
- (begin
- (ly:warning (_ "unknown clef type `~a'") clef-name)
- (ly:warning (_ "supported clefs: ~a")
- (string-join
- (sort (map car supported-clefs) string<?)))
- (make-music 'Music)))))
+ prop-list
+ `(((symbol . clefTranspositionStyle)
+ (value . ,style))))))
+ (musics (map make-prop-set prop-list))
+ (recalc-mid-C (make-music 'ApplyContext))
+ (seq (make-music 'SequentialMusic
+ 'elements (append musics (list recalc-mid-C))))
+ (csp (make-music 'ContextSpeccedMusic)))
+ (set! (ly:music-property recalc-mid-C 'procedure) ly:set-middle-C!)
+ (context-spec-music seq 'Staff))
+ (begin
+ (ly:warning (_ "unknown clef type `~a'") clef-name)
+ (ly:warning (_ "supported clefs: ~a")
+ (string-join
+ (sort (map car supported-clefs) string<?)))
+ (make-music 'Music)))))
(define-public (make-cue-clef-set clef-name)
"Generate the clef setting commands for a cue clef with name
(define-public (make-cue-clef-set clef-name)
"Generate the clef setting commands for a cue clef with name