1
0
Fork 0
mirror of https://github.com/kastdeur/lilydrum.git synced 2024-12-22 09:13:33 +01:00

Remove internal functions file

This commit is contained in:
Eric Teunis de Boone 2023-08-10 13:51:34 +02:00
parent 3b3844d7cb
commit bafcc6ef6f
4 changed files with 23 additions and 39 deletions

View file

@ -6,7 +6,7 @@
This file builds on work done by Simon Froger. 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 by using :
\include "[pathtothisfile]" e.g. "~/lilydrum.ly" \include "[pathtothisfile]" e.g. "~/lilydrum.ly"
@ -26,8 +26,6 @@
#(ly:set-option 'relative-includes #t) #(ly:set-option 'relative-includes #t)
\include "lilydrum/internal_functions.ily"
\include "lilydrum/layout_tweaks.ily" \include "lilydrum/layout_tweaks.ily"
\include "lilydrum/musical_functions.ily" \include "lilydrum/musical_functions.ily"
\include "lilydrum/embellishments.ily" \include "lilydrum/embellishments.ily"

View file

@ -335,13 +335,26 @@ flourish = #(define-music-function (parser location notes) (ly:music?)
#}) #})
% See issue #4 (https://github.com/kastdeur/lilydrum/issues/4) % See issue #4 (https://github.com/kastdeur/lilydrum/issues/4)
scoop = #(define-music-function (music) (ly:music?) scoop = #(define-music-function (music) (ly:music?)
#{ (define (grace-music-filter event)
<>^"scoop"\startGroup (let ((eventname (ly:music-property event 'name)))
#(_allbutlastnote music) (not (eq? eventname 'GraceMusic))))
<>\stopGroup (let*
#(_lastnote music) (
#}) (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 % music function definitions
%---------------------------------------------------% %---------------------------------------------------%

View file

@ -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)))
)
)

View file

@ -103,8 +103,8 @@ tutti =
) )
(if (> (length es) 1) (if (> (length es) 1)
#{% multiple notes #{% multiple notes
\once \override HorizontalBracket.connect-to-neighbor = #'(#t #t) <>
<>\dr \dr
#myMusic #myMusic
\fr \fr
#} #}