(ly:warn "Error in beam quanting found. Want ~S 0 found ~S."
(procedure-name comparison) slope-sign)
(set! (ly:grob-property beam 'quant-score)
- (format "~S 0" (procedure-name comparison) )))
+ (format "~S 0" (procedure-name comparison))))
(set! (ly:grob-property beam 'quant-score) ""))))
(define-public (check-quant-callbacks l r)
(if (pair? exceptions)
(let* ((e (car exceptions))
(e-pitches (car e)))
- (if (equal? e-pitches (take pitches (length e-pitches) ))
+ (if (equal? e-pitches (take pitches (length e-pitches)))
e
(partial-match (cdr exceptions))))
#f))
;; kludge alert: replace partial matched lower part of all with
;; 'normal' pitches from full
;; (all pitches)
- (all (append (take full (length partial-pitches) )
- (drop pitches (length partial-pitches) )))
+ (all (append (take full (length partial-pitches))
+ (drop pitches (length partial-pitches))))
(highest (last all))
(missing (list-minus full (map pitch-unalter all)))
(make-line-markup
(list
(string-append
- (list-ref '("c" "d" "e" "f" "g" "a" "h" "b") (car n-a) )
+ (list-ref '("c" "d" "e" "f" "g" "a" "h" "b") (car n-a))
(if (or (equal? (car n-a) 2) (equal? (car n-a) 5))
- (list-ref '( "ses" "s" "" "is" "isis") (+ 2 (/ (cdr n-a) 2) ))
- (list-ref '("eses" "es" "" "is" "isis") (+ 2 (/ (cdr n-a) 2) ))))))))
+ (list-ref '( "ses" "s" "" "is" "isis") (+ 2 (/ (cdr n-a) 2)))
+ (list-ref '("eses" "es" "" "is" "isis") (+ 2 (/ (cdr n-a) 2)))))))))
;; fixme we should standardize on omit-root (or the other one.)
;; perhaps the default should also be reversed --hwn
(ly:add-interface
'only-prebreak-interface
"Kill this grob after the line breaking process."
- '() )
+ '())
(ly:add-interface
'piano-pedal-interface
(direction . -1)
(meta . ((interfaces . (dynamic-interface axis-group-interface
- side-position-interface spanner-interface)))) ))
+ side-position-interface spanner-interface))))))
(LeftEdge
. (
(if (markup? m)
(interpret-markup layout props m)
- (ly:make-stencil '() '(1 . -1) '(1 . -1) ))))
+ (ly:make-stencil '() '(1 . -1) '(1 . -1)))))
(def-markup-command (on-the-fly layout props procedure arg) (symbol? markup?)
(apply ly:stencil-add
(map (lambda (x)
(ly:stencil-translate-axis
- dot (* (+ 1 (* 2 x)) dotwid) X) )
+ dot (* (+ 1 (* 2 x)) dotwid) X))
(iota dot-count 1)))))
(flaggl (and (> log 2)
(ly:stencil-translate
normally inserted before elements on a line.
"
(if (> amount 0)
- (ly:make-stencil "" (cons 0 amount) '(-1 . 1) )
+ (ly:make-stencil "" (cons 0 amount) '(-1 . 1))
(ly:make-stencil "" (cons amount amount) '(-1 . 1))))
(def-markup-command (override layout props new-prop arg) (pair? markup?)
the elements marked in @var{indices}, which is a list of numbers."
(define (sublist lst start stop)
- (take (drop lst start) (- (1+ stop) start)) )
+ (take (drop lst start) (- (1+ stop) start)))
(define (stencil-list-extent ss axis)
(cons
(docfunc (lambda (pr)
(property->texi
'backend pr grob-description)))
- (iprops (filter (lambda (x) (object-property x 'backend-internal) ) props))
- (uprops (filter (lambda (x) (not (object-property x 'backend-internal)) ) props))
+ (iprops (filter (lambda (x) (object-property x 'backend-internal))
+ props))
+ (uprops (filter
+ (lambda (x) (not (object-property x 'backend-internal)))
+ props))
(user-propdocs (map docfunc uprops))
(internal-propdocs (map docfunc iprops)))
(map ref-ify
(sort
(map symbol->string
- (hashq-ref iface->grob-table (car interface) '() ))
+ (hashq-ref iface->grob-table (car interface) '()))
string<?)))))))
(define (grob-alist->texi alist)
;;;;;;;;;;;;;;;;
(define (lookup-interface name)
- (let* ((entry (hashq-ref (ly:all-grob-interfaces) name '() )))
+ (let* ((entry (hashq-ref (ly:all-grob-interfaces) name '())))
(if (equal? entry #f)
(error "Unknown interface" name))
entry))
;;;; Jan Nieuwenhuizen <janneke@gnu.org>
(define (doc-markup-function func)
- (let* ((doc-str (procedure-documentation func) )
+ (let* ((doc-str (procedure-documentation func))
(f-name (symbol->string (procedure-name func)))
(c-name (regexp-substitute/global #f "-markup$" f-name 'pre "" 'post))
(sig (object-property func 'markup-signature))
(apply string-append
(map doc-markup-function
- (sort markup-function-list markup-function<?) ) )
+ (sort markup-function-list markup-function<?)))
"\n@end table"))
(define (markup-doc-node)
(cdr (assoc 'consists context-desc))))
(props (cdr (assoc 'property-ops context-desc)))
(grobs (context-grobs context-desc))
- (grob-refs (map (lambda (x) (ref-ify x)) grobs)) )
+ (grob-refs (map (lambda (x) (ref-ify x)) grobs)))
(make <texi-node>
#:name name
(display
(backend-properties-doc-string all-user-grob-properties)
- (open-output-file "layout-properties.tely") )
+ (open-output-file "layout-properties.tely"))
(display
(translation-properties-doc-string all-user-translation-properties)
- (open-output-file "context-properties.tely") )
+ (open-output-file "context-properties.tely"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(list
"Font-size-family: \n"
(slot-ref leaf 'default-size)
- (slot-ref leaf 'size-vector) )))
+ (slot-ref leaf 'size-vector))))
(define-method (display (node <Font-tree-node>) port)
(if (ly:get-option 'safe)
(regexp-substitute/global
#f "\\\\"
- (regexp-substitute/global #f "([{}])" s 'pre "\\" 1 'post )
+ (regexp-substitute/global #f "([{}])" s 'pre "\\" 1 'post)
'pre "$\\backslash$" 'post)
s))
(define (symbol->tex-key sym)
(regexp-substitute/global
- #f "_" (sanitize-tex-string (symbol->string sym)) 'pre "X" 'post) )
+ #f "_" (sanitize-tex-string (symbol->string sym)) 'pre "X" 'post))
(define (tex-number-def prefix key number)
(string-append
(if (not (null? barre-list))
(let* ((string1 (caar barre-list))
(string2 (cadar barre-list))
- (fret (caddar barre-list))
+ (fret (caddar barre-list))
(barre-type (chain-assoc-get 'barre-type props 'curved))
(scale-dot-radius (* size dot-radius))
(barre-vertical-offset (chain-assoc-get 'barre-vertical-offset props 0.5))
- ; 2 is 1 for empty fret at bottom of figure + 1 for interval (top-fret - fret + 1) -- not an arbitrary constant
- (dot-center-y (* size (- (+ 2 (- (cadr fret-range) fret))dot-position) ))
- (bottom (+ dot-center-y (* barre-vertical-offset scale-dot-radius)))
+ ;; 2 is 1 for empty fret at bottom of figure + 1 for interval (top-fret - fret + 1) -- not an arbitrary constant
+ (dot-center-y (* size
+ (- (+ 2 (- (cadr fret-range) fret)) dot-position)))
+ (bottom (+ dot-center-y (* barre-vertical-offset scale-dot-radius)))
(left (* size (- string-count string1)))
(right (* size (- string-count string2)))
-; (bezier-thick (chain-assoc-get 'bezier-thickness props 0.1))
+;; (bezier-thick (chain-assoc-get 'bezier-thickness props 0.1))
(bezier-thick 0.1)
-; (bezier-height (chain-assoc-get 'bezier-height props 0.5))
+;; (bezier-height (chain-assoc-get 'bezier-height props 0.5))
(bezier-height 0.5)
(bezier-list (make-bezier-sandwich-list left right bottom (* size bezier-height) (* size bezier-thick)))
(barre-stencil (if (eq? barre-type 'straight)
(ly:make-stencil (list 'draw-line (* size dot-radius) left dot-center-y right dot-center-y)
(cons left right)
(cons (- dot-center-y scale-dot-radius) (+ dot-center-y scale-dot-radius)))
- (ly:make-stencil (list 'bezier-sandwich `(quote ,bezier-list) (* size bezier-thick) )
+ (ly:make-stencil (list 'bezier-sandwich `(quote ,bezier-list) (* size bezier-thick))
(cons left right)
(cons bottom (+ bottom (* size bezier-height)))))))
(if (not (null? (cdr barre-list)))
(define (get-numeric-from-key keystring)
"Get the numeric value from a key of the form k:val"
- (string->number (substring keystring 2 (string-length keystring) )))
+ (string->number (substring keystring 2 (string-length keystring))))
(define (numerify mylist)
"Convert string values to numeric or character"
c))
(define-public (split-list lst sep?)
- "(display (split-list '(a b c / d e f / g) (lambda (x) (equal? x '/))) )
+ "(display (split-list '(a b c / d e f / g) (lambda (x) (equal? x '/))))
=>
((a b c) (d e f) (g))
"
(define gc-protect-stat-count 0)
(define-public (dump-gc-protects)
- (set! gc-protect-stat-count (1+ gc-protect-stat-count) )
+ (set! gc-protect-stat-count (1+ gc-protect-stat-count))
(let* ((protects (sort
(hash-table->alist (ly:protects))
(lambda (a b)
)
instrument-equalizer-alist))
-;; (name . program+32768*(channel10 ? 1 : 0) )
+;; (name . program+32768*(channel10 ? 1 : 0))
(define instrument-names-alist '())
(set! instrument-names-alist
(append
;; as cautionaries
((equal? style 'modern-voice-cautionary)
(set-accidentals-properties #f
- '(Voice (same-octave . 0) )
+ '(Voice (same-octave . 0))
'(Voice (any-octave . 0) (same-octave . 1)
Staff (same-octave . 0) (any-octave . 0) (same-octave . 1))
context))
(let* ((skip
(make-multi-measure-rest
- (ly:make-duration 0 0) '() )))
+ (ly:make-duration 0 0) '())))
(ly:music-compress skip (ly:music-length mus))
skip))
;;;; (c) 1998--2004 Jan Nieuwenhuizen <janneke@gnu.org>
;;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
;;; Tablature functions, by Jiba (jiba@tuxfamily.org)
;; The TabNoteHead stem attachment function.
(let* ((note-collums (ly:grob-property grob 'note-columns))
(note-column1 (cadr note-collums))
(note-column2 (car note-collums))
- (note1 (car (ly:grob-property note-column1 'note-heads)))
- (note2 (car (ly:grob-property note-column2 'note-heads)))
- (text1 (ly:grob-property note1 'text))
- (text2 (ly:grob-property note2 'text))
- (fret1 (if (string? text1) (string->number text1) 0))
- (fret2 (if (string? text2) (string->number text2) 0))
- (letter (cond
- ((< fret1 fret2) "H")
- ((> fret1 fret2) "P")
- (else ""))))
+ (note1 (car (ly:grob-property note-column1 'note-heads)))
+ (note2 (car (ly:grob-property note-column2 'note-heads)))
+ (text1 (ly:grob-property note1 'text))
+ (text2 (ly:grob-property note2 'text))
+ (fret1 (if (string? text1) (string->number text1) 0))
+ (fret2 (if (string? text2) (string->number text2) 0))
+ (letter (cond
+ ((< fret1 fret2) "H")
+ ((> fret1 fret2) "P")
+ (else ""))))
(let* ((slur
;; (Slur::print grob)
-2.0)))
(ly:stencil-set-extent! text 0 (cons x x))
- (ly:stencil-align-to! text 0 1))) ) )
+ (ly:stencil-align-to! text 0 1)))))
- ; (ly:stencil-combine-at-edge slur 1 1 text -0.6)
+;; (ly:stencil-combine-at-edge slur 1 1 text -0.6)
(define-public guitar-tunings '(4 -1 -5 -10 -15 -20))
- ; end of tablature functions
+;;; end of tablature functions
(define-public (make-stencil-boxer line-thick x-padding y-padding callback)
"Makes a routine that adds a box around the grob parsed as argument"
(define (stencil-boxer grob)
- (let*
- (
- (mol (callback grob))
- (x-ext (interval-widen (ly:stencil-extent mol 0) x-padding))
- (y-ext (interval-widen (ly:stencil-extent mol 1) y-padding))
- (x-rule (make-filled-box-stencil (interval-widen x-ext line-thick)
- (cons 0 line-thick)))
- (y-rule (make-filled-box-stencil (cons 0 line-thick) y-ext)))
-
+ (let* ((mol (callback grob))
+ (x-ext (interval-widen (ly:stencil-extent mol 0) x-padding))
+ (y-ext (interval-widen (ly:stencil-extent mol 1) y-padding))
+ (x-rule (make-filled-box-stencil (interval-widen x-ext line-thick)
+ (cons 0 line-thick)))
+ (y-rule (make-filled-box-stencil (cons 0 line-thick) y-ext)))
+
(set! mol (ly:stencil-combine-at-edge mol 0 1 y-rule x-padding))
(set! mol (ly:stencil-combine-at-edge mol 0 -1 y-rule x-padding))
(set! mol (ly:stencil-combine-at-edge mol 1 1 x-rule 0))
(set! mol (ly:stencil-combine-at-edge mol 1 -1 x-rule 0))
-
mol))
stencil-boxer)
(if (equal? result #f)
(ly:warn "Unknown bar glyph: `~S'" glyph)
- (index-cell (cdr result) dir))) )
+ (index-cell (cdr result) dir))))
(define-public (shift-right-at-line-begin g)
"Shift an item to the right, but only at the start of the line."
(moveto (+ x (car currentpoint)) (+ y (cdr currentpoint))))
(define (lineto x y)
(set! currentpoint (cons x y))
- (string-append (showcp) "lst "))
+ (string-append (showcp) "l "))
(define (lineto-pair pair)
(lineto (car pair) (cdr pair)))
(define (rlineto x y)
(define (no-origin) "")
(define-public (pdftex-output-expression expr port)
- (display (eval expr this-module) port) )
+ (display (eval expr this-module) port))
;; extract the hsbw for /space from the font.
(let* ((space-length (cdar (ly:text-dimension font " ")))
(commands '())
- (add-command (lambda (x) (set! commands (cons x commands)))) )
+ (add-command (lambda (x) (set! commands (cons x commands)))))
(string-fold
(lambda (chr word)
lines)
(if (= (length lines) 1)
'((0 . 0))
- '())) ))
+ '()))))
(real-extents
(list->vector
(append
(lambda (sys) (ly:paper-system-extent sys Y)) lines)
(if (= (length lines) 1)
'((0 . 0))
- '()) )))
+ '()))))
(no-systems (vector-length real-extents))
(topskip (interval-end (vector-ref real-extents 0)))
(space-left (- page-height
(display (events x) file)
(display " active = " file)
(display (span-state x) file)
- (display "\n" file) )
+ (display "\n" file))
(define-method (note-events (vs <Voice-state>))
(define (f? x)
(define-method (previous-voice-state (vs <Voice-state>))
(let ((i (slot-ref vs 'vector-index))
- (v (slot-ref vs 'state-vector)) )
+ (v (slot-ref vs 'state-vector)))
(if (< 0 i)
(vector-ref v (1- i))
#f)))
(display (configuration x) f)
(if (synced? x)
(display " synced "))
- (display "\n" f) )
+ (display "\n" f))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#:tuning (cdar v)
#:events (map car (cdr v))))
evl))))
- (do ( (i 0 (1+ i)) )
- ( (= i (vector-length vec)) vec)
+ (do ((i 0 (1+ i)))
+ ((= i (vector-length vec)) vec)
(slot-set! (vector-ref vec i) 'vector-index i)
(slot-set! (vector-ref vec i) 'state-vector vec))))
(define-public (add-quotable name mus)
(set! noticed '())
- (let* ((tab (eval 'musicQuotes (current-module) ))
+ (let* ((tab (eval 'musicQuotes (current-module)))
(context (ly:run-translator (context-spec-music mus 'Voice)
part-combine-listener))
(first-voice-handle (last-pair noticed)))
(direction . 1)))
("stopped" .
((script-stencil . (feta . ("stopped" . "stopped")))
- (direction . 1) ))
+ (direction . 1)))
("staccato" .
((script-stencil . (feta . ("staccato" . "staccato")))
(side-relative-direction . -1)
("upbow" .
((script-stencil . (feta . ("upbow" . "upbow")))
(inside-slur . #f)
- (direction . 1) ))
+ (direction . 1)))
("downbow" .
((script-stencil . (feta . ("downbow" . "downbow")))
(inside-slur . #f)
)
("rheel" .
((script-stencil . (feta . ("dpedalheel" . "dpedalheel")))
- (direction . 1) ))
+ (direction . 1)))
("ltoe" .
((script-stencil . (feta . ("upedaltoe" . "upedaltoe")))
- (direction . -1) ))
+ (direction . -1)))
("rtoe" .
((script-stencil . (feta . ("dpedaltoe" . "dpedaltoe")))
- (direction . 1) ))
+ (direction . 1)))
("turn" .
((script-stencil . (feta . ("turn" . "turn")))
- (direction . 1) ))
+ (direction . 1)))
("open" .
((script-stencil . (feta . ("open" . "open")))
- (direction . 1) ))
+ (direction . 1)))
("flageolet" .
((script-stencil . (feta . ("flageolet" . "flageolet")))
- (direction . 1) ))
+ (direction . 1)))
("reverseturn" .
((script-stencil . (feta . ("reverseturn" . "reverseturn")))
- (direction . 1) ))
+ (direction . 1)))
("trill" .
((script-stencil . (feta . ("trill" . "trill")))
(direction . 1)
(priority . 2000)))
("prall" .
((script-stencil . (feta . ("prall" . "prall")))
- (direction . 1) ))
+ (direction . 1)))
("mordent" .
((script-stencil . (feta . ("mordent" . "mordent")))
- (direction . 1) ))
+ (direction . 1)))
("prallprall" .
((script-stencil . (feta . ("prallprall" . "prallprall")))
- (direction . 1) ))
+ (direction . 1)))
("prallmordent" .
((script-stencil . (feta . ("prallmordent" . "prallmordent")))
- (direction . 1) ))
+ (direction . 1)))
("upprall" .
((script-stencil . (feta . ("upprall" . "upprall")))
- (direction . 1) ))
+ (direction . 1)))
("downprall" .
((script-stencil . (feta . ("downprall" . "downprall")))
- (direction . 1) ))
+ (direction . 1)))
("upmordent" .
((script-stencil . (feta . ("upmordent" . "upmordent")))
- (direction . 1) ))
+ (direction . 1)))
("downmordent" .
((script-stencil . (feta . ("downmordent" . "downmordent")))
- (direction . 1) ))
+ (direction . 1)))
("lineprall" .
((script-stencil . (feta . ("lineprall" . "lineprall")))
- (direction . 1) ))
+ (direction . 1)))
("pralldown" .
((script-stencil . (feta . ("pralldown" . "pralldown")))
- (direction . 1) ))
+ (direction . 1)))
("prallup" .
((script-stencil . (feta . ("prallup" . "prallup")))
- (direction . 1) ))
+ (direction . 1)))
("segno" .
((script-stencil . (feta . ("segno" . "segno")))
- (direction . 1) ))
+ (direction . 1)))
("coda" .
((script-stencil . (feta . ("coda" . "coda")))
- (direction . 1) ))
+ (direction . 1)))
("varcoda" .
((script-stencil . (feta . ("varcoda" . "varcoda")))
- (direction . 1) )))
+ (direction . 1))))
default-script-alist)
)