+2005-07-24 Nicolas Sceaux <nicolas.sceaux@free.fr>
+
+ * Documentation/topdocs/NEWS.tely: new item for \displayLilyMusic
+
+ * scm/define-music-display-methods.scm (markup->lily-string):
+ markup elements can also be strings (without simple-markup
+ appended)
+
2005-07-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
* lily/context.cc (where_defined): also assign value in
@itemize @bullet
+
+@item
+Music expressions can be displayed, in LilyPond notation, using the
+new @code{\displayLilyMusic} function. For instance:
+@verbatim
+\displayLilyMusic \transpose c a, { c d e f }
+@end verbatim
+will print:
+@verbatim
+{ a, b, cis d }
+@end verbatim
+
@item
The current bar number may be checked with @code{\barNumberCheck}, eg.
(else ;; a scheme argument
(format #f "#~a" (scheme-expr->lily-string arg)))))
(define (markup->lily-string-aux expr)
- (let ((cmd (car expr))
- (args (cdr expr)))
- (if (eqv? cmd simple-markup) ;; a simple string
- (format #f "~s" (car args))
- (format #f "\\~a~{ ~a~}"
- (proc->command cmd)
- (map-in-order arg->string args)))))
+ (if (string? expr)
+ (format #f "~s" expr)
+ (let ((cmd (car expr))
+ (args (cdr expr)))
+ (if (eqv? cmd simple-markup) ;; a simple markup
+ (format #f "~s" (car args))
+ (format #f "\\~a~{ ~a~}"
+ (proc->command cmd)
+ (map-in-order arg->string args))))))
(cond ((string? markup-expr)
(format #f "~s" markup-expr))
((eqv? (car markup-expr) simple-markup)
(else
(format #f "\\markup ~a"
(markup->lily-string-aux markup-expr)))))
+
;;;
;;; pitch names
;;;