lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bar-line interface part 2/2 (issue 6498052)


From: thomasmorley65
Subject: Re: bar-line interface part 2/2 (issue 6498052)
Date: Wed, 29 Aug 2012 23:46:05 +0000

Great work so far.
Some minor suggestions:




http://codereview.appspot.com/6498052/diff/5001/scm/bar-line.scm
File scm/bar-line.scm (right):

http://codereview.appspot.com/6498052/diff/5001/scm/bar-line.scm#newcode203
scm/bar-line.scm:203:
If a user defines some curious bar-lines like:
#(define-bar-line "|SS...SS|" "|SS.." "..SS|" "|==...==|")
LilyPond will create some weird output without any hint whats wrong, I'd
suggest adding a warning like:

(map (lambda (x) (if (not (assoc-get x bar-glyph-alist))
                  (ly:warning (_ "bar-glyph ~a has to be defined before, in 
separate
definition") x)))
            (list eol-glyph bol-glyph))

and to change the order of the predefined bar-lines at the bottom of the
file.

http://codereview.appspot.com/6498052/diff/5001/scm/bar-line.scm#newcode212
scm/bar-line.scm:212:
If a user defines his own bar-line and chooses a glyph with
string-length greater than 1, compiling will fail without a useful
log-message.
I'd suggest:

(define-public (add-bar-glyph-print-procedure glyph proc)
  "Specify the single glyph @var{glyph} that calls print procedure
@var{proc}.
The procedure @var{proc} has to be defined in the form
@code{(make-...-bar-line grob extent)} even if the @var{extent}
is not used within the routine."
  (if (or (not (string? glyph))
          (> (string-length glyph) 1))
      (ly:warning (_ "glyph ~a is not of string-length 1") glyph)
  (set! bar-glyph-print-procedures
    (acons glyph proc bar-glyph-print-procedures))))

or sth like this

http://codereview.appspot.com/6498052/diff/5001/scm/bar-line.scm#newcode878
scm/bar-line.scm:878: (define-bar-line ":.|.:" ":|." ".|:" " .|.")
The following to lines should be moved to the position directly after
;;repeats
(see my comment above)

http://codereview.appspot.com/6498052/diff/5001/scm/bar-line.scm#newcode882
scm/bar-line.scm:882: (define-bar-line ":|]" "|" ":|]" " |")
I think it should be:
(define-bar-line ":|]" ":|]" ""  " |")

http://codereview.appspot.com/6498052/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]