From 27bdb5561b12fc0a2d354a654ce352beb6c99e39 Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Mon, 21 Mar 2016 16:16:22 +0100 Subject: [PATCH] Rudimental midi support --- lilydrum.ly | 1 + lilydrum/layout_tweaks.ily | 4 +-- lilydrum/midi.ily | 52 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 lilydrum/midi.ily diff --git a/lilydrum.ly b/lilydrum.ly index ee38e94..63b6db2 100755 --- a/lilydrum.ly +++ b/lilydrum.ly @@ -32,3 +32,4 @@ \include "lilydrum/embellishments.ily" \include "lilydrum/flourishing.ily" \include "lilydrum/special_sticking.ily" +\include "lilydrum/midi.ily" diff --git a/lilydrum/layout_tweaks.ily b/lilydrum/layout_tweaks.ily index 89022c9..717808c 100755 --- a/lilydrum/layout_tweaks.ily +++ b/lilydrum/layout_tweaks.ily @@ -1,7 +1,8 @@ % =================================================== % % 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") @@ -23,7 +24,6 @@ drumPitchNames = ) \layout { - indent = 0.0 \context { \DrumStaff \name PipeBandDrumStaff diff --git a/lilydrum/midi.ily b/lilydrum/midi.ily new file mode 100644 index 0000000..17a2d6d --- /dev/null +++ b/lilydrum/midi.ily @@ -0,0 +1,52 @@ +% Add standard midi support, preferably able to +% switch instruments for different staves +#(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 +) + +\midi { + \context { + \DrumStaff + \name PipeBandDrumStaff + \alias DrumStaff + drumPitchTable = #(alist->hash-table midiDrumPitches) + } + \context { + \Score + \accepts "PipeBandDrumStaff" + } + \context { + \StaffGroup + \accepts "PipeBandDrumStaff" + } + +} + +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) +}