From 0e32b8c7d75c8f6a2ceafc18b900c8cd08ff84d0 Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Wed, 27 Apr 2016 02:57:44 +0200 Subject: [PATCH] Update for inclusion files --- lilydrum/embellishments.ily | 41 +++++++------------- lilydrum/flourishing.ily | 10 ++++- lilydrum/layout_tweaks.ily | 4 +- lilydrum/midi.ily | 71 ++++++++++++++++++++-------------- lilydrum/musical_functions.ily | 4 ++ 5 files changed, 70 insertions(+), 60 deletions(-) diff --git a/lilydrum/embellishments.ily b/lilydrum/embellishments.ily index a622958..d0b17e5 100755 --- a/lilydrum/embellishments.ily +++ b/lilydrum/embellishments.ily @@ -54,47 +54,34 @@ sruffddr = \drummode { \drumgrace { d16[\startGroup g g] } } % Swiss Ruff left %% 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 +autohand = #(define-music-function (parser location note left right) (ly:music? ly:music? ly:music?) #{ + #(newline) + #(display "Fix autohand function for arbitrary depth") + #(if (string=? (symbol->string (ly:music-property note 'drum-type)) "left-hand") - #{ \flamg #} - #{ \flamd #}) + #{ $left #} + #{ $right #}) % print the note, else it won't show up $note #}) +% Flam +flam = #(define-music-function (parser location note) (ly:music?) #{ + \autohand $note { \flamg } { \flamd } +#}) + % 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 + \autohand $note \dragg \dragd #}) % Open Drag odrag = #(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") - #{ \odragg #} - #{ \odragd #}) - % print the note, else it won't show up - $note + \autohand $note \odragg \odragd #}) % 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 + \autohand $note \ruffg \ruffd #}) % Swiss Ruff diff --git a/lilydrum/flourishing.ily b/lilydrum/flourishing.ily index bb63976..9e6b193 100755 --- a/lilydrum/flourishing.ily +++ b/lilydrum/flourishing.ily @@ -44,6 +44,12 @@ sdcoop = #(define-music-function (parser location notes end) (ly:music? ly:music $end #}) -% stf = \splitTheFeather +stf = #(define-music-function (parser location note) (ly:music?) + #{ + $note ^\splitTheFeather + %\once \set TextScriptEvent.text = \splitTheFeather + #} +) + % cart = \cartWheel -% fl = \flourish \ No newline at end of file +% fl = \flourish diff --git a/lilydrum/layout_tweaks.ily b/lilydrum/layout_tweaks.ily index 717808c..f731ac6 100755 --- a/lilydrum/layout_tweaks.ily +++ b/lilydrum/layout_tweaks.ily @@ -24,6 +24,7 @@ drumPitchNames = ) \layout { + indent = 0.0 \context { \DrumStaff \name PipeBandDrumStaff @@ -31,9 +32,6 @@ drumPitchNames = drumStyleTable = #(alist->hash-table pipeband-style) - % trying midi are you? - \override DrumStaff.midiInstrument = #"drums" - % one line per staff \override StaffSymbol.line-positions = #'(0) diff --git a/lilydrum/midi.ily b/lilydrum/midi.ily index 17a2d6d..5e9c8c4 100644 --- a/lilydrum/midi.ily +++ b/lilydrum/midi.ily @@ -3,19 +3,41 @@ #(newline) #(display "Midi Support loaded") -midiDrumPitches = -#(append `( - (right-hand . ,(ly:make-pitch -2 2 DOUBLE-FLAT)) - (left-hand . ,(ly:make-pitch -2 2 DOUBLE-FLAT)) - ) - midiDrumPitches -) +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 { @@ -29,24 +51,17 @@ midiDrumPitches = } -side = { -% (ly:make-pitch -2 2 DOUBLE-FLAT) -% (ly:make-pitch -2 1 NATURAL) -} -bass = { -% (ly:make-pitch -3 6 NATURAL) -% (ly:make-pitch -2 0 NATURAL) -} -tenor = { -% (ly:make-pitch -2 3 NATURAL) -% (ly:make-pitch -2 4 NATURAL) -% (ly:make-pitch -2 5 NATURAL) -% (ly:make-pitch -2 6 NATURAL) -% (ly:make-pitch -1 0 NATURAL) -% (ly:make-pitch -1 1 NATURAL) -% (ly:make-pitch -2 3 NATURAL) -% (ly:make-pitch -2 3 NATURAL) -% (ly:make-pitch -2 3 NATURAL) -% (ly:make-pitch -2 3 NATURAL) -% (ly:make-pitch -2 3 NATURAL) -} +%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/lilydrum/musical_functions.ily b/lilydrum/musical_functions.ily index 7e34480..29b7a18 100755 --- a/lilydrum/musical_functions.ily +++ b/lilydrum/musical_functions.ily @@ -7,6 +7,10 @@ eighthBeaming = { \set baseMoment = #(ly:make-moment 1/8) \set beatStructure = #'( 2 2 ) } +eighthReelBeaming = { + \set baseMoment = #(ly:make-moment 1/8) + \set beatStructure = #'( 4 4) +} compoundEighthBeaming = { \set baseMoment = #(ly:make-moment 1/8) \set beatStructure = #'( 3 )