CVSROOT: /cvsroot/lilypond
Module name: lilypond
Branch:
Changes by: Nicolas Sceaux <[EMAIL PROTECTED]> 05/07/22 18:28:35
Modified files:
scm : markup.scm define-music-types.scm clef.scm
ly : music-functions-init.ly
. : ChangeLog
Log message:
* scm/display-lily.scm: new file. Define a `display-lily-music'
function, that displays the music expression given as an argument,
using LilyPond notation.
* scm/define-music-display-methods.scm: new file. Implementation
of display methods for each music type.
* ly/music-functions-init.ly (displayLilyMusic): new function for
displaying music with LilyPond notation.
* scm/markup.scm: remove obsolete debugging code (for printing
markups with LilyPond notation).
* scm/define-music-types.scm (music-name-to-property-table):
* scm/clef.scm (supported-clefs): export, in order to be accessible
from the (scm display-lily) module.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/markup.scm.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/define-music-types.scm.diff?tr1=1.62&tr2=1.63&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/clef.scm.diff?tr1=1.36&tr2=1.37&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ly/music-functions-init.ly.diff?tr1=1.31&tr2=1.32&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3912&tr2=1.3913&r1=text&r2=text
Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3912 lilypond/ChangeLog:1.3913
--- lilypond/ChangeLog:1.3912 Fri Jul 22 17:52:36 2005
+++ lilypond/ChangeLog Fri Jul 22 18:28:35 2005
@@ -1,3 +1,25 @@
+2005-07-22 Nicolas Sceaux <[EMAIL PROTECTED]>
+
+ * scm/display-lily.scm: new file. Define a `display-lily-music'
+ function, that displays the music expression given as an argument,
+ using LilyPond notation.
+
+ * scm/define-music-display-methods.scm: new file. Implementation
+ of display methods for each music type.
+
+ * ly/music-functions-init.ly (displayLilyMusic): new function for
+ displaying music with LilyPond notation.
+
+ * input/regression/display-lily-tests.ly: new regression test file
+ for `display-lily-music'.
+
+ * scm/markup.scm: remove obsolete debugging code (for printing
+ markups with LilyPond notation).
+
+ * scm/define-music-types.scm (music-name-to-property-table):
+ * scm/clef.scm (supported-clefs): export, in order to be accessible
+ from the (scm display-lily) module.
+
2005-07-22 Jan Nieuwenhuizen <[EMAIL PROTECTED]>
* Documentation/topdocs/NEWS.tely (Top): Typo.
Index: lilypond/ly/music-functions-init.ly
diff -u lilypond/ly/music-functions-init.ly:1.31
lilypond/ly/music-functions-init.ly:1.32
--- lilypond/ly/music-functions-init.ly:1.31 Thu Jul 21 21:36:04 2005
+++ lilypond/ly/music-functions-init.ly Fri Jul 22 18:28:35 2005
@@ -47,6 +47,14 @@
#(def-music-function (parser location music) (ly:music?)
(display-scheme-music music)
music)
+
+#(use-modules (scm display-lily))
+displayLilyMusic =
+#(def-music-function (parser location music) (ly:music?)
+ (display-lily-init parser)
+ (display-lily-music music)
+ music)
+
applyoutput =
#(def-music-function (parser location proc) (procedure?)
(make-music 'ApplyOutputEvent
Index: lilypond/scm/clef.scm
diff -u lilypond/scm/clef.scm:1.36 lilypond/scm/clef.scm:1.37
--- lilypond/scm/clef.scm:1.36 Tue Apr 12 22:49:25 2005
+++ lilypond/scm/clef.scm Fri Jul 22 18:28:35 2005
@@ -9,7 +9,7 @@
;;
;; -- the name clefOctavation is misleading. The value 7 is 1 octave,
;; not 7 Octaves.
-(define supported-clefs
+(define-public supported-clefs
'(("treble" . ("clefs.G" -2 0))
("violin" . ("clefs.G" -2 0))
("G" . ("clefs.G" -2 0))
Index: lilypond/scm/define-music-types.scm
diff -u lilypond/scm/define-music-types.scm:1.62
lilypond/scm/define-music-types.scm:1.63
--- lilypond/scm/define-music-types.scm:1.62 Thu Jul 21 21:36:05 2005
+++ lilypond/scm/define-music-types.scm Fri Jul 22 18:28:35 2005
@@ -701,7 +701,7 @@
(set! music-descriptions
(sort music-descriptions alist<?))
-(define music-name-to-property-table (make-vector 59 '()))
+(define-public music-name-to-property-table (make-vector 59 '()))
;; init hash table,
;; transport description to an object property.
Index: lilypond/scm/markup.scm
diff -u lilypond/scm/markup.scm:1.6 lilypond/scm/markup.scm:1.7
--- lilypond/scm/markup.scm:1.6 Wed Jun 1 14:26:13 2005
+++ lilypond/scm/markup.scm Fri Jul 22 18:28:35 2005
@@ -221,43 +221,6 @@
(else (values (car expr) (cdr expr)))))
;;;;;;;;;;;;;;;
-;;; Debugging utilities: print markup expressions in a friendly fashion
-
-(use-modules (ice-9 format))
-(define (markup->string markup-expr)
- "Return a string describing, in LilyPond syntax, the given markup
expression."
- (define (proc->command proc)
- (let ((cmd-markup (symbol->string (procedure-name proc))))
- (substring cmd-markup 0 (- (string-length cmd-markup)
- (string-length "-markup")))))
- (define (arg->string arg)
- (cond ((and (pair? arg) (pair? (car arg))) ;; markup list
- (format #f "~{ ~a~}" (map markup->string arg)))
- ((pair? arg) ;; markup
- (markup->string arg))
- ((string? arg) ;; scheme string argument
- (format #f "#\"~a\"" arg))
- (else ;; other scheme arg
- (format #f "#~a" arg))))
- (let ((cmd (car markup-expr))
- (args (cdr markup-expr)))
- (cond ((eqv? cmd simple-markup) ;; a simple string
- (format #f "\"~a\"" (car args)))
- ((eqv? cmd line-markup) ;; { ... }
- (format #f "{~a}" (arg->string (car args))))
- ((eqv? cmd center-align-markup) ;; \center < ... >
- (format #f "\\center-align <~a>" (arg->string (car args))))
- ((eqv? cmd column-markup) ;; \column < ... >
- (format #f "\\column <~a>" (arg->string (car args))))
- (else ;; \command ...
- (format #f "\\~a~{ ~a~} " (proc->command cmd) (map arg->string
args))))))
-
-(define-public (display-markup markup-expr)
- "Print a LilyPond-syntax equivalent for the given markup expression."
- (display "\\markup ")
- (display (markup->string markup-expr)))
-
-;;;;;;;;;;;;;;;
;;; Utilities for storing and accessing markup commands signature
;;; and keyword.
;;; Examples:
_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs