diff --git a/README.md b/README.md index e3b2782..894ef4f 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ You can use every regular drum character (such as `sn` or `bd`), as `d` and `g` } } ``` +(see ./example.ly) ### Embellishments (Side) diff --git a/cheatsheet.ly b/cheatsheet.ly index 05c3e84..d81b90b 100644 --- a/cheatsheet.ly +++ b/cheatsheet.ly @@ -147,32 +147,6 @@ } } - - -\pageBreak -\score { - \new PipeBandDrumStaff \with { - instrumentName = "Standard 6/8" - } { - \drummode { - \time 6/8 - \repeat volta 2 { - \partial 8 d8:32(_"7" | - g8.[) g16 \dragd d8] d8.[ d16 \dragg g8] | - g8.[ \dragd d16 d8] d8.[ d16 \dragg g8] | - \flamddr d8. d16 g8 d4.:32(_"13" | - d8.) g16 d8 \flamg g4 d8:32(_"7" \fr | - \break - g8.[) g16 \dragd d8] d8.[ d16 \dragg g8] | - g8.[ \dragd d16 d8] d8.[ d16 \dragg g8] | - \flamddr d8. d16:64(_"5" d8) \flamd d8. d16 \flamg g8 | - d8.:32(_"5" d16) \flamg g8 \flamd d4 \fr s8 | - } - } - } - \addlyrics { - } -} % # Writing parts % rolls % tuplets diff --git a/cheatsheet.pdf b/cheatsheet.pdf index dfc1ba8..5a65c10 100644 Binary files a/cheatsheet.pdf and b/cheatsheet.pdf differ diff --git a/example.ly b/example.ly new file mode 100644 index 0000000..2b2e20c --- /dev/null +++ b/example.ly @@ -0,0 +1,93 @@ +% This file compiles with at least version 2.19.80 +\version "2.19.80" + +% Include lilydrum before any music is defined +% it *will* complain otherwise about the d's and the g's +\include "lilydrum.ly" + +% Give it a title with standard settings +\header { title = "Standards 6/8" } + +% Change Options for printing +\layout { + % Remove the indent in the first system + indent = 0.0 +} + +% Start the score +\score { + % We want a drumstaff regularly used for pipebands + \new PipeBandDrumStaff { + % Signal lilypond we will be using drumnotation + \drummode { + % The time signature is 6/8 + \time 6/8 + % Start the bar as a repeat with an anacrusis + \repeat volta 2 { + \partial 8 + % Regularly the format is A - B - A - C + % so we use an unfolded repeat with alternatives + % to keep us from writing A twice + % You could also use variables here + \repeat unfold 2 { + % Start with a seven roll + % Then continue with a few drags + % Normally beaming does not need to specified + % Except for drags, they break the automatic beaming + d8:32( | + g8.)[ g16 \drag d8] d8.[ d16 \drag g8] | + g8.[ \drag d16 d8] d8.[ d16 \drag g8] | + } \alternative { + % The first alternative + { + % The next part is played in unison the first time through + \tutti { + \flam d8. d16 g8 d4.:32( | + d8.) g16 d8 \flam g4 + } + } + % The second alternative + { + % This part is also played in unison the first time through + \tutti{ + \flam d8. d16:64( d8) \flam d8. d16 \flam g8 | + d8.:32( d16) \flam g8 \flam d4 + } + } + } + % Pad the score a bit so we can make sure we are at the end of a bar + % This spacing note is of the time we used for the upbeat + s8 | + } + + % Make sure there is a newline for the next few measures + \break + + % Let's try again with another line + % This one containing a few triplets + \repeat volta 2 { + \partial 8 + \repeat unfold 2 { + d8:32( | + \tuplet 3/2 { g8) d g } \flam d8 \tuplet 3/2 { d8 g d } \flam g8 | + % Note the \flamd, it is needed because \flam does not know which hand the next note is + % This is a todo + \tuplet 3/2 { d8 g d-> } \tuplet 3/2 { g8 d g } \flamd \tuplet 3/2 { d8 g8. d16 } | + + } \alternative { + % We don't actually need the outermost braces of the alternatives used in the first line + \tutti { + \flam d8. d16 g8 d4.:32( | + d8.) g16 d8 \flam g4 + } + + \tutti{ + \flam d8. d16:64( d8) \flam d8. d16 \flam g8 | + d8.:32( d16) \flam g8 \flam d4 + } + } + s8 | + } + } + } + } diff --git a/example.pdf b/example.pdf new file mode 100644 index 0000000..f762ffc Binary files /dev/null and b/example.pdf differ diff --git a/lib/embellishments.ily b/lib/embellishments.ily index afc0daa..8e441b5 100644 --- a/lib/embellishments.ily +++ b/lib/embellishments.ily @@ -20,32 +20,32 @@ drumgrace = #(define-music-function (parser location notes ) ( ly:music? ) #{ #}) % Flams -flamd = \drummode { \drumgrace { g8 } } % Flam right -flamg = \drummode { \drumgrace { d8 } } % Flam left +flamd = \drummode { \drumgrace { g8 } } % Flam right +flamg = \drummode { \drumgrace { d8 } } % Flam left flamddr = \drummode { \drumgrace { g8\dr } } % Flam right with start repeat flamgdr = \drummode { \drumgrace { d8\dr } } % Flam left with start repeat % Drags -dragd = \drummode { \drumgrace { g16[ g] } } % Drag right -dragg = \drummode { \drumgrace { d16[ d] } } % Drag left +dragd = \drummode { \drumgrace { g16[ g] } } % Drag right +dragg = \drummode { \drumgrace { d16[ d] } } % Drag left dragddr = \drummode { \drumgrace { g16[\dr g] } } % Drag right with start repeat draggdr = \drummode { \drumgrace { d16[\dr d] } } % Drag left with start repeat % open drags -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 +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 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 % Ruff -ruffg = \drummode { \drumgrace { g16[ d g] } } % Ruff right -ruffd = \drummode { \drumgrace { d16[ g d] } } % Ruff left +ruffg = \drummode { \drumgrace { g16[ d g] } } % Ruff right +ruffd = \drummode { \drumgrace { d16[ g d] } } % Ruff left ruffgdr = \drummode { \drumgrace { g16[\dr d g] } } % Ruff right with start repeat ruffddr = \drummode { \drumgrace { d16[\dr g d] } } % Ruff left with start repeat % Swiss Ruff -sruffg = \drummode { \drumgrace { g16[ d d] } } % Swiss Ruff right -sruffd = \drummode { \drumgrace { d16[ g g] } } % Swiss Ruff left +sruffg = \drummode { \drumgrace { g16[ d d] } } % Swiss Ruff right +sruffd = \drummode { \drumgrace { d16[ g g] } } % Swiss Ruff left 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 @@ -56,9 +56,6 @@ sruffddr = \drummode { \drumgrace { d16[\dr g g] } } % Swiss Ruff left with sta #(define (autohandFunc left right) (define-music-function (parser location note) (ly:music? ) #{ - #(newline) - #(display "Fix autohand function for arbitrary depth") - #(if (string=? (symbol->string (ly:music-property note 'drum-type)) "left-hand") #{ $left #} #{ $right #}) @@ -71,7 +68,7 @@ sruffddr = \drummode { \drumgrace { d16[\dr g g] } } % Swiss Ruff left with sta % Flam flam = #(autohandFunc flamg flamd) -flamdr = #(autohandFunc flamgdr flamddr ) +flamdr = #(autohandFunc flamgdr flamddr ) % Drag drag = #(autohandFunc dragg dragd ) diff --git a/lib/flourishing.ily b/lib/flourishing.ily index c66aeec..60038cb 100644 --- a/lib/flourishing.ily +++ b/lib/flourishing.ily @@ -8,16 +8,13 @@ %---------------------------------------------------% splitTheFeather = ^\markup \center-column { \musicglyph #"noteheads.s2xcircle"} cartWheel = ^\markup \center-column { \musicglyph #"timesig.neomensural94" } -up = ^\markup \center-column {% Arrow-head and line do not line up nicely most of the time +up = ^\markup \center-column { \fontsize #5 \override #'(thickness . 2) - %\center-column { \combine -% \musicglyph #"arrowheads.open.11" \arrow-head #Y #UP ##f \draw-line #'(0 . -3) % draw stick - %} - } +} rswipe = ^\markup \center-column { \fontsize #5 @@ -337,12 +334,7 @@ flourish = #(define-music-function (parser location notes) (ly:music?) \revert Staff.NoteHead.style #}) -%scoop = ^\markup { -% \path #.2 #'( (moveto 0 0 ) -% (lineto 3 1 ) -% (lineto 6 0 ) -% ) -% } +% See issue #4 (https://github.com/kastdeur/lilydrum/issues/4) scoop = #(define-music-function (music) (ly:music?) #{ <>^"scoop"\startGroup diff --git a/lib/layout_tweaks.ily b/lib/layout_tweaks.ily index 866ee7a..ad84b20 100644 --- a/lib/layout_tweaks.ily +++ b/lib/layout_tweaks.ily @@ -1,8 +1,6 @@ % =================================================== % -% Layout tweaks for good defaults % +% Layout to define the PipeBandDrumStaff % % =================================================== % -#(newline) -#(display "Layout tweaks loaded") % Note name defs : % "d" for the right hand ("droite") and % "g" for the left hand ("gauche") @@ -29,6 +27,7 @@ drumPitchNames = \name PipeBandDrumStaff \alias DrumStaff + % The above style definitions are loaded drumStyleTable = #(alist->hash-table pipeband-style) % one line per staff @@ -98,10 +97,6 @@ drumPitchNames = \context { \Score \accepts "PipeBandDrumStaff" - - \override RehearsalMark.break-align-symbols = #'(clef) - \override RehearsalMark.padding = #3 - \override VoltaBracket.edge-height = #'(1.5 . 1.5) } \context { \StaffGroup diff --git a/lib/midi.ily b/lib/midi.ily index d09de4f..63f8ea9 100644 --- a/lib/midi.ily +++ b/lib/midi.ily @@ -1,7 +1,5 @@ % Add standard midi support, preferably able to % switch instruments for different staves -#(newline) -#(display "Midi Support loaded") bassPitchOne = #(ly:make-pitch -2 0 NATURAL) bassPitchTwo = #(ly:make-pitch -3 6 NATURAL) diff --git a/lib/rehearsal_marks.ily b/lib/rehearsal_marks.ily index 03a0e43..002decf 100644 --- a/lib/rehearsal_marks.ily +++ b/lib/rehearsal_marks.ily @@ -1,8 +1,7 @@ % ================================================= % % Rehearsal Marks % % ================================================= % -#(newline) -#(display "Rehearsal Marks loaded") + % From Svenax's bagpipemusic markText = #(define-music-function (parser location text) (string?) #{ \once \override Score.RehearsalMark #'self-alignment-X = #LEFT @@ -28,5 +27,6 @@ altBracket = #(define-music-function (parser location tag) (string?) #{ % Short al fine's and stuff -dacapoalfine = {\markTextEol "D.C. al fine" } +dcalfine = {\markTextEol "D.C. al Fine" } +dacapoalfine = {\markTextEol "Da Capo al Fine" } fine = {\markTextEol "Fine" }