]> git.donarmstrong.com Git - lilypond.git/commitdiff
* Documentation/topdocs/NEWS.tely: new item for \displayLilyMusic
authorNicolas Sceaux <nicolas.sceaux@free.fr>
Sun, 24 Jul 2005 12:49:14 +0000 (12:49 +0000)
committerNicolas Sceaux <nicolas.sceaux@free.fr>
Sun, 24 Jul 2005 12:49:14 +0000 (12:49 +0000)
* scm/define-music-display-methods.scm (markup->lily-string):
markup elements can also be strings (without simple-markup
appended)

ChangeLog
Documentation/topdocs/NEWS.tely
scm/define-music-display-methods.scm

index 7ef49c9f3f50672c101b59edf6ece54a2ac53a19..839dd0d7933b616620a36bdaabd578720b463869 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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
index 4cde1d03ae3bf3b31c778697a930ce07e31701c0..12cfec79409ca71e9d5f59572390d0a682813183 100644 (file)
@@ -32,6 +32,18 @@ See user manual, \NAME\
 
 
 @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.
 
index 7dba2143dddccefa0bc7591330be27addcaf1a63..ea49d5361320d2b2f3e8a1783a19c0cc0a7dffd9 100644 (file)
          (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)
@@ -74,6 +76,7 @@
        (else
         (format #f "\\markup ~a"
                 (markup->lily-string-aux markup-expr)))))
+
 ;;;
 ;;; pitch names
 ;;;