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)
219 (define (fontify name exp)
220 (string-append (select-font name)
227 ; Make a function that checks score element for being of a specific type.
228 (define (make-type-checker name)
230 (not (not (memq name (ly-get-elt-property elt 'interfaces))))))
241 ;;;;;;;;;;;;;;;;;;; generic output
243 (define (translate-atom offset exp)
247 ;;;;;;;;;;;;;;;;;;; TeX output
248 (define (tex-scm action-name)
253 (define (select-font font-name-symbol)
256 (c (assoc font-name-symbol font-name-alist))
261 (ly-warn (string-append
262 "Programming error: No such font known " (car font-name-symbol)))
263 "") ; issue no command
264 (string-append "\\" (cdr c)))
269 (define (beam width slope thick)
270 (embedded-ps ((ps-scm 'beam) width slope thick)))
272 (define (bracket arch_angle arch_width arch_height width height arch_thick thick)
273 (embedded-ps ((ps-scm 'bracket) arch_angle arch_width arch_height width height arch_thick thick)))
275 (define (dashed-slur thick dash l)
276 (embedded-ps ((ps-scm 'dashed-slur) thick dash l)))
278 (define (crescendo thick w h cont)
279 (embedded-ps ((ps-scm 'crescendo) thick w h cont)))
282 (string-append "\\char" (inexact->string i 10) " "))
284 (define (decrescendo thick w h cont)
285 (embedded-ps ((ps-scm 'decrescendo) thick w h cont)))
287 ;This sets CTM so that you get to the currentpoint
288 ; by executing a 0 0 moveto
293 (define (font-load-command name-mag command)
295 "\\font\\" command "="
296 (symbol->string (car name-mag))
298 (number->string (magstep (cdr name-mag)))
302 (define (embedded-ps s)
303 (string-append "\\embeddedps{" s "}"))
306 (string-append "% " s))
309 "\n\\EndLilyPondOutput")
311 (define (experimental-on)
314 (define (font-switch i)
318 (define (font-def i s)
320 "\\font" (font-switch i) "=" s "\n"))
326 ;(ly-gulp-file "lily.ps")
328 (regexp-substitute/global #f "\n" (ly-gulp-file "lily.ps") 'pre " %\n" 'post)
330 "\\input lilyponddefs \\turnOnPostScript"))
332 (define (header creator generate)
334 "%created by: " creator generate "\n"))
336 (define (invoke-char s i)
338 "\n\\" s "{" (inexact->string i 10) "}" ))
340 (define (invoke-dim1 s d)
342 "\n\\" s "{" (number->dim d) "}"))
347 ;; need to do something to make this really safe.
349 (define (output-tex-string s)
350 (if security-paranoia
351 (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post)
354 (define (lily-def key val)
358 (regexp-substitute/global #f "_" (output-tex-string key) 'pre "X" 'post)
359 ;(output-tex-string key)
360 "{" (output-tex-string val) "}\n"))
362 (define (number->dim x)
364 (number->string (chop-decimal x)) " pt "))
366 (define (placebox x y s)
369 (number->dim y) "}{" (number->dim x) "}{" s "}\n"))
371 (define (bezier-sandwich l thick)
372 (embedded-ps ((ps-scm 'bezier-sandwich) l thick)))
374 (define (start-line ht)
375 (string-append"\\vbox to " (number->dim ht) "{\\hbox{%\n"))
378 "}\\vss}\\interscoreline")
379 (define (stop-last-line)
381 (define (filledbox breapth width depth height)
383 "\\kern" (number->dim (- breapth))
384 "\\vrule width " (number->dim (+ breapth width))
385 "depth " (number->dim depth)
386 "height " (number->dim height) " "))
389 (string-append "\\hbox{" (output-tex-string s) "}"))
391 (define (tuplet ht gapx dx dy thick dir)
392 (embedded-ps ((ps-scm 'tuplet) ht gapx dx dy thick dir)))
394 (define (volta h w thick vert_start vert_end)
395 (embedded-ps ((ps-scm 'volta) h w thick vert_start vert_end)))
398 ;; The procedures listed below form the public interface of TeX-scm.
399 ;; (should merge the 2 lists)
400 (cond ((eq? action-name 'all-definitions)
402 (define font-load-command ,font-load-command)
404 (define bezier-sandwich ,bezier-sandwich)
405 (define bracket ,bracket)
407 (define crescendo ,crescendo)
408 (define dashed-slur ,dashed-slur)
409 (define decrescendo ,decrescendo)
410 (define end-output ,end-output)
411 (define experimental-on ,experimental-on)
412 (define filledbox ,filledbox)
413 (define font-def ,font-def)
414 (define font-switch ,font-switch)
415 (define header-end ,header-end)
416 (define lily-def ,lily-def)
417 (define header ,header)
418 (define invoke-char ,invoke-char)
419 (define invoke-dim1 ,invoke-dim1)
420 (define placebox ,placebox)
421 (define select-font ,select-font)
422 (define start-line ,start-line)
423 (define stop-line ,stop-line)
424 (define stop-last-line ,stop-last-line)
426 (define tuplet ,tuplet)
427 (define volta ,volta)
430 ((eq? action-name 'beam) beam)
431 ((eq? action-name 'tuplet) tuplet)
432 ((eq? action-name 'bracket) bracket)
433 ((eq? action-name 'crescendo) crescendo)
434 ((eq? action-name 'dashed-slur) dashed-slur)
435 ((eq? action-name 'decrescendo) decrescendo)
436 ((eq? action-name 'end-output) end-output)
437 ((eq? action-name 'experimental-on) experimental-on)
438 ((eq? action-name 'font-def) font-def)
439 ((eq? action-name 'font-switch) font-switch)
440 ((eq? action-name 'header-end) header-end)
441 ((eq? action-name 'lily-def) lily-def)
442 ((eq? action-name 'header) header)
443 ((eq? action-name 'invoke-char) invoke-char)
444 ((eq? action-name 'invoke-dim1) invoke-dim1)
445 ((eq? action-name 'placebox) placebox)
446 ((eq? action-name 'bezier-sandwich) bezier-sandwich)
447 ((eq? action-name 'start-line) start-line)
448 ((eq? action-name 'stem) stem)
449 ((eq? action-name 'stop-line) stop-line)
450 ((eq? action-name 'stop-last-line) stop-last-line)
451 ((eq? action-name 'volta) volta)
452 (else (error "unknown tag -- PS-TEX " action-name))
458 (define (ps-scm action-name)
461 ;; alist containing fontname -> fontcommand assoc (both strings)
462 (define font-alist '())
463 (define font-count 0)
464 (define current-font "")
467 (define (cached-fontname i)
470 (make-string 1 (integer->char (+ 65 i)))))
472 (define (mag-to-size m)
473 (number->string (case m
476 (2 14) ; really: 14.400
477 (3 17) ; really: 17.280
478 (4 21) ; really: 20.736
479 (5 24) ; really: 24.888
480 (6 30) ; really: 29.856
484 (define (select-font font-name-symbol)
487 (c (assoc font-name-symbol font-name-alist))
492 (ly-warn (string-append
493 "Programming error: No such font known " (car font-name-symbol)))
494 "") ; issue no command
495 (string-append " " (cdr c) " "))
500 (define (font-load-command name-mag command)
504 (symbol->string (car name-mag))
506 (number->string (magstep (cdr name-mag)))
507 " 1000 div 12 mul scalefont setfont } bind def "
511 (define (beam width slope thick)
513 (numbers->string (list width slope thick)) " draw_beam" ))
516 (string-append "% " s))
518 (define (bracket arch_angle arch_width arch_height width height arch_thick thick)
520 (numbers->string (list arch_angle arch_width arch_height width height arch_thick thick)) " draw_bracket" ))
523 (invoke-char " show" i))
525 (define (crescendo thick w h cont )
527 (numbers->string (list w h (inexact->exact cont) thick))
530 ;; what the heck is this interface ?
531 (define (dashed-slur thick dash l)
533 (apply string-append (map control->string l))
534 (number->string thick)
536 (number->string dash)
538 (number->string (* 10 thick)) ;UGH. 10 ?
539 " ] 0 draw_dashed_slur"))
541 (define (decrescendo thick w h cont)
543 (numbers->string (list w h (inexact->exact cont) thick))
544 " draw_decrescendo"))
550 (define (experimental-on) "")
552 (define (filledbox breapth width depth height)
553 (string-append (numbers->string (list breapth width depth height))
557 (define (font-def i s)
560 (substring s 0 (- (string-length s) 4))
561 " findfont 12 scalefont setfont} bind def \n"))
563 (define (font-switch i)
564 (string-append (font i) " "))
568 (ly-gulp-file "lilyponddefs.ps")
569 " {exch pop //systemdict /run get exec} "
570 (ly-gulp-file "lily.ps")
571 "{ exch pop //systemdict /run get exec } "
574 (define (lily-def key val)
576 (if (string=? (substring key 0 (min (string-length "mudelapaper") (string-length key))) "mudelapaper")
577 (string-append "/" key " {" val "} bind def\n")
578 (string-append "/" key " (" val ") def\n")
582 (define (header creator generate)
585 "%%Creator: " creator generate "\n"))
587 (define (invoke-char s i)
589 "(\\" (inexact->string i 8) ") " s " " ))
591 (define (invoke-dim1 s d)
593 (number->string (* d (/ 72.27 72))) " " s ))
595 (define (placebox x y s)
597 (number->string x) " " (number->string y) " {" s "} placebox "))
599 (define (bezier-sandwich l thick)
601 (apply string-append (map control->string l))
602 (number->string thick)
603 " draw_bezier_sandwich"))
605 (define (start-line height)
608 (define (stem breapth width depth height)
609 (string-append (numbers->string (list breapth width depth height))
616 (string-append "(" s ") show "))
619 (define (volta h w thick vert_start vert_end)
621 (numbers->string (list h w thick (inexact->exact vert_start) (inexact->exact vert_end)))
624 (define (tuplet ht gap dx dy thick dir)
626 (numbers->string (list ht gap dx dy thick (inexact->exact dir)))
635 (cond ((eq? action-name 'all-definitions)
638 (define tuplet ,tuplet)
639 (define bracket ,bracket)
641 (define crescendo ,crescendo)
642 (define volta ,volta)
643 (define bezier-sandwich ,bezier-sandwich)
644 (define dashed-slur ,dashed-slur)
645 (define decrescendo ,decrescendo)
646 (define end-output ,end-output)
647 (define experimental-on ,experimental-on)
648 (define filledbox ,filledbox)
649 (define font-def ,font-def)
650 (define font-switch ,font-switch)
651 (define header-end ,header-end)
652 (define lily-def ,lily-def)
653 (define font-load-command ,font-load-command)
654 (define header ,header)
655 (define invoke-char ,invoke-char)
656 (define invoke-dim1 ,invoke-dim1)
657 (define placebox ,placebox)
658 (define select-font ,select-font)
659 (define start-line ,start-line)
661 (define stop-line ,stop-line)
662 (define stop-last-line ,stop-line)
665 ((eq? action-name 'tuplet) tuplet)
666 ((eq? action-name 'beam) beam)
667 ((eq? action-name 'bezier-sandwich) bezier-sandwich)
668 ((eq? action-name 'bracket) bracket)
669 ((eq? action-name 'char) char)
670 ((eq? action-name 'crescendo) crescendo)
671 ((eq? action-name 'dashed-slur) dashed-slur)
672 ((eq? action-name 'decrescendo) decrescendo)
673 ((eq? action-name 'experimental-on) experimental-on)
674 ((eq? action-name 'filledbox) filledbox)
675 ((eq? action-name 'select-font) select-font)
676 ((eq? action-name 'volta) volta)
677 (else (error "unknown tag -- PS-SCM " action-name))
682 (define (arg->string arg)
683 (cond ((number? arg) (inexact->string arg 10))
684 ((string? arg) (string-append "\"" arg "\""))
685 ((symbol? arg) (string-append "\"" (symbol->string arg) "\""))))
687 (define (func name . args)
693 (map (lambda (x) (string-append " " (arg->string x))) args)))
699 (inexact->exact (/ x (abs x)))))
702 (define (as-scm action-name)
704 (define (beam width slope thick)
706 (func "set-line-char" "#")
707 (func "rline-to" width (* width slope))
711 (define (bezier-sandwich l thick)
718 (dy (- (cdr c3) (cdr c0)))
720 (c1-dx (- (car c1) x))
721 (c1-line-y (+ (cdr c0) (* c1-dx rc)))
722 (dir (if (< c1-line-y (cdr c1)) 1 -1))
723 (y (+ -1 (* dir (max (* dir (cdr c0)) (* dir (cdr c3)))))))
725 (func "rmove-to" x y)
726 (func "put" (if (< 0 dir) "/" "\\\\"))
727 (func "rmove-to" 1 (if (< 0 dir) 1 0))
728 (func "set-line-char" "_")
729 (func "h-line" (- dx 1))
730 (func "rmove-to" (- dx 1) (if (< 0 dir) -1 0))
731 (func "put" (if (< 0 dir) "\\\\" "/"))))))
733 (define (bracket arch_angle arch_width arch_height width height arch_thick thick)
735 (func "rmove-to" (+ width 1) (- (/ height -2) 1))
737 (func "set-line-char" "|")
738 (func "rmove-to" 0 1)
739 (func "v-line" (+ height 1))
740 (func "rmove-to" 0 (+ height 1))
750 (define (experimental-on)
753 (define (filledbox breapth width depth height)
754 (let ((dx (+ width breapth))
755 (dy (+ depth height)))
757 (func "rmove-to" (* -1 breapth) (* -1 depth))
760 (func "set-line-char"
761 (if (<= dx 1) "|" "#"))
764 (func "set-line-char"
765 (if (<= dy 1) "-" "="))
766 (func "h-line" dx))))))
768 (define (font-load-command name-mag command)
769 (func "load-font" (car name-mag) (magstep (cdr name-mag))))
771 (define (header creator generate)
772 (func "header" creator generate))
777 ;; urg: this is good for half of as2text's execution time
778 (define (xlily-def key val)
779 (string-append "(define " key " " (arg->string val) ")\n"))
781 (define (lily-def key val)
783 (or (equal? key "mudelapaperlinewidth")
784 (equal? key "mudelapaperstaffheight"))
785 (string-append "(define " key " " (arg->string val) ")\n")
788 (define (placebox x y s)
789 (let ((ey (inexact->exact y)))
790 (string-append "(move-to " (number->string (inexact->exact x)) " "
791 (if (= 0.5 (- (abs y) (abs ey)))
796 (define (select-font font-name-symbol)
797 (let* ((c (assoc font-name-symbol font-name-alist)))
802 "Programming error: No such font known "
803 (car font-name-symbol)))
804 "") ; issue no command
805 (func "select-font" (car font-name-symbol)))))
807 (define (start-line height)
808 (func "start-line" height))
816 (define (volta h w thick vert-start vert-end)
819 (func "set-line-char" "|")
820 (func "rmove-to" 0 -4)
821 ;; definition strange-way around
825 (func "rmove-to" 1 h)
826 (func "set-line-char" "_")
827 (func "h-line" (- w 1))
828 (func "set-line-char" "|")
831 (func "rmove-to" (- w 1) (* -1 h))
832 (func "v-line" (* -1 h)))
835 (cond ((eq? action-name 'all-definitions)
838 (define bracket ,bracket)
840 ;;(define crescendo ,crescendo)
841 (define bezier-sandwich ,bezier-sandwich)
842 ;;(define dashed-slur ,dashed-slur)
843 ;;(define decrescendo ,decrescendo)
844 (define end-output ,end-output)
845 (define experimental-on ,experimental-on)
846 (define filledbox ,filledbox)
847 ;;(define font-def ,font-def)
848 (define font-load-command ,font-load-command)
849 ;;(define font-switch ,font-switch)
850 (define header ,header)
851 (define header-end ,header-end)
852 (define lily-def ,lily-def)
853 ;;(define invoke-char ,invoke-char)
854 ;;(define invoke-dim1 ,invoke-dim1)
855 (define placebox ,placebox)
856 (define select-font ,select-font)
857 (define start-line ,start-line)
858 ;;(define stem ,stem)
859 (define stop-line ,stop-line)
860 (define stop-last-line ,stop-line)
862 ;;(define tuplet ,tuplet)
863 (define volta ,volta)
865 ;;((eq? action-name 'tuplet) tuplet)
866 ;;((eq? action-name 'beam) beam)
867 ;;((eq? action-name 'bezier-sandwich) bezier-sandwich)
868 ;;((eq? action-name 'bracket) bracket)
869 ((eq? action-name 'char) char)
870 ;;((eq? action-name 'crescendo) crescendo)
871 ;;((eq? action-name 'dashed-slur) dashed-slur)
872 ;;((eq? action-name 'decrescendo) decrescendo)
873 ;;((eq? action-name 'experimental-on) experimental-on)
874 ((eq? action-name 'filledbox) filledbox)
875 ((eq? action-name 'select-font) select-font)
876 ;;((eq? action-name 'volta) volta)
877 (else (error "unknown tag -- MUSA-SCM " action-name))
882 (define (gulp-file name)
883 (let* ((port (open-file name "r"))
884 (content (let loop ((text ""))
885 (let ((line (read-line port)))
886 (if (or (eof-object? line)
889 (loop (string-append text line "\n")))))))
893 (define (scm-gulp-file name)
896 (getenv 'LILYPONDPREFIX) "/ps") %load-path))
897 (let ((path (%search-load-path name)))
902 (define (scm-tex-output)
903 (eval (tex-scm 'all-definitions)))
905 (define (scm-ps-output)
906 (eval (ps-scm 'all-definitions)))
908 (define (scm-as-output)
909 (eval (as-scm 'all-definitions)))
911 ; Russ McManus, <mcmanus@IDT.NET>
913 ; I use the following, which should definitely be provided somewhere
914 ; in guile, but isn't, AFAIK:
918 (define (hash-table-for-each fn ht)
920 ((= i (vector-length ht)))
921 (do ((alist (vector-ref ht i) (cdr alist)))
923 (fn (car (car alist)) (cdr (car alist))))))
925 (define (hash-table-map fn ht)
928 ((= i (vector-length ht)) (reverse ret-ls))
929 (do ((alist (vector-ref ht i) (cdr alist)))
931 (set! ret-ls (cons (fn (car (car alist)) (cdr (car alist))) ret-ls)))))
935 (define (index-cell cell dir)
941 ; How should a bar line behave at a break?
943 (define (break-barline glyph dir)
944 (let ((result (assoc glyph
945 '((":|:" . (":|" . "|:"))
948 ("|:" . ("|" . "|:"))
949 ("|." . ("|." . nil))
950 (":|" . (":|" . nil))
951 ("||" . ("||" . nil))
952 (".|." . (".|." . nil))
953 ("scorebar" . (nil . "scorepostbreak"))
954 ("brace" . (nil . "brace"))
955 ("bracket" . (nil . "bracket"))
959 (if (equal? result #f)
960 (ly-warn (string-append "Unknown bar glyph: `" glyph "'"))
961 (index-cell (cdr result) dir))
966 (define (slur-ugly ind ht)
971 (> ht (+ (* 2 ind) -4))
972 (< ht (+ (* -2 ind) 8)))