]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/display-lily.scm
Run `make grand-replace'.
[lilypond.git] / scm / display-lily.scm
index df0d04df7d97f8204e115178e22664c702e625bf..e85159059df198020dba621b003d713de156040f 100644 (file)
@@ -2,7 +2,7 @@
 ;;;
 ;;;
 ;;;
-;;; (c) 2005--2006 Nicolas Sceaux  <nicolas.sceaux@free.fr>
+;;; (c) 2005--2008 Nicolas Sceaux  <nicolas.sceaux@free.fr>
 ;;;
 
 ;;; - This file defines the procedures used to define display methods for each
 ;;; Display methods are stored in the `display-methods' property of each music
 ;;; type.
 ;;;
-;;; - `display-lily-music' can be called to display a music expression using
-;;; LilyPond notation. `music->lily-string' return a string describing a music
-;;; expression using LilyPond notation.
+;;; - `music->lily-string' return a string describing a music expression using
+;;; LilyPond notation. The special variables *indent*, *previous-duration*,
+;;; and *force-duration* influence the indentation level and the display of
+;;; music durations.
 ;;;
 ;;; - `with-music-match' can be used to destructure a music expression, extracting
 ;;; some interesting music properties.
@@ -98,13 +99,6 @@ display method will be called."
                    music-type)))
       (format #f "%{ expecting a music expression: ~a %}" expr)))
 
-(define*-public (display-lily-music expr parser #:key force-duration)
-  (parameterize ((*indent* 0)
-                (*previous-duration* (ly:make-duration 2))
-                (*force-duration* force-duration))
-    (display (music->lily-string expr parser))
-    (newline)))
-
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;
 ;;; Music pattern matching
@@ -138,7 +132,7 @@ display method will be called."
 (define (gen-condition expr pattern)
   "Helper function for `with-music-match'.
 Generate an form that checks if the properties of `expr'
-match thoses desscribed in `pattern'."
+match thoses described in `pattern'."
   (let* (;; all (property . value) found at the first depth in pattern,
         ;; including a (name . <Musictype>) pair.
         (pat-all-props (cons (cons 'name (second pattern))
@@ -267,13 +261,13 @@ inside body."
 ;;;
 
 ;;; indentation
-(define *indent* (make-parameter 0))
+(define-public *indent* (make-parameter 0))
 
 ;;; set to #t to force duration printing
-(define *force-duration* (make-parameter #f))
+(define-public *force-duration* (make-parameter #f))
 
 ;;; last duration found
-(define *previous-duration* (make-parameter (ly:make-duration 2)))
+(define-public *previous-duration* (make-parameter (ly:make-duration 2)))
 
 ;;; Set to #t to force a line break with some kinds of expressions (eg sequential music)
 (define *force-line-break* (make-parameter #t))