mirror of
https://github.com/kastdeur/lilydrum.git
synced 2024-12-22 17:23:32 +01:00
parent
68fb47f675
commit
50dc9c00fe
1 changed files with 28 additions and 10 deletions
|
@ -89,6 +89,7 @@ dr = #(define-event-function (parser location) () #{ -\tag #'tutti \startGroup #
|
||||||
fr = #(define-event-function (parser location) () #{ -\tag #'tutti \stopGroup #})
|
fr = #(define-event-function (parser location) () #{ -\tag #'tutti \stopGroup #})
|
||||||
odr = #(define-event-function (parser location) () #{ -\tag #'tutti \startGroup #})
|
odr = #(define-event-function (parser location) () #{ -\tag #'tutti \startGroup #})
|
||||||
ofr = #(define-event-function (parser location) () #{ -\tag #'tutti \stopGroup #})
|
ofr = #(define-event-function (parser location) () #{ -\tag #'tutti \stopGroup #})
|
||||||
|
rn = #(define-event-function (parser location) () #{ -\tag #'tutti ^\markup \path #0.1 #'((moveto 0 0)(rlineto 0 1)(rlineto 4 0)(rlineto 0 -1)) #})
|
||||||
|
|
||||||
#(define (allbutlastnote mus)
|
#(define (allbutlastnote mus)
|
||||||
"Reverse the elements, Pop of (cdr) the first element, Reverse again, put it in a SequentialMusic"
|
"Reverse the elements, Pop of (cdr) the first element, Reverse again, put it in a SequentialMusic"
|
||||||
|
@ -102,13 +103,30 @@ ofr = #(define-event-function (parser location) () #{ -\tag #'tutti \stopGroup #
|
||||||
(make-music 'SequentialMusic 'elements (list (last elts)))
|
(make-music 'SequentialMusic 'elements (list (last elts)))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
% TODO: check whether on one note
|
tutti =
|
||||||
tutti = #(define-music-function (music) (ly:music?)
|
#(define-music-function (myMusic) (ly:music?)
|
||||||
#{
|
(define (grace-music-filter event)
|
||||||
|
(let ((eventname (ly:music-property event 'name)))
|
||||||
|
(not (eq? eventname 'GraceMusic))))
|
||||||
|
(let*
|
||||||
|
(
|
||||||
|
(music-copy (ly:music-deep-copy myMusic))
|
||||||
|
(es (extract-typed-music (music-filter grace-music-filter music-copy) 'note-event))
|
||||||
|
)
|
||||||
|
(if (> (length es) 1)
|
||||||
|
#{% multiple notes
|
||||||
|
\once \override HorizontalBracket.to-barline = ##t
|
||||||
\override HorizontalBracket.connect-to-neighbor = #'(#t #t)
|
\override HorizontalBracket.connect-to-neighbor = #'(#t #t)
|
||||||
<>\dr
|
<>\dr
|
||||||
#(allbutlastnote music)
|
#(allbutlastnote myMusic)
|
||||||
<>\fr
|
<>\fr
|
||||||
#(lastnote music)
|
#(lastnote myMusic)
|
||||||
\revert HorizontalBracket.connect-to-neighbor
|
\revert HorizontalBracket.connect-to-neighbor
|
||||||
#})
|
#}
|
||||||
|
#{% single note
|
||||||
|
<>\rn
|
||||||
|
#myMusic
|
||||||
|
#}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in a new issue