1 ; lily.scm -- implement Scheme output routines for TeX and PostScript
3 ; source file of the GNU LilyPond music typesetter
5 ; (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
8 ;(debug-enable 'backtrace)
12 (use-modules (ice-9 regex))
14 ;; do nothing in .scm output
15 (define (comment s) "")
21 (define (cons-map f x)
22 (cons (f (car x)) (f (cdr x))))
24 (define (reduce operator list)
25 (if (null? (cdr list)) (car list)
26 (operator (car list) (reduce operator (cdr list)))
30 (define (glue-2-strings a b)
31 (string-append a " " b))
33 (define (numbers->string l)
34 (reduce glue-2-strings (map number->string l)))
36 (define (chop-decimal x) (if (< (abs x) 0.001) 0.0 x))
38 (define (number->octal-string x)
39 (let* ((n (inexact->exact x))
41 (n8 (quotient (- n (* n64 64)) 8)))
45 (number->string (remainder (- n (+ (* n64 64) (* n8 8))) 8)))))
47 (define (inexact->string x radix)
48 (let ((n (inexact->exact x)))
49 (number->string n radix)))
55 (string-append (number->string (car c)) " ")
56 (string-append (number->string (cdr c)) " ")))
62 (make-string 1 (integer->char (+ (char->integer #\A) i)))
67 (define (scm-scm action-name)
70 (define security-paranoia #f)
73 ;; See documentation of Item::visibility_lambda_
74 (define (postbreak-only-visibility d) (if (= d 1) '(#f . #f) '(#t . #t)))
75 (define (spanbar-non-postbreak-visibility d) (if (= d -1) '(#t . #t) '(#f . #f)))
76 (define (all-visibility d) '(#f . #f))
77 (define (non-postbreak-visibility d) (if (= d 1) '(#t . #t) '(#f . #f)))
78 (define (non-prebreak-visibility d) (if (= d -1) '(#t . #t) '(#f . #f)))
81 ;; Score_span_bars are only visible at start of line
82 ;; i.e. if break_dir == RIGHT == 1
83 (define Span_bar_engraver-visibility non-postbreak-visibility)
84 (define Base_span_bar_engraver-visibility non-postbreak-visibility)
85 (define mark-visibility non-prebreak-visibility)
86 (define Span_score_bar_engraver-visibility postbreak-only-visibility)
87 (define Piano_bar_engraver-visibility postbreak-only-visibility)
88 (define Staff_group_bar_engraver-visibility postbreak-only-visibility)
90 ;; Spacing constants for prefatory matter.
92 ;; rules for this spacing are much more complicated than this. See [Wanske] page 126 -- 134, [Ross] pg 143 -- 147
96 ;; (Measured in staff space)
99 (("" "Clef_item") . (minimum-space 1.0))
100 (("" "Staff_bar") . (minimum-space 0.0))
101 (("" "Clef_item") . (minimum-space 1.0))
102 (("" "Key_item") . (minimum-space 0.5))
103 (("" "Span_bar") . (extra-space 0.0))
104 (("" "Time_signature") . (extra-space 0.0))
105 (("" "begin-of-note") . (minimum-space 1.5))
106 (("Clef_item" "Key_item") . (minimum-space 4.0))
107 (("Key_item" "Time_signature") . (extra-space 1.0))
108 (("Clef_item" "Time_signature") . (minimum-space 3.5))
109 (("Staff_bar" "Clef_item") . (minimum-space 1.0))
110 (("Clef_item" "Staff_bar") . (minimum-space 3.7))
111 (("Time_signature" "Staff_bar") . (minimum-space 2.0))
112 (("Key_item" "Staff_bar") . (extra-space 1.0))
113 (("Span_bar" "Clef_item") . (extra-space 1.0))
114 (("Clef_item" "Span_bar") . (minimum-space 3.7))
115 (("Time_signature" "Span_bar") . (minimum-space 2.0))
116 (("Key_item" "Span_bar") . (minimum-space 2.5))
117 (("Staff_bar" "Time_signature") . (minimum-space 1.5)) ;double check this.
118 (("Time_signature" "begin-of-note") . (extra-space 2.0)) ;double check this.
119 (("Key_item" "begin-of-note") . (extra-space 2.5))
120 (("Staff_bar" "begin-of-note") . (extra-space 1.0))
121 (("Clef_item" "begin-of-note") . (minimum-space 5.0))
122 (("" "Breathing_sign") . (minimum-space 0.0))
123 (("Breathing_sign" "Key_item") . (minimum-space 1.5))
124 (("Breathing_sign" "begin-of-note") . (minimum-space 1.0))
125 (("Breathing_sign" "Staff_bar") . (minimum-space 1.5))
126 (("Breathing_sign" "Clef_item") . (minimum-space 2.0))
130 (define (break-align-spacer this next)
131 (let ((entry (assoc `(,this ,next) space-alist)))
134 (begin (ly-warn (string-append "Unknown spacing pair `" this "', `" next "'"))
135 '(minimum-space 0.0)))))
141 ;; this is silly, can't we use something like
142 ;; roman-0, roman-1 roman+1 ?
145 ("brace" . "feta-braces")
146 ("default" . "cmr10")
147 ("dynamic" . "feta-din")
151 ("finger" . "feta-nummer")
152 ("typewriter" . "cmtt")
158 ("mark" . "feta-nummer")
159 ("number" . "feta-nummer")
160 ("volta" . "feta-nummer"))
163 (define (string-encode-integer i)
166 ((< i 0) (string-append "n" (string-encode-integer (- i))))
168 (make-string 1 (integer->char (+ 65 (modulo i 26))))
169 (string-encode-integer (quotient i 26))
176 (cdr (assoc i '((-4 . 482)
189 (define script-alist '())
190 (define (articulation-to-scriptdef a)
191 (assoc a script-alist)
194 ;; Map style names to TeX font names. Return false if
195 ;; no font name found.
196 (define (style-to-cmr s)
202 (define font-name-alist '())
203 (define (font-command name-mag)
205 (string-append "magfont"
206 (string-encode-integer (hashq (car name-mag) 1000000))
208 (string-encode-integer (cdr name-mag)))
212 (define (define-fonts names)
213 (set! font-name-alist (map font-command names))
216 (font-load-command (car x) (cdr x))) font-name-alist)
222 ; Make a function that checks score element for being of a specific type.
223 (define (make-type-checker name)
225 (not (not (memq name (ly-get-elt-property elt 'interfaces))))))
239 ;;;;;;;;;;;;;;;;;;; TeX output
240 (define (tex-scm action-name)
245 (define (select-font font-name-symbol)
248 (c (assoc font-name-symbol font-name-alist))
253 (ly-warn (string-append
254 "Programming error: No such font known " (car font-name-symbol)))
255 "") ; issue no command
256 (string-append "\\" (cdr c)))
261 (define (beam width slope thick)
262 (embedded-ps ((ps-scm 'beam) width slope thick)))
264 (define (bracket arch_angle arch_width arch_height width height arch_thick thick)
265 (embedded-ps ((ps-scm 'bracket) arch_angle arch_width arch_height width height arch_thick thick)))
267 (define (dashed-slur thick dash l)
268 (embedded-ps ((ps-scm 'dashed-slur) thick dash l)))
270 (define (crescendo thick w h cont)
271 (embedded-ps ((ps-scm 'crescendo) thick w h cont)))
274 (string-append "\\char" (inexact->string i 10) " "))
276 (define (decrescendo thick w h cont)
277 (embedded-ps ((ps-scm 'decrescendo) thick w h cont)))
279 ;This sets CTM so that you get to the currentpoint
280 ; by executing a 0 0 moveto
285 (define (font-load-command name-mag command)
287 "\\font\\" command "="
288 (symbol->string (car name-mag))
290 (number->string (magstep (cdr name-mag)))
294 (define (embedded-ps s)
295 (string-append "\\embeddedps{" s "}"))
298 (string-append "% " s))
301 "\n\\EndLilyPondOutput")
303 (define (experimental-on)
306 (define (font-switch i)
310 (define (font-def i s)
312 "\\font" (font-switch i) "=" s "\n"))
318 ;(ly-gulp-file "lily.ps")
320 (regexp-substitute/global #f "\n" (ly-gulp-file "lily.ps") 'pre " %\n" 'post)
322 "\\input lilyponddefs \\turnOnPostScript"))
324 (define (header creator generate)
326 "%created by: " creator generate "\n"))
328 (define (invoke-char s i)
330 "\n\\" s "{" (inexact->string i 10) "}" ))
332 (define (invoke-dim1 s d)
334 "\n\\" s "{" (number->dim d) "}"))
339 ;; need to do something to make this really safe.
341 (define (output-tex-string s)
342 (if security-paranoia
343 (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post)
346 (define (lily-def key val)
350 (regexp-substitute/global #f "_" (output-tex-string key) 'pre "X" 'post)
351 ;(output-tex-string key)
352 "{" (output-tex-string val) "}\n"))
354 (define (number->dim x)
356 (number->string (chop-decimal x)) " pt "))
358 (define (placebox x y s)
361 (number->dim y) "}{" (number->dim x) "}{" s "}\n"))
363 (define (bezier-sandwich l thick)
364 (embedded-ps ((ps-scm 'bezier-sandwich) l thick)))
366 (define (start-line ht)
367 (string-append"\\vbox to " (number->dim ht) "{\\hbox{%\n"))
370 "}\\vss}\\interscoreline")
371 (define (stop-last-line)
373 (define (filledbox breapth width depth height)
375 "\\kern" (number->dim (- breapth))
376 "\\vrule width " (number->dim (+ breapth width))
377 "depth " (number->dim depth)
378 "height " (number->dim height) " "))
381 (string-append "\\hbox{" (output-tex-string s) "}"))
383 (define (tuplet ht gapx dx dy thick dir)
384 (embedded-ps ((ps-scm 'tuplet) ht gapx dx dy thick dir)))
386 (define (volta h w thick vert_start vert_end)
387 (embedded-ps ((ps-scm 'volta) h w thick vert_start vert_end)))
390 ;; The procedures listed below form the public interface of TeX-scm.
391 ;; (should merge the 2 lists)
392 (cond ((eq? action-name 'all-definitions)
394 (define font-load-command ,font-load-command)
396 (define bezier-sandwich ,bezier-sandwich)
397 (define bracket ,bracket)
399 (define crescendo ,crescendo)
400 (define dashed-slur ,dashed-slur)
401 (define decrescendo ,decrescendo)
402 (define end-output ,end-output)
403 (define experimental-on ,experimental-on)
404 (define filledbox ,filledbox)
405 (define font-def ,font-def)
406 (define font-switch ,font-switch)
407 (define header-end ,header-end)
408 (define lily-def ,lily-def)
409 (define header ,header)
410 (define invoke-char ,invoke-char)
411 (define invoke-dim1 ,invoke-dim1)
412 (define placebox ,placebox)
413 (define select-font ,select-font)
414 (define start-line ,start-line)
415 (define stop-line ,stop-line)
416 (define stop-last-line ,stop-last-line)
418 (define tuplet ,tuplet)
419 (define volta ,volta)
422 ((eq? action-name 'beam) beam)
423 ((eq? action-name 'tuplet) tuplet)
424 ((eq? action-name 'bracket) bracket)
425 ((eq? action-name 'crescendo) crescendo)
426 ((eq? action-name 'dashed-slur) dashed-slur)
427 ((eq? action-name 'decrescendo) decrescendo)
428 ((eq? action-name 'end-output) end-output)
429 ((eq? action-name 'experimental-on) experimental-on)
430 ((eq? action-name 'font-def) font-def)
431 ((eq? action-name 'font-switch) font-switch)
432 ((eq? action-name 'header-end) header-end)
433 ((eq? action-name 'lily-def) lily-def)
434 ((eq? action-name 'header) header)
435 ((eq? action-name 'invoke-char) invoke-char)
436 ((eq? action-name 'invoke-dim1) invoke-dim1)
437 ((eq? action-name 'placebox) placebox)
438 ((eq? action-name 'bezier-sandwich) bezier-sandwich)
439 ((eq? action-name 'start-line) start-line)
440 ((eq? action-name 'stem) stem)
441 ((eq? action-name 'stop-line) stop-line)
442 ((eq? action-name 'stop-last-line) stop-last-line)
443 ((eq? action-name 'volta) volta)
444 (else (error "unknown tag -- PS-TEX " action-name))
450 (define (ps-scm action-name)
453 ;; alist containing fontname -> fontcommand assoc (both strings)
454 (define font-alist '())
455 (define font-count 0)
456 (define current-font "")
459 (define (cached-fontname i)
462 (make-string 1 (integer->char (+ 65 i)))))
464 (define (mag-to-size m)
465 (number->string (case m
468 (2 14) ; really: 14.400
469 (3 17) ; really: 17.280
470 (4 21) ; really: 20.736
471 (5 24) ; really: 24.888
472 (6 30) ; really: 29.856
476 (define (select-font font-name-symbol)
479 (c (assoc font-name-symbol font-name-alist))
484 (ly-warn (string-append
485 "Programming error: No such font known " (car font-name-symbol)))
486 "") ; issue no command
487 (string-append " " (cdr c) " "))
492 (define (font-load-command name-mag command)
496 (symbol->string (car name-mag))
498 (number->string (magstep (cdr name-mag)))
499 " 1000 div 12 mul scalefont setfont } bind def "
503 (define (beam width slope thick)
505 (numbers->string (list width slope thick)) " draw_beam" ))
508 (string-append "% " s))
510 (define (bracket arch_angle arch_width arch_height width height arch_thick thick)
512 (numbers->string (list arch_angle arch_width arch_height width height arch_thick thick)) " draw_bracket" ))
515 (invoke-char " show" i))
517 (define (crescendo thick w h cont )
519 (numbers->string (list w h (inexact->exact cont) thick))
522 ;; what the heck is this interface ?
523 (define (dashed-slur thick dash l)
525 (apply string-append (map control->string l))
526 (number->string thick)
528 (number->string dash)
530 (number->string (* 10 thick)) ;UGH. 10 ?
531 " ] 0 draw_dashed_slur"))
533 (define (decrescendo thick w h cont)
535 (numbers->string (list w h (inexact->exact cont) thick))
536 " draw_decrescendo"))
542 (define (experimental-on) "")
544 (define (filledbox breapth width depth height)
545 (string-append (numbers->string (list breapth width depth height))
549 (define (font-def i s)
552 (substring s 0 (- (string-length s) 4))
553 " findfont 12 scalefont setfont} bind def \n"))
555 (define (font-switch i)
556 (string-append (font i) " "))
560 (ly-gulp-file "lilyponddefs.ps")
561 " {exch pop //systemdict /run get exec} "
562 (ly-gulp-file "lily.ps")
563 "{ exch pop //systemdict /run get exec } "
566 (define (lily-def key val)
568 (if (string=? (substring key 0 (min (string-length "mudelapaper") (string-length key))) "mudelapaper")
569 (string-append "/" key " {" val "} bind def\n")
570 (string-append "/" key " (" val ") def\n")
574 (define (header creator generate)
577 "%%Creator: " creator generate "\n"))
579 (define (invoke-char s i)
581 "(\\" (inexact->string i 8) ") " s " " ))
583 (define (invoke-dim1 s d)
585 (number->string (* d (/ 72.27 72))) " " s ))
587 (define (placebox x y s)
589 (number->string x) " " (number->string y) " {" s "} placebox "))
591 (define (bezier-sandwich l thick)
593 (apply string-append (map control->string l))
594 (number->string thick)
595 " draw_bezier_sandwich"))
597 (define (start-line height)
600 (define (stem breapth width depth height)
601 (string-append (numbers->string (list breapth width depth height))
608 (string-append "(" s ") show "))
611 (define (volta h w thick vert_start vert_end)
613 (numbers->string (list h w thick (inexact->exact vert_start) (inexact->exact vert_end)))
616 (define (tuplet ht gap dx dy thick dir)
618 (numbers->string (list ht gap dx dy thick (inexact->exact dir)))
627 (cond ((eq? action-name 'all-definitions)
630 (define tuplet ,tuplet)
631 (define bracket ,bracket)
633 (define crescendo ,crescendo)
634 (define volta ,volta)
635 (define bezier-sandwich ,bezier-sandwich)
636 (define dashed-slur ,dashed-slur)
637 (define decrescendo ,decrescendo)
638 (define end-output ,end-output)
639 (define experimental-on ,experimental-on)
640 (define filledbox ,filledbox)
641 (define font-def ,font-def)
642 (define font-switch ,font-switch)
643 (define header-end ,header-end)
644 (define lily-def ,lily-def)
645 (define font-load-command ,font-load-command)
646 (define header ,header)
647 (define invoke-char ,invoke-char)
648 (define invoke-dim1 ,invoke-dim1)
649 (define placebox ,placebox)
650 (define select-font ,select-font)
651 (define start-line ,start-line)
653 (define stop-line ,stop-line)
654 (define stop-last-line ,stop-line)
657 ((eq? action-name 'tuplet) tuplet)
658 ((eq? action-name 'beam) beam)
659 ((eq? action-name 'bezier-sandwich) bezier-sandwich)
660 ((eq? action-name 'bracket) bracket)
661 ((eq? action-name 'char) char)
662 ((eq? action-name 'crescendo) crescendo)
663 ((eq? action-name 'dashed-slur) dashed-slur)
664 ((eq? action-name 'decrescendo) decrescendo)
665 ((eq? action-name 'experimental-on) experimental-on)
666 ((eq? action-name 'filledbox) filledbox)
667 ((eq? action-name 'select-font) select-font)
668 ((eq? action-name 'volta) volta)
669 (else (error "unknown tag -- PS-SCM " action-name))
674 (define (arg->string arg)
675 (cond ((number? arg) (inexact->string arg 10))
676 ((string? arg) (string-append "\"" arg "\""))
677 ((symbol? arg) (string-append "\"" (symbol->string arg) "\""))))
679 (define (func name . args)
685 (map (lambda (x) (string-append " " (arg->string x))) args)))
691 (inexact->exact (/ x (abs x)))))
694 (define (as-scm action-name)
696 (define (beam width slope thick)
698 (func "set-line-char" "#")
699 (func "rline-to" width (* width slope))
703 (define (bezier-sandwich l thick)
710 (dy (- (cdr c3) (cdr c0)))
712 (c1-dx (- (car c1) x))
713 (c1-line-y (+ (cdr c0) (* c1-dx rc)))
714 (dir (if (< c1-line-y (cdr c1)) 1 -1))
715 (y (+ -1 (* dir (max (* dir (cdr c0)) (* dir (cdr c3)))))))
717 (func "rmove-to" x y)
718 (func "put" (if (< 0 dir) "/" "\\\\"))
719 (func "rmove-to" 1 (if (< 0 dir) 1 0))
720 (func "set-line-char" "_")
721 (func "h-line" (- dx 1))
722 (func "rmove-to" (- dx 1) (if (< 0 dir) -1 0))
723 (func "put" (if (< 0 dir) "\\\\" "/"))))))
725 (define (bracket arch_angle arch_width arch_height width height arch_thick thick)
727 (func "rmove-to" (+ width 1) (- (/ height -2) 1))
729 (func "set-line-char" "|")
730 (func "rmove-to" 0 1)
731 (func "v-line" (+ height 1))
732 (func "rmove-to" 0 (+ height 1))
742 (define (experimental-on)
745 (define (filledbox breapth width depth height)
746 (let ((dx (+ width breapth))
747 (dy (+ depth height)))
749 (func "rmove-to" (* -1 breapth) (* -1 depth))
752 (func "set-line-char"
753 (if (<= dx 1) "|" "#"))
756 (func "set-line-char"
757 (if (<= dy 1) "-" "="))
758 (func "h-line" dx))))))
760 (define (font-load-command name-mag command)
761 (func "load-font" (car name-mag) (magstep (cdr name-mag))))
763 (define (header creator generate)
764 (func "header" creator generate))
769 ;; urg: this is good for half of as2text's execution time
770 (define (xlily-def key val)
771 (string-append "(define " key " " (arg->string val) ")\n"))
773 (define (lily-def key val)
775 (or (equal? key "mudelapaperlinewidth")
776 (equal? key "mudelapaperstaffheight"))
777 (string-append "(define " key " " (arg->string val) ")\n")
780 (define (placebox x y s)
781 (let ((ey (inexact->exact y)))
782 (string-append "(move-to " (number->string (inexact->exact x)) " "
783 (if (= 0.5 (- (abs y) (abs ey)))
788 (define (select-font font-name-symbol)
789 (let* ((c (assoc font-name-symbol font-name-alist)))
794 "Programming error: No such font known "
795 (car font-name-symbol)))
796 "") ; issue no command
797 (func "select-font" (car font-name-symbol)))))
799 (define (start-line height)
800 (func "start-line" height))
808 (define (volta h w thick vert-start vert-end)
811 (func "set-line-char" "|")
812 (func "rmove-to" 0 -4)
813 ;; definition strange-way around
817 (func "rmove-to" 1 h)
818 (func "set-line-char" "_")
819 (func "h-line" (- w 1))
820 (func "set-line-char" "|")
823 (func "rmove-to" (- w 1) (* -1 h))
824 (func "v-line" (* -1 h)))
827 (cond ((eq? action-name 'all-definitions)
830 (define bracket ,bracket)
832 ;;(define crescendo ,crescendo)
833 (define bezier-sandwich ,bezier-sandwich)
834 ;;(define dashed-slur ,dashed-slur)
835 ;;(define decrescendo ,decrescendo)
836 (define end-output ,end-output)
837 (define experimental-on ,experimental-on)
838 (define filledbox ,filledbox)
839 ;;(define font-def ,font-def)
840 (define font-load-command ,font-load-command)
841 ;;(define font-switch ,font-switch)
842 (define header ,header)
843 (define header-end ,header-end)
844 (define lily-def ,lily-def)
845 ;;(define invoke-char ,invoke-char)
846 ;;(define invoke-dim1 ,invoke-dim1)
847 (define placebox ,placebox)
848 (define select-font ,select-font)
849 (define start-line ,start-line)
850 ;;(define stem ,stem)
851 (define stop-line ,stop-line)
852 (define stop-last-line ,stop-line)
854 ;;(define tuplet ,tuplet)
855 (define volta ,volta)
857 ;;((eq? action-name 'tuplet) tuplet)
858 ;;((eq? action-name 'beam) beam)
859 ;;((eq? action-name 'bezier-sandwich) bezier-sandwich)
860 ;;((eq? action-name 'bracket) bracket)
861 ((eq? action-name 'char) char)
862 ;;((eq? action-name 'crescendo) crescendo)
863 ;;((eq? action-name 'dashed-slur) dashed-slur)
864 ;;((eq? action-name 'decrescendo) decrescendo)
865 ;;((eq? action-name 'experimental-on) experimental-on)
866 ((eq? action-name 'filledbox) filledbox)
867 ((eq? action-name 'select-font) select-font)
868 ;;((eq? action-name 'volta) volta)
869 (else (error "unknown tag -- MUSA-SCM " action-name))
874 (define (gulp-file name)
875 (let* ((port (open-file name "r"))
876 (content (let loop ((text ""))
877 (let ((line (read-line port)))
878 (if (or (eof-object? line)
881 (loop (string-append text line "\n")))))))
885 (define (scm-gulp-file name)
888 (getenv 'LILYPONDPREFIX) "/ps") %load-path))
889 (let ((path (%search-load-path name)))
894 (define (scm-tex-output)
895 (eval (tex-scm 'all-definitions)))
897 (define (scm-ps-output)
898 (eval (ps-scm 'all-definitions)))
900 (define (scm-as-output)
901 (eval (as-scm 'all-definitions)))
903 ; Russ McManus, <mcmanus@IDT.NET>
905 ; I use the following, which should definitely be provided somewhere
906 ; in guile, but isn't, AFAIK:
910 (define (hash-table-for-each fn ht)
912 ((= i (vector-length ht)))
913 (do ((alist (vector-ref ht i) (cdr alist)))
915 (fn (car (car alist)) (cdr (car alist))))))
917 (define (hash-table-map fn ht)
920 ((= i (vector-length ht)) (reverse ret-ls))
921 (do ((alist (vector-ref ht i) (cdr alist)))
923 (set! ret-ls (cons (fn (car (car alist)) (cdr (car alist))) ret-ls)))))
927 (define (index-cell cell dir)
933 ; How should a bar line behave at a break?
935 (define (break-barline glyph dir)
936 (let ((result (assoc glyph
937 '((":|:" . (":|" . "|:"))
940 ("|:" . ("|" . "|:"))
941 ("|." . ("|." . nil))
942 (":|" . (":|" . nil))
943 ("||" . ("||" . nil))
944 (".|." . (".|." . nil))
945 ("scorebar" . (nil . "scorepostbreak"))
946 ("brace" . (nil . "brace"))
947 ("bracket" . (nil . "bracket"))
951 (if (equal? result #f)
952 (ly-warn (string-append "Unknown bar glyph: `" glyph "'"))
953 (index-cell (cdr result) dir))
958 (define (slur-ugly ind ht)
963 (> ht (+ (* 2 ind) -4))
964 (< ht (+ (* -2 ind) 8)))