\relative c'' {\key d \major d-^\ff r cis4.->( b8 | a4-.) fis-. d-. fis-. | a-. a8(b a4-.) a8(b->| g1->) } }
\finger #'<recorder> {...}
to include recorder
fingering diagrams for our chosen recorder (eg soprano), based on a chart:
\addf <note> #'(<holes>)
around it,
where <holes> is a list of holes (or half-holes) to
cover, to suggest alternate fingering for a specific note.
note
is an object with type ly:music;
it is the user's responsibility to only place a single
note in the argument. Otherwise, the same diagram will be
drawn onto all the notes in the argument!)recorder-diagram
takes as its argument a "size"
and a list of holes, and creates a piece of markup representing
the recorder diagram, scaled to size, with the specified holes (or
half-holes) covered.
The holes are named as:
thumb | thumb hole covered |
thumbhf | thumb hole half covered (horizontal) |
one...five, onehf...fivehf | hole $n covered / half covered (vertical) |
sixl, sixr | big sixth hole covered, small sixth hole covered |
pinkyl, pinkyr | big seventh hole covered, small seventh hole covered |
myxxFingerings
is a chart for the
recorder xx. I added charts for the alto F and the
descant; macros for tenor and sopranino simply refer to
(transpositions of) these. The charts have a little introductory
code and a series of lines like:
; C# or Db4 ((= (ly:pitch-semitones pitch) 1) (recorder-diagram size '(thumbhf one two three four five sixl sixr pinkyl) ))where the number (here 1) is the lilypond numeric representation for the absolute pitch (middle C is 0), and we provide the list of holes to cover. It calls
recorder-diagram
and returns the
piece of markup with the chart.
finger
and addf
take an object of
type ly:music and print the diagram markup as
lilypond NoteNames
for the music.
\include "recorder-fingerings.ly"
#(define myFingSize 2)
altoFinger = #(define-scheme-function (mus) (ly:music?) #{ \finger #'alto $mus #})
\finger #'alto {...music...}
or \altoFinger
{...music...}
(replace alto with
descant, tenor as required) -- whether just for a
few bars, single note, or the entire piece
\addf {...music...} #'(list of holes)
: NB
all notes in the {...music...}
will then be assigned
the same fingering, so there should only be one note! (but it can be
marked up with all the usual lilypond music functionality such as
articulations etc)
\altoFinger { r4 c\>(d ees) | f->\!(d) r2 | r4 } \addf bes'\<( #'(thumbhf one four five pinkyl pinkyr) \altoFinger{ aes2) | a4--\! a-. r a-. | bes-- bes-. r bes-. | a1( | a4) r r2 |}
a_\recorder-diagram #2 #'(thumb one two)
recorder-diagram
. The diagram is currently a
single center-column
.
(thumb one two)
, and change it to the correct fingering
e.g. (thumb one three)
recorder-diagram
instead
of the built-in lilypond woodwind diagram, the code structure is
adapted
from https://lsr.di.unimi.it/LSR/Snippet?id=1177.
Another "obvious" way to do this (and my initial idea), rather than
implementing the recorder diagram markup from scratch, would have been
to patch the .scm files display-woodwind-diagram.scm
and define-woodwind-diagram.scm
, modifying e.g. the tin
whistle diagram with the double holes at the bottom and the thumb hole
at the top (or at the side, to taste), as done by
a
user on the lilypond mailing list (2017) for an eight-holed
instrument. The fingering charts and \addf
function
would then have been defined using the lilypond built in syntax for
woodwind diagrams, rather than the locally defined recorder-diagram
.
However, I couldn't find out how to create a patch in a local file that will then just extend the lilypond built-ins. It seems you have to actually modify the system files. I didn't think this was a suitable solution for our use case...
lilypond
solution uses no tex at all...)