2020-07-05 19:53:10 +02:00
|
|
|
% ================================================= %
|
|
|
|
% Flams, Drags & the sort %
|
|
|
|
% ================================================= %
|
|
|
|
|
2015-11-18 03:03:44 +01:00
|
|
|
drumgrace = #(define-music-function (parser location notes ) ( ly:music? ) #{
|
2015-11-05 01:39:52 +01:00
|
|
|
% Set settings
|
|
|
|
\stemUp
|
2015-11-09 05:59:05 +01:00
|
|
|
\once \override Beam.positions = #'(2 . 2)
|
2015-11-05 01:39:52 +01:00
|
|
|
\once \override DrumStaff.Stem.length = #5
|
|
|
|
\override Flag.stroke-style = #"grace"
|
2015-11-09 05:59:05 +01:00
|
|
|
\override Score.GraceSpacing #'spacing-increment = #0
|
2015-11-05 01:39:52 +01:00
|
|
|
\override Score.Stem #'beamlet-max-length-proportion = #'(0.5 . 0.5)
|
|
|
|
|
|
|
|
% Print notes
|
2018-02-27 23:18:16 +01:00
|
|
|
\small \times 1/4 { \grace $notes }
|
2015-11-05 01:39:52 +01:00
|
|
|
|
|
|
|
% Revert back
|
|
|
|
\revert Score.Stem #'beamlet-default-length
|
|
|
|
\revert Flag.stroke-style
|
|
|
|
\stemNeutral
|
|
|
|
#})
|
|
|
|
|
|
|
|
% Flams
|
2018-02-06 16:22:47 +01:00
|
|
|
flamd = \drummode { \drumgrace { g8 } } % Flam right
|
|
|
|
flamg = \drummode { \drumgrace { d8 } } % Flam left
|
2016-11-23 03:24:56 +01:00
|
|
|
flamddr = \drummode { \drumgrace { g8\dr } } % Flam right with start repeat
|
2020-07-05 19:53:10 +02:00
|
|
|
flamgdr = \drummode { \drumgrace { d8\dr } } % Flam left with start repeat
|
|
|
|
|
|
|
|
% Optional Flams
|
|
|
|
optflamd = \drummode { \drumgrace { \parenthesize g8 } } % Optional Flam right
|
|
|
|
optflamg = \drummode { \drumgrace { \parenthesize d8 } } % Optional Flam left
|
|
|
|
optflamddr = \drummode { \drumgrace { \parenthesize g8\dr } } % Optional Flam right with start repeat
|
|
|
|
optflamgdr = \drummode { \drumgrace { \parenthesize d8\dr } } % Optional Flam left with start repeat
|
2015-11-05 01:39:52 +01:00
|
|
|
|
|
|
|
% Drags
|
2018-02-06 16:22:47 +01:00
|
|
|
dragd = \drummode { \drumgrace { g16[ g] } } % Drag right
|
|
|
|
dragg = \drummode { \drumgrace { d16[ d] } } % Drag left
|
2016-11-23 03:24:56 +01:00
|
|
|
dragddr = \drummode { \drumgrace { g16[\dr g] } } % Drag right with start repeat
|
|
|
|
draggdr = \drummode { \drumgrace { d16[\dr d] } } % Drag left with start repeat
|
2015-11-18 03:03:44 +01:00
|
|
|
|
2020-07-05 19:53:10 +02:00
|
|
|
% Open Drags
|
2018-02-06 16:22:47 +01:00
|
|
|
odragd = \drummode { \drumgrace { << { g16[ g] } { s16 s32^\markup { \musicglyph #"scripts.open" } } >> } } % Open Drag right
|
|
|
|
odragg = \drummode { \drumgrace { << { d16[ d] } { s16 s32^\markup { \musicglyph #"scripts.open" } } >> } } % Open Drag left
|
2018-01-30 16:19:05 +01:00
|
|
|
odragddr = \drummode { \drumgrace { << { d16[\dr d] } { s16 s32^\markup { \musicglyph #"scripts.open" } } >> } } % Open Drag right with start repeat
|
|
|
|
odraggdr = \drummode { \drumgrace { << { g16[\dr g] } { s16 s32^\markup { \musicglyph #"scripts.open" } } >> } } % Open Drag left with start repeat
|
2015-11-05 01:39:52 +01:00
|
|
|
|
|
|
|
% Ruff
|
2018-02-06 16:22:47 +01:00
|
|
|
ruffg = \drummode { \drumgrace { g16[ d g] } } % Ruff right
|
|
|
|
ruffd = \drummode { \drumgrace { d16[ g d] } } % Ruff left
|
2016-11-23 03:24:56 +01:00
|
|
|
ruffgdr = \drummode { \drumgrace { g16[\dr d g] } } % Ruff right with start repeat
|
|
|
|
ruffddr = \drummode { \drumgrace { d16[\dr g d] } } % Ruff left with start repeat
|
2015-11-05 01:39:52 +01:00
|
|
|
|
|
|
|
% Swiss Ruff
|
2018-02-06 16:22:47 +01:00
|
|
|
sruffg = \drummode { \drumgrace { g16[ d d] } } % Swiss Ruff right
|
|
|
|
sruffd = \drummode { \drumgrace { d16[ g g] } } % Swiss Ruff left
|
2016-11-23 03:24:56 +01:00
|
|
|
sruffgdr = \drummode { \drumgrace { g16[\dr d d] } } % Swiss Ruff right with start repeat
|
|
|
|
sruffddr = \drummode { \drumgrace { d16[\dr g g] } } % Swiss Ruff left with start repeat
|
2015-11-05 01:39:52 +01:00
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
2020-07-05 19:53:10 +02:00
|
|
|
%% Embellishment functions, automatic left or right %%
|
2015-11-05 01:39:52 +01:00
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
2018-10-22 02:52:33 +02:00
|
|
|
get-first-note = #(define-music-function (music) (ly:music?)
|
|
|
|
"Get the first note-event in @var{music}"
|
2019-02-10 20:09:38 +01:00
|
|
|
(let ((note (car (extract-typed-music music 'note-event))))
|
2018-10-22 02:52:33 +02:00
|
|
|
note
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2016-11-23 03:24:56 +01:00
|
|
|
#(define (autohandFunc left right)
|
2018-10-22 02:52:33 +02:00
|
|
|
"Return a music function that prepends @var{left} if the first next note-event is of type 'left-hand,
|
|
|
|
else it will prepend @var{right}"
|
|
|
|
(define-music-function (parser location music) (ly:music? )
|
|
|
|
(let ((note (get-first-note music)))
|
|
|
|
#{
|
|
|
|
#(if (string=? (symbol->string (ly:music-property note 'drum-type)) "left-hand")
|
|
|
|
#{ $left #}
|
|
|
|
#{ $right #})
|
2016-11-23 03:24:56 +01:00
|
|
|
|
2018-10-22 02:52:33 +02:00
|
|
|
% print the note, else it won't show up
|
|
|
|
#music
|
|
|
|
#}
|
|
|
|
)
|
2016-11-23 03:24:56 +01:00
|
|
|
)
|
|
|
|
)
|
2020-07-05 19:53:10 +02:00
|
|
|
|
2016-04-27 02:57:44 +02:00
|
|
|
% Flam
|
2016-11-23 03:24:56 +01:00
|
|
|
flam = #(autohandFunc flamg flamd)
|
2018-02-06 16:22:47 +01:00
|
|
|
flamdr = #(autohandFunc flamgdr flamddr )
|
2016-04-27 02:57:44 +02:00
|
|
|
|
2020-07-05 19:53:10 +02:00
|
|
|
% Optional Flam
|
|
|
|
optflam = #(autohandFunc optflamg optflamd)
|
|
|
|
optflamdr = #(autohandFunc optflamgdr optflamddr )
|
|
|
|
|
2015-11-05 01:39:52 +01:00
|
|
|
% Drag
|
2016-11-23 03:24:56 +01:00
|
|
|
drag = #(autohandFunc dragg dragd )
|
|
|
|
dragdr = #(autohandFunc draggdr dragddr )
|
2015-11-18 03:03:44 +01:00
|
|
|
% Open Drag
|
2016-11-23 03:24:56 +01:00
|
|
|
odrag = #(autohandFunc odragg odragd )
|
|
|
|
odragdr = #(autohandFunc odraggdr odragddr )
|
2015-11-05 01:39:52 +01:00
|
|
|
|
|
|
|
% Ruff
|
2016-11-23 03:24:56 +01:00
|
|
|
ruff = #(autohandFunc ruffg ruffd )
|
|
|
|
ruffdr = #(autohandFunc ruffgdr ruffddr )
|
2015-11-05 01:39:52 +01:00
|
|
|
|
|
|
|
% Swiss Ruff
|
2016-11-23 03:24:56 +01:00
|
|
|
sruff = #(autohandFunc sruffg sruffd )
|
|
|
|
sruffdr = #(autohandFunc sruffgdr sruffddr )
|