mirror of
https://github.com/kastdeur/lilydrum.git
synced 2024-12-22 09:13:33 +01:00
semi-stable tutti function and scoop
This commit is contained in:
parent
36782f48b0
commit
a30d9d1018
2 changed files with 75 additions and 41 deletions
|
@ -328,21 +328,19 @@ flourish = #(define-music-function (parser location notes) (ly:music?)
|
||||||
\revert Staff.NoteHead.style
|
\revert Staff.NoteHead.style
|
||||||
#})
|
#})
|
||||||
|
|
||||||
scoop = ^\markup {
|
%scoop = ^\markup {
|
||||||
\path #.2 #'( (moveto 0 0 )
|
% \path #.2 #'( (moveto 0 0 )
|
||||||
(lineto 3 1 )
|
% (lineto 3 1 )
|
||||||
(lineto 6 0 )
|
% (lineto 6 0 )
|
||||||
)
|
% )
|
||||||
}
|
% }
|
||||||
scoopo = #(define-music-function (parser location beg notes) (ly:music? ly:music?)
|
scoop = #(define-music-function (music) (ly:music?)
|
||||||
#{
|
#{
|
||||||
%Set spanner from first to last note
|
<>^"scoop"\startGroup
|
||||||
$beg
|
#(allbutlastnote music)
|
||||||
\startGroup
|
<>\stopGroup
|
||||||
$notes
|
#(lastnote music)
|
||||||
\stopGroup
|
#})
|
||||||
#})
|
|
||||||
|
|
||||||
%---------------------------------------------------%
|
%---------------------------------------------------%
|
||||||
% music function definitions
|
% music function definitions
|
||||||
%---------------------------------------------------%
|
%---------------------------------------------------%
|
||||||
|
|
|
@ -4,29 +4,29 @@
|
||||||
% Part of lilydrum
|
% Part of lilydrum
|
||||||
|
|
||||||
eighthBeaming = {
|
eighthBeaming = {
|
||||||
\set baseMoment = #(ly:make-moment 1/8)
|
\set baseMoment = #(ly:make-moment 1/8)
|
||||||
\set beatStructure = #'( 2 2 2 2)
|
\set beatStructure = #'( 2 2 2 2)
|
||||||
}
|
}
|
||||||
eighthReelBeaming = {
|
eighthReelBeaming = {
|
||||||
\set baseMoment = #(ly:make-moment 1/8)
|
\set baseMoment = #(ly:make-moment 1/8)
|
||||||
\set beatStructure = #'( 4 4 4 4)
|
\set beatStructure = #'( 4 4 4 4)
|
||||||
}
|
}
|
||||||
eighthCompoundBeaming = {
|
eighthCompoundBeaming = {
|
||||||
\set baseMoment = #(ly:make-moment 1/8)
|
\set baseMoment = #(ly:make-moment 1/8)
|
||||||
\set beatStructure = #'( 3 3 3 3)
|
\set beatStructure = #'( 3 3 3 3)
|
||||||
}
|
}
|
||||||
|
|
||||||
sixteenthBeaming = {
|
sixteenthBeaming = {
|
||||||
\set baseMoment = #(ly:make-moment 1/16)
|
\set baseMoment = #(ly:make-moment 1/16)
|
||||||
\set beatStructure = #'( 4 4 4 4)
|
\set beatStructure = #'( 4 4 4 4)
|
||||||
}
|
}
|
||||||
sixteenthReelBeaming = {
|
sixteenthReelBeaming = {
|
||||||
\set baseMoment = #(ly:make-moment 1/16)
|
\set baseMoment = #(ly:make-moment 1/16)
|
||||||
\set beatStructure = #'( 8 8 8 8)
|
\set beatStructure = #'( 8 8 8 8)
|
||||||
}
|
}
|
||||||
sixteenthCompoundBeaming = {
|
sixteenthCompoundBeaming = {
|
||||||
\set baseMoment = #(ly:make-moment 1/16)
|
\set baseMoment = #(ly:make-moment 1/16)
|
||||||
\set beatStructure = #'( 6 6 6 6)
|
\set beatStructure = #'( 6 6 6 6)
|
||||||
}
|
}
|
||||||
% triplet
|
% triplet
|
||||||
triplet = #(define-music-function (parser location notes) (ly:music?) #{ \tuplet 3/2 { $notes } #})
|
triplet = #(define-music-function (parser location notes) (ly:music?) #{ \tuplet 3/2 { $notes } #})
|
||||||
|
@ -34,6 +34,20 @@ triplet = #(define-music-function (parser location notes) (ly:music?) #{ \tuplet
|
||||||
% dynamics
|
% dynamics
|
||||||
v = #(define-event-function (parser location) () #{ \upbow #})
|
v = #(define-event-function (parser location) () #{ \upbow #})
|
||||||
|
|
||||||
|
|
||||||
|
#(define (text-spanner-start-stop mus)
|
||||||
|
(let ((elts (ly:music-property mus 'elements)))
|
||||||
|
(make-music 'SequentialMusic 'elements
|
||||||
|
(append
|
||||||
|
(list (make-music 'TextSpanEvent 'span-direction -1))
|
||||||
|
(reverse (cdr (reverse elts)))
|
||||||
|
(list (make-music 'TextSpanEvent 'span-direction 1))
|
||||||
|
(list (last elts))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
% dynamics with extended lines
|
% dynamics with extended lines
|
||||||
dynLine = #(define-music-function
|
dynLine = #(define-music-function
|
||||||
(parser location text)
|
(parser location text)
|
||||||
|
@ -52,22 +66,44 @@ dynLine = #(define-music-function
|
||||||
% unison brackets
|
% unison brackets
|
||||||
% TODO: a little 'u'
|
% TODO: a little 'u'
|
||||||
% TODO: open ended brackets(\odr,\ofr)
|
% TODO: open ended brackets(\odr,\ofr)
|
||||||
|
%unisonbracket = {
|
||||||
|
% \once \override TextSpanner.style = #'line
|
||||||
|
% \once \override TextSpanner #'to-barline = ##t
|
||||||
|
% \once \override TextSpanner.bound-details.left.text = \markup {
|
||||||
|
% \combine
|
||||||
|
% \combine
|
||||||
|
% \draw-line #'(0 . -1)
|
||||||
|
% \draw-line #'(1 . 0)
|
||||||
|
% \translate #'(1 . -0.5 ) \whiteout \box "u"
|
||||||
|
% }
|
||||||
|
% \once \override TextSpanner.bound-details.right.text = \markup { \draw-line #'(0 . -1) }
|
||||||
|
% \once \override TextSpanner.bound-details.right.attach-dir = #RIGHT
|
||||||
|
%}
|
||||||
|
%dr = { \unisonbracket <>\="unison"\startTextSpan }
|
||||||
|
%fr = { <>\="unison"\stopTextSpan }
|
||||||
|
%odr = { \unisonbracket <>\="unison"\startTextSpan }
|
||||||
|
%ofr = { <>\="unison"\stopTextSpan }
|
||||||
dr = #(define-event-function (parser location) () #{ \startGroup #})
|
dr = #(define-event-function (parser location) () #{ \startGroup #})
|
||||||
fr = #(define-event-function (parser location) () #{ \stopGroup #})
|
fr = #(define-event-function (parser location) () #{ \stopGroup #})
|
||||||
odr = #(define-event-function (parser location) () #{ \startGroup #})
|
odr = #(define-event-function (parser location) () #{ \startGroup #})
|
||||||
ofr = #(define-event-function (parser location) () #{ \stopGroup #})
|
ofr = #(define-event-function (parser location) () #{ \stopGroup #})
|
||||||
tutti = #(define-music-function (mus) (ly:music?)
|
|
||||||
; By Jan-Peter Voigt, Tue, 2 May 2017 11:10:46 +0200
|
#(define (allbutlastnote mus)
|
||||||
(let* ((elms (ly:music-property mus 'elements))
|
(let ((elts (ly:music-property mus 'elements)))
|
||||||
; first and last music-element ...
|
(make-music 'SequentialMusic 'elements (reverse (cdr (reverse elts))))
|
||||||
(frst (first elms)) ; TODO test for list? and ly:music?
|
)
|
||||||
(lst (last elms)) ; TODO test for list? and ly:music?
|
)
|
||||||
(fartic (ly:music-property frst 'articulations '())) ; look
|
#(define (lastnote mus)
|
||||||
for eventchords ...
|
(let ((elts (ly:music-property mus 'elements)))
|
||||||
(lartic (ly:music-property lst 'articulations '()))
|
(make-music 'SequentialMusic 'elements (list (last elts)))
|
||||||
)
|
)
|
||||||
(ly:music-set-property! frst 'articulations `(,@fartic ,(make-music 'NoteGroupingEvent 'span-direction -1)))
|
)
|
||||||
(ly:music-set-property! lst 'articulations `(,@lartic ,(make-music 'NoteGroupingEvent 'span-direction 1)))
|
% TODO: check whether on one note
|
||||||
|
tutti = #(define-music-function (music) (ly:music?)
|
||||||
#{
|
#{
|
||||||
#mus
|
\once \override HorizontalBracket.connect-to-neighbor = #'(#t #t)
|
||||||
#}))
|
<>\startGroup
|
||||||
|
#(allbutlastnote music)
|
||||||
|
<>\stopGroup
|
||||||
|
#(lastnote music)
|
||||||
|
#})
|
||||||
|
|
Loading…
Reference in a new issue