From 3b80ad94739f7c5a3227b46912ce69b53d3194c9 Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Fri, 7 Aug 2015 10:23:05 +0200 Subject: [PATCH] Fixed the flam function, now useable for flams, drags, ruffs and swiss ruffs --- 2-4_marches/mackenzie_highlanders.side.ly | 14 +++--- lilydrum.ly | 57 ++++++++++++++++++++--- 2 files changed, 57 insertions(+), 14 deletions(-) diff --git a/2-4_marches/mackenzie_highlanders.side.ly b/2-4_marches/mackenzie_highlanders.side.ly index f3775aa..001a352 100755 --- a/2-4_marches/mackenzie_highlanders.side.ly +++ b/2-4_marches/mackenzie_highlanders.side.ly @@ -15,17 +15,17 @@ \drummode { \repeat volta 2{ \partial 8 d8:32( | - g8) \tuplet 3/2 { d16 g d } \flamg g16. d32-> g16. g32 | - \flamd d8 d8:32( g8:32)(-> \tuplet 3/2 { d16) g d } | + g8) \tuplet 3/2 { d16 g d } \flam g16. d32-> g16. g32 | + \flam d8 d8:32( g8:32)(-> \tuplet 3/2 { d16) g d } | - \flamg g8[ \dragd d16. d32]-> g16.[ \dragd d32 d16. g32] | + \flam g8[ \drag d16. d32]-> g16.[ \drag d32 d16. g32] | d4:32( d8) d8:32( | - g8) \tuplet 3/2 { d16 g d } \flamg g16. d32-> g16. g32 | - \flamd d8 d8:32( g8:32)(-> \tuplet 3/2 { d16) g d } | + g8) \tuplet 3/2 { d16 g d } \flam g16. d32-> g16. g32 | + \flam d8 d8:32( g8:32)(-> \tuplet 3/2 { d16) g d } | - \flamg g8-> \tuplet 3/2 { \flamd d16 g d-> } g16. g32 \flamd d8 | + \flam g8-> \tuplet 3/2 { \flam d16 g d-> } g16. g32 \flam d8 | d4:32( d8) } \break @@ -40,7 +40,7 @@ d8:32( \tuplet 3/2 { g16) d g-> } d8:32(-> g8:32)(-> | \tuplet 3/2 { d16) g d->} g16. g32 d8:32(-> \tuplet 3/2 { g16) d g } | - \flamg g8-> \tuplet 3/2 { \flamd d16 g d-> } g16. g32 \flamd d8 | + \flam g8-> \tuplet 3/2 { \flam d16 g d-> } g16. g32 \flam d8 | d4:32( d8) } } diff --git a/lilydrum.ly b/lilydrum.ly index 999d1c3..20a0acf 100755 --- a/lilydrum.ly +++ b/lilydrum.ly @@ -18,6 +18,7 @@ } %} +#(ly:set-option 'point-and-click #f) % Note name defs : % "d" for the right hand ("droite") and @@ -128,7 +129,7 @@ eighthBeaming = { } sixteenthBeaming = { \set Score.baseMoment = #(ly:make-moment 1 16) - \set Score.beatStructure = #'( 2 2 ) + \set Score.beatStructure = #'( 4 4 4 4 ) } \layout{ @@ -144,6 +145,9 @@ sixteenthBeaming = { % I like being able to identify the 8th notes subdivideBeams = ##t + strictBeatBeaming = ##t + + \override TupletBracket.bracket-visibility = ##f } } @@ -183,13 +187,18 @@ dynLine = #(define-music-function % Flams, Drags & the sort % % ================================================= % drumgrace = #(define-music-function (parser location notes) (ly:music?) #{ + % Set settings \stemUp + \once \override Beam.positions = #'(1.8 . 1.8) + \once \override DrumStaff.Stem.length = #5 \override Flag.stroke-style = #"grace" - \once \override Beam.positions = #'(2 . 2) - \once \override DrumStaff.Stem.length = #6 - \override Score.GraceSpacing #'spacing-increment = #0 + \override Score.GraceSpacing #'spacing-increment = #1 \override Score.Stem #'beamlet-max-length-proportion = #'(0.5 . 0.5) - \tiny \grace $notes \normalsize + + % Print notes + \grace $notes + + % Revert back \revert Score.Stem #'beamlet-default-length \revert Flag.stroke-style \stemNeutral @@ -220,13 +229,47 @@ sruffgdr = \drummode { \drumgrace { g16[\startGroup d d] }} % with start repeat sruffd = \drummode { \drumgrace { d16[ g g] }} % right Swiss Ruff sruffddr = \drummode { \drumgrace { d16[\startGroup g g] }} % with start repeat - +% Embellishment functions, automatic left or right +% Flam flam = #(define-music-function (parser location note) (ly:music?) #{ % is note right-handed? then \flamd % if left, then \flamg + #(if (string=? (symbol->string (ly:music-property note 'drum-type)) "left-hand") + #{ \flamg #} + #{ \flamd #}) + % print the note, else it won't show up + $note +#}) - #(if #f \flamg ($\flamd)) % fix \flam{gd} return +% Drag +drag = #(define-music-function (parser location note) (ly:music?) #{ + % is note right-handed? then \flamd + % if left, then \flamg + #(if (string=? (symbol->string (ly:music-property note 'drum-type)) "left-hand") + #{ \dragg #} + #{ \dragd #}) + % print the note, else it won't show up + $note +#}) +% Ruff +ruff = #(define-music-function (parser location note) (ly:music?) #{ + % is note right-handed? then \flamd + % if left, then \flamg + #(if (string=? (symbol->string (ly:music-property note 'drum-type)) "left-hand") + #{ \ruffg #} + #{ \ruffd #}) + % print the note, else it won't show up + $note +#}) + +% Swiss Ruff +sruff = #(define-music-function (parser location note) (ly:music?) #{ + % is note right-handed? then \flamd + % if left, then \flamg + #(if (string=? (symbol->string (ly:music-property note 'drum-type)) "left-hand") + #{ \sruffg #} + #{ \sruffd #}) % print the note, else it won't show up $note #}) \ No newline at end of file