diff --git a/notation-snippets/pipeband-drumming/.gitignore b/notation-snippets/pipeband-drumming/.gitignore new file mode 100755 index 00000000..128ea989 --- /dev/null +++ b/notation-snippets/pipeband-drumming/.gitignore @@ -0,0 +1,3 @@ +*.pdf +/pdf +/tmp diff --git a/notation-snippets/pipeband-drumming/.lilypipe.ly.swp b/notation-snippets/pipeband-drumming/.lilypipe.ly.swp new file mode 100644 index 00000000..fa541799 Binary files /dev/null and b/notation-snippets/pipeband-drumming/.lilypipe.ly.swp differ diff --git a/notation-snippets/pipeband-drumming/README.md b/notation-snippets/pipeband-drumming/README.md new file mode 100644 index 00000000..4d8bc79d --- /dev/null +++ b/notation-snippets/pipeband-drumming/README.md @@ -0,0 +1,48 @@ +From https://github.com/kastdeur/lilydrum + +To make a pipeband drum staff use +"\new PipeBandDrumStaff " + +It accepts everything a drumstaff accepts. + +Music is defined in \drummode. +You can use every regular drum character, as "d" and "g" are appended to the list. + + +Embellishments (Side) +------------- +Flams and Drags can be added using "\flam" and "\drag". They can determine whether to be left or right by themselves for simple expressions. +If a certain hand is needed they can be inserted directly by appending "d" or "g" to "flam","drag",.. +A "\flam d" is equal to "\flamd d" + +There are currently 4 shortcuts: +\flam - A Flam +\drag - A Drag +\ruff - A Ruff +\sruff - A Swiss Ruff + +appending dr to the above shortcuts triggers the unison bracket. + +Flourishing (Tenor) +------------- +A few flourishes have been added, most are from the EUSPBA: +\splitTheFeather +\cartWheel +\up +\blfy - butterfly +\rblfy - reverse butterfly +\rthrow - throw right +\lthrow - throw left +\bthrow - throw both +\rpush - push right +\lpush - push left +\bpush - push both +\andrewStop - St. Andrew's Stop +\stop + +Scoops have not been created yet + + + + + diff --git a/notation-snippets/pipeband-drumming/definitions.ily b/notation-snippets/pipeband-drumming/definitions.ily new file mode 100644 index 00000000..7eefda0a --- /dev/null +++ b/notation-snippets/pipeband-drumming/definitions.ily @@ -0,0 +1,31 @@ +\version "2.16.2" +\header { + snippet-title = "Pipeband Drumming Staff" + snippet-author = "Eric Teunis de Boone" + snippet-author-email = "ericteunis@gmail.com" + snippet-source = "" + snippet-description = \markup { + Add (left,right) hand definitions to the drumPitchTable. + This code provides a new "PipebandDrumStaff". + + As music, it provides shortcuts for flourishes, embellishments(such as flams/drags/..) and special sticking. + There was an effort made for midi output + } + tags = "pipeband, drumming, lilydrum" + status = "ready" +} + +% Note name defs : +% "d" for the right hand ("droite") and +% "g" for the left hand ("gauche") +%----------------------------------------- + +#(ly:set-option 'point-and-click #f) +#(ly:set-option 'relative-includes #t) + +\include "./includes/layout_tweaks.ily" % Code for the Staff +\include "./includes/musical_functions.ily" % +\include "./includes/embellishments.ily" +\include "./includes/flourishing.ily" +\include "./includes/special_sticking.ily" +\include "./includes/midi.ily" diff --git a/notation-snippets/pipeband-drumming/example.ly b/notation-snippets/pipeband-drumming/example.ly new file mode 100644 index 00000000..cfface41 --- /dev/null +++ b/notation-snippets/pipeband-drumming/example.ly @@ -0,0 +1,209 @@ +\version "2.19.45" + +\include "./definitions.ly" + + +\paper { + indent = 0\mm + ragged-bottom = ##t +} +\layout { + indent = 30\mm + \context { + \Score + \override NonMusicalPaperColumn #'line-break-permission = ##f + } +} + +\header { + title = "Cheat sheet for entering pipeband drumming music" + subtitle = "Intended for Lilypond 2.18 or better" + tagline = \markup { "ET de Boone, Seaforths of Holland" } +} +\score { + \new PipeBandDrumStaff { + \time 2/4 + \drummode { + d4 g + <> r + \crossstick d \crossstick g + \rimshot d \rimshot g + \backstick d \backstick g + } + } + \addlyrics { + "d" "g" + "<>" + "\crossstick d" "\crossstick g" + "\rimshot d" "\rimshot g" + "\backstick d" "\backstick g" + } + \header { + title = \markup \column {\line{Plain Notes}} + subtitle = "" + } +} + +\score { + \new PipeBandDrumStaff { + \tempo 2/4 + \drummode { + d^\splitTheFeather g^\cartWheel + d^\up r4 + d8 g d4 + \cart d4 \stf d4 + \flourish { d4 g d g } + } + } + \addlyrics { + "\splitTheFeather" "\cartWheel" + "\up" + "d" "g" "d" + "\cart" "\stf" + "\flourish {" "d4" "g" "d" "g}" + } + \header { + title = \markup \column {\line{Flourishing I}} + subtitle = "" + } +} +\score { + \new PipeBandDrumStaff { + \drummode { + d^\lthrow g^\rthrow + d^\bthrow r | + + d^\lpush g^\rpush + d^\bpush r | + + d^\andrewStop d^\quiggs + d^\stop r | + + d^\blfy d^\rblfy + r r | + } + } + \addlyrics { + "\lthrow" "\rthrow" "\bthrow" + "\lpush" "\rpush" "\bpush" + "\andrewStop" "\quiggs" "\stop" + "\blfy" "\rblfy" + } + \header { + title = \markup \column {\line{Flourishing II}} + subtitle = "" + } +} +\score { + \new PipeBandDrumStaff { + \time 2/4 + \drummode { + \flam d \flam g + \drag d \drag g + \odrag d \odrag g + \ruff d \ruff g + \sruff d \sruff g + } + } + \addlyrics { + "\flam d" "\flam g" + "\drag d" "\drag g" + "\odrag d" "\odrag g" + "\ruff d" "\ruff g" + "\sruff d" "\sruff g" + } + \header { + title = \markup \line{ Embellishments } + subtitle = "" + } +} +\score { + \new PipeBandDrumStaff { + \time 4/4 + \drummode { + \flamg d \flamd g + \flamg g \flamd d + \dragg d \dragd g + \dragg g \dragd d + \odragg d \odragd g + \odragg g \odragd d + \break + \ruffg d \ruffd g + \ruffg g \ruffd d + \sruffg d \sruffd g + \sruffg g \sruffd d + } + } + \addlyrics { + "\flamg d" "\flamd g" + "\flamg g" "\flamd d" + "\dragg d" "\dragd g" + "\dragg g" "\dragd d" + "\odragg d" "\odragd g" + "\odragg g" "\odragd d" + "\ruffg d" "\ruffd g" + "\ruffg g" "\ruffd d" + "\sruffg d" "\sruffd g" + "\sruffg g" "\sruffd d" + } + \header { + title = \markup \column { \line {Embellishments: Forced Hand}} + subtitle = "" + } +} +\score { + \new PipeBandDrumStaff { + \time 4/4 + \eighthBeaming + \drummode { + d4:32( d8:32)(-> g8) \flam d4 r8 d8:32( \dr | + \tuplet 3/2 { g16[) d g } \drag d16. g32] d32 g d g d16. g32-> d16. d32 \flam g4 s8 + } + } + \addlyrics { + "d4:32(" "\\triplet " -- "\\flam d16." "g32" -- "\\drag g16" -- "\\triplet" "g:64" "d-> }" + } + \header { + title = "Rolls" + subtitle = "" + } +} + + + +\pageBreak +\score { + \new PipeBandDrumStaff { + \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 { + \partial 8 + "d8:32(" "\\triplet " -- "\\flam d16." "g32" -- "\\drag g16" -- "\\triplet" "g:64" "d-> }" + } + + \header { + title = "And now for something completely standard" + subtitle = "" + } +} +% # Writing parts +% rolls +% tuplets +% tutti +% accents ( > v ^) +% + diff --git a/notation-snippets/pipeband-drumming/includes/embellishments.ily b/notation-snippets/pipeband-drumming/includes/embellishments.ily new file mode 100644 index 00000000..ca2a2c32 --- /dev/null +++ b/notation-snippets/pipeband-drumming/includes/embellishments.ily @@ -0,0 +1,89 @@ +% ================================================= % +% Flams, Drags & the sort % +% ================================================= % +drumgrace = #(define-music-function (parser location notes ) ( ly:music? ) #{ + % Set settings + \stemUp + \once \override Beam.positions = #'(2 . 2) + \once \override DrumStaff.Stem.length = #5 + \override Flag.stroke-style = #"grace" + \override Score.GraceSpacing #'spacing-increment = #0 + \override Score.Stem #'beamlet-max-length-proportion = #'(0.5 . 0.5) + + % Print notes + \small \grace $notes + + % Revert back + \revert Score.Stem #'beamlet-default-length + \revert Flag.stroke-style + \stemNeutral +#}) + +% Flams +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 +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[ <>^"o" g] } } % Open Drag right +odragg = \drummode { \drumgrace { d16[ <>^"o" d] } } % Open Drag left +odragddr = \drummode { \drumgrace { g16[\dr <>^"o" g] } } % Open Drag right with start repeat +odraggdr = \drummode { \drumgrace { d16[\dr <>^"o" d] } } % Open Drag left with start repeat + +% Ruff +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 +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 + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Embellishment functions, automatic left or right %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +#(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 #}) + + % print the note, else it won't show up + $note + #} + ) +) + +% Flam +flam = #(autohandFunc flamg flamd) +flamdr = #(autohandFunc flamgdr flamddr ) + +% Drag +drag = #(autohandFunc dragg dragd ) +dragdr = #(autohandFunc draggdr dragddr ) +% Open Drag +odrag = #(autohandFunc odragg odragd ) +odragdr = #(autohandFunc odraggdr odragddr ) + +% Ruff +ruff = #(autohandFunc ruffg ruffd ) +ruffdr = #(autohandFunc ruffgdr ruffddr ) + +% Swiss Ruff +sruff = #(autohandFunc sruffg sruffd ) +sruffdr = #(autohandFunc sruffgdr sruffddr ) diff --git a/notation-snippets/pipeband-drumming/includes/flourishing.ily b/notation-snippets/pipeband-drumming/includes/flourishing.ily new file mode 100644 index 00000000..2a9f9812 --- /dev/null +++ b/notation-snippets/pipeband-drumming/includes/flourishing.ily @@ -0,0 +1,347 @@ +% ================================================= % +% Tenor Flourishing % +% ================================================= % +% Part of lilydrum + +%---------------------------------------------------% +% Single note flourish definitions +%---------------------------------------------------% +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 + \fontsize #5 + \override #'(thickness . 2) + %\center-column { + \combine +% \musicglyph #"arrowheads.open.11" + \arrow-head #Y #UP ##f + \draw-line #'(0 . -3) % draw stick + %} + } +blfy = ^\markup \center-column { &infty; } +rblfy = ^\markup \center-column { + \line{ + \combine + \arrow-head #X #LEFT ##f + \draw-line #'(3 . 0 ) + } + \line { &infy; } +} + +rthrow = ^\markup \center-column { + \postscript #" + /width 2 def + /radius .4 def + /filled 1 def + /height .6 def + /fwidth width radius add def + + /dotstick { + 0 0 moveto + 0 0 closedpoint + 0 0 moveto + fwidth neg 0 lineto + fwidth neg height neg moveto + fwidth neg height lineto + stroke } def + + newpath + fwidth height translate + 0 0 dotstick + stroke + " + } +lthrow = ^\markup \center-column { + \postscript #" + /width 2 def + /radius .4 def + /filled 1 def + /height .6 def + /fwidth width radius add def + + /dotstick { + radius 0 closedpoint + radius 0 moveto + fwidth 0 lineto + fwidth height neg moveto + fwidth height lineto + stroke } def + + newpath + 0 height translate + 0 0 dotstick + stroke + " } +bthrow = ^\markup \center-column { + \postscript #" + /width 2 def + /radius .4 def + /filled 1 def + /height .6 def + /fwidth width radius add def + + /closedpoint { + radius 0 360 arc + gsave filled neg + setgray fill + grestore + stroke } def + + /dotstick { + fwidth 0 closedpoint + fwidth 0 moveto + 0 0 lineto + 0 height neg moveto + 0 height lineto + stroke } def + + newpath + fwidth height translate + 0 0 dotstick + 180 rotate + fwidth 0 dotstick + stroke + " + } +rpush = ^\markup \center-column { + \postscript #" + /width 2 def + /radius .4 def + /filled 1 def + /height .6 def + /fwidth width radius add def + + /closedpoint { + radius 0 360 arc + gsave filled neg + setgray fill + grestore + stroke } def + + /dotstick { + 0 0 moveto + 0 0 closedpoint + 0 0 moveto + fwidth neg 0 lineto + fwidth radius add 2 div neg 0 moveto + fwidth radius add 2 div neg radius neg + radius 90 450 arc + gsave filled + setgray fill + grestore + + fwidth neg height neg moveto + fwidth neg height lineto + stroke } def + + newpath + fwidth height translate + 0 0 dotstick + stroke + " + } +lpush = ^\markup \center-column { + \postscript #" + /width 2 def + /radius .4 def + /filled 1 def + /height .6 def + /fwidth width radius add def + + /closedpoint { + radius 0 360 arc + gsave filled neg + setgray fill + grestore + stroke } def + + + /dotstick { + radius 0 closedpoint + radius 0 moveto + fwidth 0 lineto + fwidth radius add 2 div 0 moveto + fwidth radius add 2 div radius neg + radius 90 450 arc + gsave filled + setgray fill + grestore + fwidth height neg moveto + fwidth height lineto + stroke } def + + newpath + 0 height translate + 0 0 dotstick + stroke + " } +bpush = ^\markup \center-column { + \postscript #" + /width 2 def + /radius .4 def + /filled 1 def + /height .6 def + /fwidth width radius add def + + /closedpoint { + radius 0 360 arc + gsave filled neg + setgray fill + grestore + stroke } def + + + /dotstick { + fwidth 0 closedpoint + fwidth 0 moveto + 0 0 lineto + fwidth sub 2 div 0 moveto + fwidth radius sub 2 div radius neg + radius 90 450 arc + gsave filled + setgray fill + grestore + + 0 height neg moveto + 0 height lineto + stroke } def + + newpath + fwidth height translate + 0 0 dotstick + -1 1 scale + fwidth 0 dotstick + stroke + " + } + +andrewStop = ^\markup \center-column { + \postscript #" + /width .4 def + /radius width def + /filled 1 def + /height 2 def + /fheight height radius add def + + /closedpoint { + radius 0 360 arc + gsave filled neg + setgray fill + grestore + stroke } def + /dotstick { + 0 fheight closedpoint + 0 fheight moveto + 0 0 lineto + width neg 0 lineto + width 0 lineto + stroke } def + + newpath + 0 0 translate + -45 rotate + newpath + 0 0 dotstick + stroke + 45 rotate + fheight .5 sqrt mul 0 translate + 45 rotate + 0 0 dotstick + stroke + " + } +quiggs = ^\markup \center-column { + %\with-dimensions #'(-0.2 . 2.0) #'(0 . 2.0) + \postscript #" + /width 1 def + /radius .4 def + /filled 1 def + /height 2 def + /fheight height radius add def + + /closedpoint { + radius 0 360 arc + gsave filled neg + setgray fill + grestore + stroke } def + /dotstick { + 0 height closedpoint + 0 height moveto + 0 0 lineto + stroke } def + /invdotstick { + 0 radius closedpoint + 0 radius moveto + 0 fheight lineto + stroke } def + + newpath + 0 0 dotstick + stroke + width 0 translate + newpath + 0 0 invdotstick + stroke + " + } + +stop = ^\markup \center-column { + %\with-dimensions #'(-0.2 . 2.0) #'(0 . 2.0) + \postscript #" + /height 2 def + /width .4 def + /radius width def + /filled 0 def + /fheight height radius add def + width 0 translate + + newpath + 0 fheight radius 0 360 arc gsave filled neg setgray fill grestore stroke + 0 fheight moveto 0 0 lineto + width neg 0 moveto width 0 lineto + stroke + " + } +%---------------------------------------------------% +% Multiple note flourish definitions +%---------------------------------------------------% +flourish = #(define-music-function (parser location notes) (ly:music?) + #{ + \temporary \override Staff.NoteHead.style = #'cross + $notes + \revert Staff.NoteHead.style + #}) + +scoop = ^\markup { + \path #.2 #'( (moveto 0 0 ) + (lineto 3 1 ) + (lineto 6 0 ) + ) + } +scoopo = #(define-music-function (parser location beg notes) (ly:music? ly:music?) + #{ + %Set spanner from first to last note + $beg + \startGroup + $notes + \stopGroup + #}) +sdcoop = #(define-music-function (parser location notes end) (ly:music? ly:music?) + #{ + $notes + $end + #}) +%---------------------------------------------------% +% music function definitions +%---------------------------------------------------% +#(define (buildFlourishFunc flourish) + (define-music-function (parser location note) (ly:music? ) + #{ + <>-$flourish $note + #} + ) +) +cart = #(buildFlourishFunc cartWheel) +stf = #(buildFlourishFunc splitTheFeather) + diff --git a/notation-snippets/pipeband-drumming/includes/layout_tweaks.ily b/notation-snippets/pipeband-drumming/includes/layout_tweaks.ily new file mode 100644 index 00000000..61af11de --- /dev/null +++ b/notation-snippets/pipeband-drumming/includes/layout_tweaks.ily @@ -0,0 +1,109 @@ +% =================================================== % +% Layout tweaks for good defaults % +% =================================================== % +#(newline) +#(display "Layout tweaks loaded") +% Note name defs : +% "d" for the right hand ("droite") and +% "g" for the left hand ("gauche") +drumPitchNames = +#(append '( + (d . right-hand) + (g . left-hand) + (right . right-hand) + (left . left-hand) + ) + drumPitchNames +) + +% Position according to the line : right hand above and left hand below +#(define pipeband-style '( + (right-hand () #f 1) + (left-hand () #f -1) + ) +) + +\layout { + indent = 0.0 + \context { + \DrumStaff + \name PipeBandDrumStaff + \alias DrumStaff + + drumStyleTable = #(alist->hash-table pipeband-style) + + % one line per staff + \override StaffSymbol.line-positions = #'(0) + + % bar line height + \override BarLine.bar-extent = #'(-2 . 2) + + % stems + \override Stem.direction = #DOWN % stems down + \override Stem.length = #8.5 % unbeamed stems length + \override Stem.stemlet-length = #1 % short stem length + + % beams + \override Beam.beam-thickness = #0.4 % beam-thickness + \override Beam.positions = #'(-3.8 . -3.8) % fix beams on one height + + % slurs and ties + \override Slur.direction = #UP % Slurs on top + \override Tie.direction = #UP % Ties on top + + % dynamics up + \dynamicUp + + % slurs below rolls number + %\override TextScript.outside-staff-priority = ##f + %\override TextScript.side-axis = #0 + %\override TextScript.staff-padding = #3 + %\override TextScript.X-offset = #1 % padding to stems + %\override TextScript.extra-offset = #'(-0.3 . 0) + + % tremolos (rolls) + \override StemTremolo.slope = #0.5 % slope + \override StemTremolo.beam-width = #1.5 % beam-width + \override StemTremolo.beam-thickness = #0.3 % beam-thickness + \override StemTremolo.extra-offset = #'(0 . 0.3) % vertical pos. position + + \override TupletBracket.bracket-visibility = #'if-no-beams + + % unison brackets + \consists "Horizontal_bracket_engraver" + \override HorizontalBracket.staff-padding = #3.5 % staff-padding + \override HorizontalBracket.direction = #UP % brackets above the staff + \override HorizontalBracket.bracket-flare = #'(0 . 0) % vertical brackets + + subdivideBeams = ##t + strictBeatBeaming = ##t + \numericTimeSignature + + %Because it's funny + \override Clef.stencil = # + (lambda (grob)(grob-interpret-markup grob + #{ \markup\combine + \musicglyph #"clefs.percussion" + \translate #'(2 . 0) + \override #'(baseline-skip . 1) + \column { + "R" + "L" + } + #} + )) + + } + \context { + \Score + \accepts "PipeBandDrumStaff" + + \override RehearsalMark.break-align-symbols = #'(clef) + \override RehearsalMark.padding = #3 + \override VoltaBracket.edge-height = #'(1.5 . 1.5) + } + \context { + \StaffGroup + \accepts "PipeBandDrumStaff" + } +} diff --git a/notation-snippets/pipeband-drumming/includes/midi.ily b/notation-snippets/pipeband-drumming/includes/midi.ily new file mode 100644 index 00000000..5e9c8c4a --- /dev/null +++ b/notation-snippets/pipeband-drumming/includes/midi.ily @@ -0,0 +1,67 @@ +% 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) + +sidePitchOne = #(ly:make-pitch -2 2 DOUBLE-FLAT) +sidePitchTwo = #(ly:make-pitch -2 1 NATURAL) + +tenorPitchOne = #(ly:make-pitch -2 3 NATURAL) +tenorPitchTwo = #(ly:make-pitch -2 4 NATURAL) +tenorPitchThree = #(ly:make-pitch -2 5 NATURAL) +tenorPitchFour = #(ly:make-pitch -2 6 NATURAL) +tenorPitchFive = #(ly:make-pitch -1 0 NATURAL) +tenorPitchSix = #(ly:make-pitch -1 1 NATURAL) +tenorPitchSeven = #(ly:make-pitch -2 3 NATURAL) +tenorPitchEight = #(ly:make-pitch -2 3 NATURAL) +tenorPitchNine = #(ly:make-pitch -2 3 NATURAL) +tenorPitchTen = #(ly:make-pitch -2 3 NATURAL) +tenorPitchEleven = #(ly:make-pitch -2 3 NATURAL) + +% Default Pitches +sideDefault = \sidePitchTwo +bassDefault = \bassPitchTwo +tenorDefault = \tenorPitchSeven + +midiDrumPitches.right-hand = \sideDefault +midiDrumPitches.left-hand = \sideDefault + +\midi { + \context { + \DrumStaff + \name PipeBandDrumStaff + \alias DrumStaff + + % trying midi are you? + midiInstrument = #"drums" + + drumPitchTable = #(alist->hash-table midiDrumPitches) + } + \context { + \Score + \accepts "PipeBandDrumStaff" + } + \context { + \StaffGroup + \accepts "PipeBandDrumStaff" + } + +} + +%setMidiHands = +%#(define-music-function +% (parser location pitch) +% (ly:pitch?) +% ( +% (display "Set Hands to pitch") +% #{ +% midiDrumPitches.right-hand = #pitch +% midiDrumPitches.left-hand = #pitch +% +% drumPitchTable = #(alist->hash-table midiDrumPitches) +% #} +% ) +%) diff --git a/notation-snippets/pipeband-drumming/includes/musical_functions.ily b/notation-snippets/pipeband-drumming/includes/musical_functions.ily new file mode 100644 index 00000000..4dfe2553 --- /dev/null +++ b/notation-snippets/pipeband-drumming/includes/musical_functions.ily @@ -0,0 +1,60 @@ +% ================================================= % +% Musical Functions % +% ================================================= % +% Part of lilydrum + +eighthBeaming = { + \set baseMoment = #(ly:make-moment 1/8) + \set beatStructure = #'( 2 ) +} +eighthReelBeaming = { + \set baseMoment = #(ly:make-moment 1/8) + \set beatStructure = #'( 4 ) +} +eighthCompoundBeaming = { + \set baseMoment = #(ly:make-moment 1/8) + \set beatStructure = #'( 3 ) +} + +sixteenthBeaming = { + \set baseMoment = #(ly:make-moment 1/16) + \set beatStructure = #'( 4 ) +} +sixteenthReelBeaming = { + \set baseMoment = #(ly:make-moment 1/16) + \set beatStructure = #'( 8 ) +} +sixteenthCompoundBeaming = { + \set baseMoment = #(ly:make-moment 1/16) + \set beatStructure = #'( 6 ) +} +% triplet +triplet = #(define-music-function (parser location notes) (ly:music?) #{ \tuplet 3/2 { $notes } #}) + +% dynamics +v = #(define-event-function (parser location) () #{ \upbow #}) + +% dynamics with extended lines +dynLine = #(define-music-function + (parser location text) + (markup?) + #{ + \once \override TextSpanner.style = #'line + \once \override TextSpanner.bound-details.left.text = \markup { + \combine + \draw-line #'(0 . -1) + \draw-line #'(1 . 0) + \dynamic #text + } + \once \override TextSpanner.bound-details.right.text = \markup { \draw-line #'(0 . -1) } + #}) + +% unison brackets +% still to add: a little 'u' +dr = #(define-event-function (parser location) () #{ \startGroup #}) +fr = #(define-event-function (parser location) () #{ \stopGroup #}) +tutti = #(define-event-function (parser location notes) (ly:music?) #{ + \startGroup + $notes + \stopGroup + #}) diff --git a/notation-snippets/pipeband-drumming/includes/rehearsal_marks.ily b/notation-snippets/pipeband-drumming/includes/rehearsal_marks.ily new file mode 100644 index 00000000..e95408b1 --- /dev/null +++ b/notation-snippets/pipeband-drumming/includes/rehearsal_marks.ily @@ -0,0 +1,32 @@ +% ================================================= % +% Rehearsal Marks % +% ================================================= % +#(newline) +#(display "Midi Support loaded") +% From Svenax's bagpipemusic +markText = #(define-music-function (parser location text) (string?) #{ + \once \override Score.RehearsalMark #'self-alignment-X = #LEFT + \mark \markup $text +#}) + +markTextEol = #(define-music-function (parser location text) (string?) #{ + \once \override Score.RehearsalMark #'break-visibility = #end-of-line-visible + \once \override Score.RehearsalMark #'self-alignment-X = #RIGHT + \mark \markup $text +#}) + +markTextEolDown = #(define-music-function (parser location text) (string?) #{ + \once \override Score.RehearsalMark #'break-visibility = #end-of-line-visible + \once \override Score.RehearsalMark #'self-alignment-X = #RIGHT + \once \override Score.RehearsalMark #'direction = #DOWN + \mark \markup $text +#}) +altBracket = #(define-music-function (parser location tag) (string?) #{ + \set Score.repeatCommands = #(list (list 'volta (markup #:text tag))) + #} +) + + +% Short al fine's and stuff +dacapoalfine = {\markTextEol "D.C. al fine" } + diff --git a/notation-snippets/pipeband-drumming/includes/special_sticking.ily b/notation-snippets/pipeband-drumming/includes/special_sticking.ily new file mode 100644 index 00000000..7d72d1e3 --- /dev/null +++ b/notation-snippets/pipeband-drumming/includes/special_sticking.ily @@ -0,0 +1,21 @@ +% ================================================= % +% Side Sticking (modifies note, or adds mark) % +% ================================================= % +% Part of lilydrum +backstick = #(define-music-function (parser location notes) (ly:music?) + #{ + \temporary \override Staff.NoteHead.style = #'cross + $notes + \revert Staff.NoteHead.style + #}) +crossstick = #(define-music-function (parser location notes) (ly:music?) + #{ + \temporary \override Staff.NoteHead.style = #'xcircle + $notes + \revert Staff.NoteHead.style + #}) +rimshot = #(define-music-function (parser location notes) (ly:music?) + #{ + $notes + + #})