;; symbols.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(define-markup-command (musicglyph layout props glyph-name)
+ (string?)
+ #:category music
+ "@var{glyph-name} is converted to a musical symbol; for example,
+@code{\\musicglyph #\"accidentals.natural\"} selects the natural sign from
+the music font. See @ruser{The Feta font} for a complete listing of
+the possible glyphs.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\musicglyph #\"f\"
+ \\musicglyph #\"rests.2\"
+ \\musicglyph #\"clefs.G_change\"
+}
+@end lilypond"
+ (let* ((font (ly:paper-get-font layout
+ (cons '((font-encoding . fetaMusic)
+ (font-name . #f))
+
+ props)))
+ (glyph (ly:font-get-glyph font glyph-name)))
+ (if (null? (ly:stencil-expr glyph))
+ (ly:warning (_ "Cannot find glyph ~a") glyph-name))
+
+ glyph))
+
(define-markup-command (doublesharp layout props)
()
#:category music
props))
name)))
-(define-markup-command (musicglyph layout props glyph-name)
- (string?)
- #:category music
- "@var{glyph-name} is converted to a musical symbol; for example,
-@code{\\musicglyph #\"accidentals.natural\"} selects the natural sign from
-the music font. See @ruser{The Feta font} for a complete listing of
-the possible glyphs.
-
-@lilypond[verbatim,quote]
-\\markup {
- \\musicglyph #\"f\"
- \\musicglyph #\"rests.2\"
- \\musicglyph #\"clefs.G_change\"
-}
-@end lilypond"
- (let* ((font (ly:paper-get-font layout
- (cons '((font-encoding . fetaMusic)
- (font-name . #f))
-
- props)))
- (glyph (ly:font-get-glyph font glyph-name)))
- (if (null? (ly:stencil-expr glyph))
- (ly:warning (_ "Cannot find glyph ~a") glyph-name))
-
- glyph))
-
-
(define-markup-command (lookup layout props glyph-name)
(string?)
#:category other
(set! music-descriptions
(sort music-descriptions alist<?))
-(define-public music-name-to-property-table (make-vector 59 '()))
+(define-public music-name-to-property-table (make-hash-table 59))
;; init hash table,
;; transport description to an object property.
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-13)
#:use-module (srfi srfi-39)
- #:use-module (lily)
- #:use-syntax (srfi srfi-39)
- #:use-syntax (ice-9 optargs))
+ #:use-module (lily))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;;
(define (make-music-type-predicate . music-types)
- (define ((make-music-type-predicate-aux mtypes) expr)
- (if (null? mtypes)
- #f
- (or (eqv? (car mtypes) (ly:music-property expr 'name))
- ((make-music-type-predicate-aux (cdr mtypes)) expr))))
- (make-music-type-predicate-aux music-types))
+ (define make-music-type-predicate-aux
+ (lambda (mtypes)
+ (lambda (expr)
+ (if (null? mtypes)
+ #f
+ (or (eqv? (car mtypes) (ly:music-property expr 'name))
+ ((make-music-type-predicate-aux (cdr mtypes)) expr))))))
+ (make-music-type-predicate-aux music-types))
(load "define-music-display-methods.scm")
\ No newline at end of file
;;;; You should have received a copy of the GNU General Public License
;;;; along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
-(define ((check-beam-quant posl posr) beam posns)
+(define check-beam-quant
+ (lambda (posl posr)
+ (lambda (beam posns)
"Check whether BEAM has POSL and POSR quants. POSL are (POSITION
. QUANT) pairs, where QUANT is -1 (hang), 0 (center), 1 (sit) or -2/ 2 (inter)
want-l want-r posns)
(set! (ly:grob-property beam 'annotation)
(format "(~S,~S)" want-l want-r))))
- posns
- ))
+ posns))))
-
-(define ((check-beam-slope-sign comparison) beam posns)
+(define check-beam-slope-sign
+ (lambda (comparison)
+ (lambda (beam posns)
"Check whether the slope of BEAM is correct wrt. COMPARISON."
(let* ((slope-sign (- (cdr posns) (car posns)))
(correct (comparison slope-sign 0)))
(set! (ly:grob-property beam 'annotation)
(format "~S 0" (procedure-name comparison))))
(set! (ly:grob-property beam 'annotation) ""))
- posns))
+ posns))))
(define-public (check-quant-callbacks l r)
"define-music-properties.scm"
"time-signature-settings.scm"
"auto-beam.scm"
- "chord-name.scm"
"bezier-tools.scm"
"parser-ly-from-scheme.scm"
"ly-syntax-constructors.scm"
"define-context-properties.scm"
+ ;; guile 1.9 wants markups defined before referenced
+ "define-markup-commands.scm"
+
+ "chord-name.scm"
"translation-functions.scm"
"script.scm"
"midi.scm"
"define-woodwind-diagrams.scm"
"display-woodwind-diagrams.scm"
"predefined-fretboards.scm"
- "define-markup-commands.scm"
"define-grob-properties.scm"
"define-grobs.scm"
"define-grob-interfaces.scm"