1 ;------------------------------------------------------------------;
2 ; opus_libre -- macros.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 ;------------------------------------------------------------------;
14 (load "../lib/libmusic.scm")
16 ;; Rhythm shortcuts -----------------------------------------------;
17 (make-simple-function lang:tuplet-letter ; default: \t
20 (make-simple-function lang:tuplet-letter-double ; \tt
23 (make-simple-function lang:tuplet-letter-triple ; \ttt
26 (make-simple-function lang:tuplet-letter-quad ; \tttt
29 ;; Auto octavation ------------------------------------------------;
31 (define-music-function (parser location mus) (ly:music?)
34 ;; Articulation shortcuts -----------------------------------------;
35 ;;TODO: how about an alist? (see libmusic.scm)
36 (make-script '(st . "staccato"))
37 (make-script '(acc . "accent"))
38 (make-script '(det . "tenuto")) ; as in "détaché"
39 (make-script '(stdet . "portato"))
40 (make-script '(accdet . '("tenuto" "accent")))
41 (make-script '(accst . '("accent" "staccato")))
42 (make-script '(dwnb . "downbow"))
44 ;; Polyphony shortcuts --------------------------------------------;
46 (define-music-function (parser location one two)
48 #{ << { \voiceTwo $one } \\ { \voiceOne $two } >> #}))
50 (staff-change-command lang:upper-hand) ;; depending on your input language:
51 (staff-change-command lang:lower-hand) ;; \rh or \md etc. for switching staves.