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>
9 ; This file contains various routines in Scheme that are easier to
10 ; do here than in C++. At present it is an unorganised mess. Sorry.
14 ;(debug-enable 'backtrace)
18 (use-modules (ice-9 regex))
20 ;; The regex module may not be available, or may be broken.
21 ;; If you have trouble with regex, define #f
22 ;;(define use-regex #t)
23 ;;(define use-regex #f)
26 (let ((os (string-downcase (vector-ref (uname) 0))))
27 (not (equal? "cygwin" (substring os 0 (min 6 (string-length os)))))))
29 ;; do nothing in .scm output
30 (define (comment s) "")
36 (define (cons-map f x)
37 (cons (f (car x)) (f (cdr x))))
39 (define (reduce operator list)
40 (if (null? (cdr list)) (car list)
41 (operator (car list) (reduce operator (cdr list)))
46 (define (numbers->string l)
47 (apply string-append (map ly-number->string l)))
49 ; (define (chop-decimal x) (if (< (abs x) 0.001) 0.0 x))
51 (define (number->octal-string x)
52 (let* ((n (inexact->exact x))
54 (n8 (quotient (- n (* n64 64)) 8)))
58 (number->string (remainder (- n (+ (* n64 64) (* n8 8))) 8)))))
60 (define (inexact->string x radix)
61 (let ((n (inexact->exact x)))
62 (number->string n radix)))
65 (define (control->string c)
66 (string-append (number->string (car c)) " "
67 (number->string (cdr c)) " "))
73 (make-string 1 (integer->char (+ (char->integer #\A) i)))
78 (define (scm-scm action-name)
81 (define security-paranoia #f)
84 ;; See documentation of Item::visibility_lambda_
85 (define (begin-of-line-visible d) (if (= d 1) '(#f . #f) '(#t . #t)))
86 (define (spanbar-begin-of-line-invisible d) (if (= d -1) '(#t . #t) '(#f . #f)))
87 (define (all-visible d) '(#f . #f))
88 (define (all-invisible d) '(#t . #t))
89 (define (begin-of-line-invisible d) (if (= d 1) '(#t . #t) '(#f . #f)))
90 (define (end-of-line-invisible d) (if (= d -1) '(#t . #t) '(#f . #f)))
93 (define mark-visibility end-of-line-invisible)
95 ;; Spacing constants for prefatory matter.
97 ;; rules for this spacing are much more complicated than this. See [Wanske] page 126 -- 134, [Ross] pg 143 -- 147
101 ;; (Measured in staff space)
104 ((none Instrument_name) . (extra-space 1.0))
105 ((Instrument_name Left_edge_item) . (extra-space 1.0))
106 ((Left_edge_item Clef_item) . (extra-space 1.0))
107 ((Left_edge_item Key_item) . (extra-space 0.0))
108 ((Left_edge_item begin-of-note) . (extra-space 1.0))
109 ((none Left_edge_item) . (extra-space 0.0))
110 ((Left_edge_item Staff_bar) . (extra-space 0.0))
111 ; ((none Left_edge_item) . (extra-space -15.0))
112 ; ((none Left_edge_item) . (extra-space -15.0))
113 ((none Clef_item) . (minimum-space 1.0))
114 ((none Staff_bar) . (minimum-space 0.0))
115 ((none Clef_item) . (minimum-space 1.0))
116 ((none Key_item) . (minimum-space 0.5))
117 ((none Time_signature) . (extra-space 0.0))
118 ((none begin-of-note) . (minimum-space 1.5))
119 ((Clef_item Key_item) . (minimum-space 4.0))
120 ((Key_item Time_signature) . (extra-space 1.0))
121 ((Clef_item Time_signature) . (minimum-space 3.5))
122 ((Staff_bar Clef_item) . (minimum-space 1.0))
123 ((Clef_item Staff_bar) . (minimum-space 3.7))
124 ((Time_signature Staff_bar) . (minimum-space 2.0))
125 ((Key_item Staff_bar) . (extra-space 1.0))
126 ((Staff_bar Time_signature) . (minimum-space 1.5)) ;double check this.
127 ((Time_signature begin-of-note) . (extra-space 2.0)) ;double check this.
128 ((Key_item begin-of-note) . (extra-space 2.5))
129 ((Staff_bar begin-of-note) . (extra-space 1.0))
130 ((Clef_item begin-of-note) . (minimum-space 5.0))
131 ((none Breathing_sign) . (minimum-space 0.0))
132 ((Breathing_sign Key_item) . (minimum-space 1.5))
133 ((Breathing_sign begin-of-note) . (minimum-space 1.0))
134 ((Breathing_sign Staff_bar) . (minimum-space 1.5))
135 ((Breathing_sign Clef_item) . (minimum-space 2.0))
139 (define (find-notehead-symbol duration style)
142 ((harmonic) "0mensural")
144 (string-append (number->string duration)
145 (if (< duration 0) "mensural" "")))
146 ((default) (number->string duration))
148 (string-append (number->string duration) (symbol->string style)))))
153 ;; this is silly, can't we use something like
154 ;; roman-0, roman-1 roman+1 ?
157 ("brace" . "feta-braces")
158 ("default" . "cmr10")
159 ("dynamic" . "feta-din")
163 ("typewriter" . "cmtt")
170 ("mark" . "feta-nummer")
171 ("finger" . "feta-nummer")
172 ("timesig" . "feta-nummer")
173 ("number" . "feta-nummer")
174 ("volta" . "feta-nummer"))
177 (define (string-encode-integer i)
180 ((< i 0) (string-append "n" (string-encode-integer (- i))))
182 (make-string 1 (integer->char (+ 65 (modulo i 26))))
183 (string-encode-integer (quotient i 26))
190 (cdr (assoc i '((-4 . 482)
203 (define script-alist '())
205 (define font-name-alist '())
206 (define (font-command name-mag)
208 (string-append "magfont"
209 (string-encode-integer (hashq (car name-mag) 1000000))
211 (string-encode-integer (cdr name-mag)))
215 (define (define-fonts names)
216 (set! font-name-alist (map font-command names))
219 (font-load-command (car x) (cdr x))) font-name-alist)
222 (define (fontify name exp)
223 (string-append (select-font name)
230 ; Make a function that checks score element for being of a specific type.
231 (define (make-type-checker name)
233 (not (not (memq name (ly-get-elt-property elt 'interfaces))))))
236 ;;;;;;;;;;;;;;;;;;; TeX output
237 (define (tex-scm action-name)
242 (define (select-font font-name-symbol)
245 (c (assoc font-name-symbol font-name-alist))
250 (ly-warn (string-append
251 "Programming error: No such font known " (car font-name-symbol)))
252 "") ; issue no command
253 (string-append "\\" (cdr c)))
258 (define (beam width slope thick)
259 (embedded-ps ((ps-scm 'beam) width slope thick)))
261 (define (bracket arch_angle arch_width arch_height width height arch_thick thick)
262 (embedded-ps ((ps-scm 'bracket) arch_angle arch_width arch_height width height arch_thick thick)))
264 (define (dashed-slur thick dash l)
265 (embedded-ps ((ps-scm 'dashed-slur) thick dash l)))
267 (define (crescendo thick w h cont)
268 (embedded-ps ((ps-scm 'crescendo) thick w h cont)))
271 (string-append "\\char" (inexact->string i 10) " "))
273 (define (dashed-line thick dash w)
274 (embedded-ps ((ps-scm 'dashed-line) thick dash w)))
276 (define (decrescendo thick w h cont)
277 (embedded-ps ((ps-scm 'decrescendo) thick w h cont)))
279 (define (font-load-command name-mag command)
281 "\\font\\" command "="
282 (symbol->string (car name-mag))
284 (number->string (magstep (cdr name-mag)))
287 (define (embedded-ps s)
288 (string-append "\\embeddedps{" s "}"))
291 (string-append "% " s))
296 (string-append "\n\\EndLilyPondOutput"
300 (define (experimental-on)
303 (define (font-switch i)
307 (define (font-def i s)
309 "\\font" (font-switch i) "=" s "\n"))
315 ;; URG: ly-gulp-file: now we can't use scm output without Lily
317 ;; fixed in 1.3.4 for powerpc -- broken on Windows
318 (regexp-substitute/global #f "\n"
319 (ly-gulp-file "lily.ps") 'pre " %\n" 'post)
320 (ly-gulp-file "lily.ps"))
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
344 (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post)
345 (begin (display "warning: not paranoid") (newline) s))
348 (define (lily-def key val)
352 ;; fixed in 1.3.4 for powerpc -- broken on Windows
353 (regexp-substitute/global #f "_"
354 (output-tex-string key) 'pre "X" 'post)
355 (output-tex-string key))
356 "{" (output-tex-string val) "}\n"))
358 (define (number->dim x)
360 (ly-number->string x) " pt "))
362 (define (placebox x y s)
365 (number->dim y) "}{" (number->dim x) "}{" s "}\n"))
367 (define (bezier-sandwich l thick)
368 (embedded-ps ((ps-scm 'bezier-sandwich) l thick)))
370 (define (start-line ht)
371 (string-append"\\vbox to " (number->dim ht) "{\\hbox{%\n"))
374 "}\\vss}\\interscoreline")
375 (define (stop-last-line)
377 (define (filledbox breapth width depth height)
379 "\\kern" (number->dim (- breapth))
380 "\\vrule width " (number->dim (+ breapth width))
381 "depth " (number->dim depth)
382 "height " (number->dim height) " "))
385 (string-append "\\hbox{" (output-tex-string s) "}"))
387 (define (tuplet ht gapx dx dy thick dir)
388 (embedded-ps ((ps-scm 'tuplet) ht gapx dx dy thick dir)))
390 (define (volta h w thick vert_start vert_end)
391 (embedded-ps ((ps-scm 'volta) h w thick vert_start vert_end)))
394 ;; The procedures listed below form the public interface of TeX-scm.
395 ;; (should merge the 2 lists)
396 (cond ((eq? action-name 'all-definitions)
398 (define font-load-command ,font-load-command)
400 (define bezier-sandwich ,bezier-sandwich)
401 (define bracket ,bracket)
403 (define crescendo ,crescendo)
404 (define dashed-line ,dashed-line)
405 (define dashed-slur ,dashed-slur)
406 (define decrescendo ,decrescendo)
407 (define end-output ,end-output)
408 (define experimental-on ,experimental-on)
409 (define filledbox ,filledbox)
410 (define font-def ,font-def)
411 (define font-switch ,font-switch)
412 (define header-end ,header-end)
413 (define lily-def ,lily-def)
414 (define header ,header)
415 (define invoke-char ,invoke-char)
416 (define invoke-dim1 ,invoke-dim1)
417 (define placebox ,placebox)
418 (define select-font ,select-font)
419 (define start-line ,start-line)
420 (define stop-line ,stop-line)
421 (define stop-last-line ,stop-last-line)
423 (define tuplet ,tuplet)
424 (define volta ,volta)
427 ((eq? action-name 'beam) beam)
428 ((eq? action-name 'tuplet) tuplet)
429 ((eq? action-name 'bracket) bracket)
430 ((eq? action-name 'crescendo) crescendo)
431 ((eq? action-name 'dashed-line) dashed-line)
432 ((eq? action-name 'dashed-slur) dashed-slur)
433 ((eq? action-name 'decrescendo) decrescendo)
434 ((eq? action-name 'end-output) end-output)
435 ((eq? action-name 'experimental-on) experimental-on)
436 ((eq? action-name 'font-def) font-def)
437 ((eq? action-name 'font-switch) font-switch)
438 ((eq? action-name 'header-end) header-end)
439 ((eq? action-name 'lily-def) lily-def)
440 ((eq? action-name 'header) header)
441 ((eq? action-name 'invoke-char) invoke-char)
442 ((eq? action-name 'invoke-dim1) invoke-dim1)
443 ((eq? action-name 'placebox) placebox)
444 ((eq? action-name 'bezier-sandwich) bezier-sandwich)
445 ((eq? action-name 'start-line) start-line)
446 ((eq? action-name 'stem) stem)
447 ((eq? action-name 'stop-line) stop-line)
448 ((eq? action-name 'stop-last-line) stop-last-line)
449 ((eq? action-name 'volta) volta)
450 (else (error "unknown tag -- PS-TEX " action-name))
456 (define (ps-scm action-name)
458 ;; alist containing fontname -> fontcommand assoc (both strings)
459 (define font-alist '())
460 (define font-count 0)
461 (define current-font "")
464 (define (cached-fontname i)
467 (make-string 1 (integer->char (+ 65 i)))))
469 (define (mag-to-size m)
470 (number->string (case m
473 (2 14) ; really: 14.400
474 (3 17) ; really: 17.280
475 (4 21) ; really: 20.736
476 (5 24) ; really: 24.888
477 (6 30) ; really: 29.856
481 (define (select-font font-name-symbol)
484 (c (assoc font-name-symbol font-name-alist))
489 (ly-warn (string-append
490 "Programming error: No such font known " (car font-name-symbol)))
491 "") ; issue no command
492 (string-append " " (cdr c) " "))
497 (define (font-load-command name-mag command)
501 (symbol->string (car name-mag))
503 (number->string (magstep (cdr name-mag)))
504 " 1000 div 12 mul scalefont setfont } bind def "
508 (define (beam width slope thick)
510 (numbers->string (list width slope thick)) " draw_beam" ))
513 (string-append "% " s))
515 (define (bracket arch_angle arch_width arch_height width height arch_thick thick)
517 (numbers->string (list arch_angle arch_width arch_height width height arch_thick thick)) " draw_bracket" ))
520 (invoke-char " show" i))
522 (define (crescendo thick w h cont )
524 (numbers->string (list w h (inexact->exact cont) thick))
527 ;; what the heck is this interface ?
528 (define (dashed-slur thick dash l)
530 (apply string-append (map control->string l))
531 (number->string thick)
533 (number->string dash)
535 (number->string (* 10 thick)) ;UGH. 10 ?
536 " ] 0 draw_dashed_slur"))
538 (define (dashed-line thick dash width)
540 (number->string width)
542 (number->string thick)
544 (number->string dash)
546 (number->string dash)
547 " ] 0 draw_dashed_line"))
549 (define (decrescendo thick w h cont)
551 (numbers->string (list w h (inexact->exact cont) thick))
552 " draw_decrescendo"))
558 (define (experimental-on) "")
560 (define (filledbox breapth width depth height)
561 (string-append (numbers->string (list breapth width depth height))
565 (define (font-def i s)
568 (substring s 0 (- (string-length s) 4))
569 " findfont 12 scalefont setfont} bind def \n"))
571 (define (font-switch i)
572 (string-append (font i) " "))
576 ;; URG: now we can't use scm output without Lily
577 (ly-gulp-file "lilyponddefs.ps")
578 " {exch pop //systemdict /run get exec} "
579 (ly-gulp-file "lily.ps")
580 "{ exch pop //systemdict /run get exec } "
583 (define (lily-def key val)
585 (if (string=? (substring key 0 (min (string-length "mudelapaper") (string-length key))) "mudelapaper")
586 (string-append "/" key " {" val "} bind def\n")
587 (string-append "/" key " (" val ") def\n")
591 (define (header creator generate)
594 "%%Creator: " creator generate "\n"))
596 (define (invoke-char s i)
598 "(\\" (inexact->string i 8) ") " s " " ))
600 (define (invoke-dim1 s d)
602 (number->string (* d (/ 72.27 72))) " " s ))
604 (define (placebox x y s)
606 (number->string x) " " (number->string y) " {" s "} placebox "))
608 (define (bezier-sandwich l thick)
610 (apply string-append (map control->string l))
611 (number->string thick)
612 " draw_bezier_sandwich"))
614 (define (start-line height)
617 (define (stem breapth width depth height)
618 (string-append (numbers->string (list breapth width depth height))
625 (string-append "(" s ") show "))
628 (define (volta h w thick vert_start vert_end)
630 (numbers->string (list h w thick (inexact->exact vert_start) (inexact->exact vert_end)))
633 (define (tuplet ht gap dx dy thick dir)
635 (numbers->string (list ht gap dx dy thick (inexact->exact dir)))
644 (cond ((eq? action-name 'all-definitions)
647 (define tuplet ,tuplet)
648 (define bracket ,bracket)
650 (define crescendo ,crescendo)
651 (define volta ,volta)
652 (define bezier-sandwich ,bezier-sandwich)
653 (define dashed-line ,dashed-line)
654 (define dashed-slur ,dashed-slur)
655 (define decrescendo ,decrescendo)
656 (define end-output ,end-output)
657 (define experimental-on ,experimental-on)
658 (define filledbox ,filledbox)
659 (define font-def ,font-def)
660 (define font-switch ,font-switch)
661 (define header-end ,header-end)
662 (define lily-def ,lily-def)
663 (define font-load-command ,font-load-command)
664 (define header ,header)
665 (define invoke-char ,invoke-char)
666 (define invoke-dim1 ,invoke-dim1)
667 (define placebox ,placebox)
668 (define select-font ,select-font)
669 (define start-line ,start-line)
671 (define stop-line ,stop-line)
672 (define stop-last-line ,stop-line)
675 ((eq? action-name 'tuplet) tuplet)
676 ((eq? action-name 'beam) beam)
677 ((eq? action-name 'bezier-sandwich) bezier-sandwich)
678 ((eq? action-name 'bracket) bracket)
679 ((eq? action-name 'char) char)
680 ((eq? action-name 'crescendo) crescendo)
681 ((eq? action-name 'dashed-line) dashed-line)
682 ((eq? action-name 'dashed-slur) dashed-slur)
683 ((eq? action-name 'decrescendo) decrescendo)
684 ((eq? action-name 'experimental-on) experimental-on)
685 ((eq? action-name 'filledbox) filledbox)
686 ((eq? action-name 'select-font) select-font)
687 ((eq? action-name 'volta) volta)
688 (else (error "unknown tag -- PS-SCM " action-name))
693 (define (arg->string arg)
694 (cond ((number? arg) (inexact->string arg 10))
695 ((string? arg) (string-append "\"" arg "\""))
696 ((symbol? arg) (string-append "\"" (symbol->string arg) "\""))))
698 (define (func name . args)
704 (map (lambda (x) (string-append " " (arg->string x))) args)))
710 (inexact->exact (/ x (abs x)))))
713 (define (as-scm action-name)
715 (define (beam width slope thick)
717 (func "set-line-char" "#")
718 (func "rline-to" width (* width slope))
722 (define (bezier-sandwich l thick)
729 (dy (- (cdr c3) (cdr c0)))
731 (c1-dx (- (car c1) x))
732 (c1-line-y (+ (cdr c0) (* c1-dx rc)))
733 (dir (if (< c1-line-y (cdr c1)) 1 -1))
734 (y (+ -1 (* dir (max (* dir (cdr c0)) (* dir (cdr c3)))))))
736 (func "rmove-to" x y)
737 (func "put" (if (< 0 dir) "/" "\\\\"))
738 (func "rmove-to" 1 (if (< 0 dir) 1 0))
739 (func "set-line-char" "_")
740 (func "h-line" (- dx 1))
741 (func "rmove-to" (- dx 1) (if (< 0 dir) -1 0))
742 (func "put" (if (< 0 dir) "\\\\" "/"))))))
744 (define (bracket arch_angle arch_width arch_height width height arch_thick thick)
746 (func "rmove-to" (+ width 1) (- (/ height -2) 1))
748 (func "set-line-char" "|")
749 (func "rmove-to" 0 1)
750 (func "v-line" (+ height 1))
751 (func "rmove-to" 0 (+ height 1))
761 (define (experimental-on)
764 (define (filledbox breapth width depth height)
765 (let ((dx (+ width breapth))
766 (dy (+ depth height)))
768 (func "rmove-to" (* -1 breapth) (* -1 depth))
771 (func "set-line-char"
772 (if (<= dx 1) "|" "#"))
775 (func "set-line-char"
776 (if (<= dy 1) "-" "="))
777 (func "h-line" dx))))))
779 (define (font-load-command name-mag command)
780 (func "load-font" (car name-mag) (magstep (cdr name-mag))))
782 (define (header creator generate)
783 (func "header" creator generate))
788 ;; urg: this is good for half of as2text's execution time
789 (define (xlily-def key val)
790 (string-append "(define " key " " (arg->string val) ")\n"))
792 (define (lily-def key val)
794 (or (equal? key "mudelapaperlinewidth")
795 (equal? key "mudelapaperstaffheight"))
796 (string-append "(define " key " " (arg->string val) ")\n")
799 (define (placebox x y s)
800 (let ((ey (inexact->exact y)))
801 (string-append "(move-to " (number->string (inexact->exact x)) " "
802 (if (= 0.5 (- (abs y) (abs ey)))
807 (define (select-font font-name-symbol)
808 (let* ((c (assoc font-name-symbol font-name-alist)))
813 "Programming error: No such font known "
814 (car font-name-symbol)))
815 "") ; issue no command
816 (func "select-font" (car font-name-symbol)))))
818 (define (start-line height)
819 (func "start-line" height))
827 (define (volta h w thick vert-start vert-end)
830 (func "set-line-char" "|")
831 (func "rmove-to" 0 -4)
832 ;; definition strange-way around
836 (func "rmove-to" 1 h)
837 (func "set-line-char" "_")
838 (func "h-line" (- w 1))
839 (func "set-line-char" "|")
842 (func "rmove-to" (- w 1) (* -1 h))
843 (func "v-line" (* -1 h)))
846 (cond ((eq? action-name 'all-definitions)
849 (define bracket ,bracket)
851 ;;(define crescendo ,crescendo)
852 (define bezier-sandwich ,bezier-sandwich)
853 ;;(define dashed-slur ,dashed-slur)
854 ;;(define decrescendo ,decrescendo)
855 (define end-output ,end-output)
856 (define experimental-on ,experimental-on)
857 (define filledbox ,filledbox)
858 ;;(define font-def ,font-def)
859 (define font-load-command ,font-load-command)
860 ;;(define font-switch ,font-switch)
861 (define header ,header)
862 (define header-end ,header-end)
863 (define lily-def ,lily-def)
864 ;;(define invoke-char ,invoke-char)
865 ;;(define invoke-dim1 ,invoke-dim1)
866 (define placebox ,placebox)
867 (define select-font ,select-font)
868 (define start-line ,start-line)
869 ;;(define stem ,stem)
870 (define stop-line ,stop-line)
871 (define stop-last-line ,stop-line)
873 ;;(define tuplet ,tuplet)
874 (define volta ,volta)
876 ;;((eq? action-name 'tuplet) tuplet)
877 ;;((eq? action-name 'beam) beam)
878 ;;((eq? action-name 'bezier-sandwich) bezier-sandwich)
879 ;;((eq? action-name 'bracket) bracket)
880 ((eq? action-name 'char) char)
881 ;;((eq? action-name 'crescendo) crescendo)
882 ;;((eq? action-name 'dashed-slur) dashed-slur)
883 ;;((eq? action-name 'decrescendo) decrescendo)
884 ;;((eq? action-name 'experimental-on) experimental-on)
885 ((eq? action-name 'filledbox) filledbox)
886 ((eq? action-name 'select-font) select-font)
887 ;;((eq? action-name 'volta) volta)
888 (else (error "unknown tag -- MUSA-SCM " action-name))
893 (define (gulp-file name)
894 (let* ((port (open-file name "r"))
895 (content (let loop ((text ""))
896 (let ((line (read-line port)))
897 (if (or (eof-object? line)
900 (loop (string-append text line "\n")))))))
904 ;; urg: Use when standalone, do:
905 ;; (define ly-gulp-file scm-gulp-file)
906 (define (scm-gulp-file name)
908 (cons (string-append (getenv 'LILYPONDPREFIX) "/ly")
909 (cons (string-append (getenv 'LILYPONDPREFIX) "/ps")
911 (let ((path (%search-load-path name)))
916 (define (scm-tex-output)
917 (eval (tex-scm 'all-definitions)))
919 (define (scm-ps-output)
920 (eval (ps-scm 'all-definitions)))
922 (define (scm-as-output)
923 (eval (as-scm 'all-definitions)))
925 (define (index-cell cell dir)
931 ; How should a bar line behave at a break?
933 (define (break-barline glyph dir)
934 (let ((result (assoc glyph
935 '((":|:" . (":|" . "|:"))
938 ("|:" . ("|" . "|:"))
939 ("|." . ("|." . nil))
940 (".|" . (nil . ".|"))
941 (":|" . (":|" . nil))
942 ("||" . ("||" . nil))
943 (".|." . (".|." . nil))
944 ("scorebar" . (nil . "scorepostbreak"))
945 ("brace" . (nil . "brace"))
946 ("bracket" . (nil . "bracket"))
950 (if (equal? result #f)
951 (ly-warn (string-append "Unknown bar glyph: `" glyph "'"))
952 (index-cell (cdr result) dir))