The LilyPond code below creates two notes, including their names on top and the corresponding fingering chart for saxophone.
\version "2.22.0"
#(print-keys-verbose 'saxophone)
#(set-global-staff-size 38)
\score{
\relative {
\textLengthOn
d'1_\markup {
\woodwind-diagram
#'saxophone
#'((cc . (one two three four five six))
(lh . ())
(rh . ()))
}^\markup{D}
e1_\markup {
\woodwind-diagram
#'saxophone
#'((cc . (one two three four five))
(lh . ())
(rh . ()))
}^\markup{E}
}
}
I have the feeling that LilyPond uses something like Lisp syntax, but I'm more a Python person.
I want to write multiple constructs like that for each note (that I know currently), and I wonder how to create a function to reuse that code by just giving parameters in it; e.g., note
(d
in the example), notename
(D
in the example) and something for the fingers
(one two three four five six
).