1 ;------------------------------------------------------------------;
2 ; opus_libre -- text.scm ;
4 ; (c) 2008-2010 Valentin Villenave <valentin@villenave.net> ;
6 ; opus_libre is a free framework for GNU LilyPond: you may ;
7 ; redistribute it and/or modify it under the terms of the GNU ;
8 ; General Public License, version 3 or later: gnu.org/licenses ;
10 ;------------------------------------------------------------------;
12 ;; Macros for entering text elements.
14 (load "../lib/libtext.scm")
16 ;; Composite dynamics ---------------------------------------------;
18 ;;syntax: -\dyn instead of \dyn (see Issue #1264).
19 (define-music-function (parser location arg) (markup?)
20 (make-music 'AbsoluteDynamicEvent
23 (if (string-every char-set:dynamics arg)
25 (markup #:dynamic-string arg)))
29 (define-music-function (location parser txt) (markup?)
30 (make-text-span txt)))
32 ;; for consistency only.
37 (define-music-function (parser location music) (ly:music?)
39 (equal? (ly:music-property music 'name) 'EventChord)
40 (set! (ly:music-property music 'elements)
41 (append (ly:music-property music 'elements)
42 (list (make-music 'TextScriptEvent 'text
43 ;; ugh. Haphazard alignment.
44 (markup #:translate-scaled (cons 4 0)
45 #:indic "(ten.)"))))))