mirror of
https://github.com/kastdeur/lilydrum.git
synced 2024-12-22 01:03:33 +01:00
Remove internal functions file
This commit is contained in:
parent
3b3844d7cb
commit
bafcc6ef6f
4 changed files with 23 additions and 39 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
This file builds on work done by Simon Froger.
|
||||
|
||||
Substantial changes by ET de Boone, Seaforth Highlanders of Holland (seaforth.nl)
|
||||
Substantial changes by ET de Boone (https://etdeboone.nl)
|
||||
Include by using :
|
||||
\include "[pathtothisfile]" e.g. "~/lilydrum.ly"
|
||||
|
||||
|
@ -26,8 +26,6 @@
|
|||
|
||||
#(ly:set-option 'relative-includes #t)
|
||||
|
||||
\include "lilydrum/internal_functions.ily"
|
||||
|
||||
\include "lilydrum/layout_tweaks.ily"
|
||||
\include "lilydrum/musical_functions.ily"
|
||||
\include "lilydrum/embellishments.ily"
|
||||
|
|
|
@ -335,13 +335,26 @@ flourish = #(define-music-function (parser location notes) (ly:music?)
|
|||
#})
|
||||
|
||||
% See issue #4 (https://github.com/kastdeur/lilydrum/issues/4)
|
||||
scoop = #(define-music-function (music) (ly:music?)
|
||||
#{
|
||||
<>^"scoop"\startGroup
|
||||
#(_allbutlastnote music)
|
||||
<>\stopGroup
|
||||
#(_lastnote music)
|
||||
#})
|
||||
scoop = #(define-music-function (music) (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 music))
|
||||
(es (extract-typed-music (music-filter grace-music-filter music-copy) 'note-event))
|
||||
)
|
||||
(if (< (length es) 2)
|
||||
(ly:message "A scoop requires at least two notes for positioning"))
|
||||
; do it anyway
|
||||
#{
|
||||
<>
|
||||
-\tweak HorizontalBracketText.text "scoop"
|
||||
-\tweak HorizontalBracketText.whiteout 1
|
||||
\startGroup
|
||||
#music
|
||||
\stopGroup
|
||||
#}))
|
||||
%---------------------------------------------------%
|
||||
% music function definitions
|
||||
%---------------------------------------------------%
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
% ================================================= %
|
||||
% Internal Functions %
|
||||
% as used by other files in this library %
|
||||
% ================================================= %
|
||||
% Part of lilydrum
|
||||
|
||||
#(define ( _get-first-note mus)
|
||||
"Get the first note-event in @var{music}"
|
||||
(let ((note (car (extract-typed-music mus 'note-event))))
|
||||
note
|
||||
)
|
||||
)
|
||||
|
||||
#(define (_allbutlastnote mus)
|
||||
"Reverse the elements, Pop of (cdr) the first element, Reverse again, put it in a SequentialMusic"
|
||||
(let ((elts (ly:music-property mus 'elements)))
|
||||
(make-music 'SequentialMusic 'elements (reverse (cdr (reverse elts))))
|
||||
)
|
||||
)
|
||||
|
||||
#(define (_lastnote mus)
|
||||
"Get the last element, make it a list, put it in a SequentialMusic"
|
||||
(let ((elts (ly:music-property mus 'elements)))
|
||||
(make-music 'SequentialMusic 'elements (list (last elts)))
|
||||
)
|
||||
)
|
||||
|
|
@ -103,8 +103,8 @@ tutti =
|
|||
)
|
||||
(if (> (length es) 1)
|
||||
#{% multiple notes
|
||||
\once \override HorizontalBracket.connect-to-neighbor = #'(#t #t)
|
||||
<>\dr
|
||||
<>
|
||||
\dr
|
||||
#myMusic
|
||||
\fr
|
||||
#}
|
||||
|
|
Loading…
Reference in a new issue