summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/recorder-fingering
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-07-17 03:03:42 +0000
committerNorbert Preining <norbert@preining.info>2023-07-17 03:03:42 +0000
commit2d6f89f83b7567136c3a40b3b55f9be1e06bd99e (patch)
tree9f4acc9c2c0e94ea2bc4626e2d2e6e6a92984ffe /macros/latex/contrib/recorder-fingering
parentbfb037e9e2deef77f8837a4421b029f8298437cf (diff)
CTAN sync 202307170303
Diffstat (limited to 'macros/latex/contrib/recorder-fingering')
-rw-r--r--macros/latex/contrib/recorder-fingering/README.md4
-rw-r--r--macros/latex/contrib/recorder-fingering/recorder-fingering.pdfbin89434 -> 95784 bytes
-rw-r--r--macros/latex/contrib/recorder-fingering/recorder-fingering.sty202
-rw-r--r--macros/latex/contrib/recorder-fingering/recorder-fingering.tex100
4 files changed, 252 insertions, 54 deletions
diff --git a/macros/latex/contrib/recorder-fingering/README.md b/macros/latex/contrib/recorder-fingering/README.md
index 8ac7acfac5..1218ea95ef 100644
--- a/macros/latex/contrib/recorder-fingering/README.md
+++ b/macros/latex/contrib/recorder-fingering/README.md
@@ -1,8 +1,8 @@
# recorder-fingering
-Version 1.1b February 21, 2023
+Version 1.2 July 15, 2023
-The `recorder-fingering` package provides support for generating fingering diagrams for baroque fingering recorders. Standard fingerings are provided for recorders in both C and F, along with methods to create and display alternate fingerings for trills, etc.
+The `recorder-fingering` package provides support for generating fingering diagrams for baroque fingering recorders and the tin whistle. Standard fingerings are provided for recorders in both C and F, and the tin whistle in D, along with methods to create and display alternate fingerings for trills, etc.
# Sample of what you can do with it:
diff --git a/macros/latex/contrib/recorder-fingering/recorder-fingering.pdf b/macros/latex/contrib/recorder-fingering/recorder-fingering.pdf
index 11762eaaf8..304f16d21a 100644
--- a/macros/latex/contrib/recorder-fingering/recorder-fingering.pdf
+++ b/macros/latex/contrib/recorder-fingering/recorder-fingering.pdf
Binary files differ
diff --git a/macros/latex/contrib/recorder-fingering/recorder-fingering.sty b/macros/latex/contrib/recorder-fingering/recorder-fingering.sty
index fa65399f26..728713545a 100644
--- a/macros/latex/contrib/recorder-fingering/recorder-fingering.sty
+++ b/macros/latex/contrib/recorder-fingering/recorder-fingering.sty
@@ -2,8 +2,9 @@
%% This is file `recorder-fingerings.sty'
% Copyright 2023 by Alan Munn
%
-% This package provides a single command to produce a fingering
-% diagram for any not in the playable range of the recorder.
+% This package provides support for generating fingering diagrams for baroque fingering recorders.
+% Standard fingerings are provided for recorders in both C and F, along with methods to create and
+% display alternate fingerings for trills, etc.
%
% This package may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -25,9 +26,9 @@
%
% recorder-fingering.tex, recorder-fingering.pdf
%
-% Version 1.1b 2023/02/21
+% Version 1.2 2023/07/15
\NeedsTeXFormat{LaTeX2e}[2022/11/01]
-\ProvidesPackage{recorder-fingering}[2023/02/20 v1.1 Recorder fingering diagrams]
+\ProvidesPackage{recorder-fingering}[2023/07/15 v1.2 Recorder fingering diagrams]
\RequirePackage{tikz}
\usetikzlibrary{calc}
\RequirePackage{graphicx}
@@ -67,18 +68,20 @@ nodes={anchor=center}
% Error messages
\msg_new:nnnn {recorder-fingering}{too-few}{\\You\ haven't\ provided\ enough\ holes!}{Fingerings\ must\ specify\ all\ 8\ holes\ (thumb\ +\ all\ 7\ fingers)}
\msg_new:nnnn {recorder-fingering}{key-exists}{\\This\ fingering\ is\ already\ defined!}{Use\ the\ starred\ version\ of\ the\ command\ or\ \token_to_str:N \AddFingerings\ instead\ to\ override\ existing\ fingerings.}
-\msg_new:nnnn {recorder-fingering}{wrong-instrument}{\\This\ command\ only\ permits\ F\ and\ C\ fingerings!}{}
+\msg_new:nnnn {recorder-fingering}{wrong-instrument}{\\This\ command\ only\ permits\ F, \ C,\ and\ D\ fingerings!}{}
\msg_new:nnnn {recorder-fingering}{deprecated}{\\This\ command\ is\ deprecated.\ Please\ use\ \token_to_str:N \Alto\ or\ \token_to_str:N \Soprano\ instead.}{}
-\msg_new:nnnn {recorder-fingering}{no-hole}{\\The\ recorder\ does't\ have\ enough\ holes\ to\ trill\ here.\ Please\ use\ hole\ numbers\ between\ 1\ and\ 7!}{}
+\msg_new:nnnn {recorder-fingering}{no-hole}{\\The\ instrument\ does't\ have\ enough\ holes\ to\ trill\ here.\ Please\ use\ hole\ numbers\ between\ 1\ and\ 7\ (or\ 6\ for\ tin\ whistle)!}{}
\msg_new:nnnn {recorder-fingering}{key-not-found}{\\Key\ not\ found}{}
% Set up the property lists for F and C fingerings
\prop_new:N \l_fingering_F_prop
\prop_new:N \l_fingering_C_prop
+\prop_new:N \l_fingering_D_prop
% Set up sharp/flat conversion list
\prop_new:N \l_fingering_F_sharp_flat_prop
\prop_new:N \l_fingering_C_sharp_flat_prop
+\prop_new:N \l_fingering_D_sharp_flat_prop
% Set up transposition tables for later
\prop_new:N \l_fingering_C_to_F_prop
@@ -87,6 +90,7 @@ nodes={anchor=center}
% Set up the clists for the fingering vectors themselves
\clist_new:N \l_fingering_fing_clist
\clist_new:N \l_fingering_topholes_clist
+\clist_new:N \l_fingering_botholes_clist
% Set up the trill holes clist
\clist_new:N \l_fingering_trill_holes_clist
@@ -100,20 +104,23 @@ nodes={anchor=center}
% Definitions of the hole positions. To be used to add trill notation.
-
-
+% Some vary depending on the instrument (Recorder vs. Tin whistle)
+% Some are constants since they are only used by one of the two instruments.
+
+\tl_new:N \l_fingering_one_tl
+\tl_new:N \l_fingering_two_tl
+\tl_new:N \l_fingering_three_tl
+\tl_new:N \l_fingering_four_tl
+\tl_new:N \l_fingering_five_tl
+\tl_new:N \l_fingering_bell_tl
\tl_const:Nn \c_fingering_thumb_tl {0.5}
-\tl_const:Nn \c_fingering_one_tl {1.0}
-\tl_const:Nn \c_fingering_two_tl {1.5}
-\tl_const:Nn \c_fingering_three_tl {2.0}
-\tl_const:Nn \c_fingering_four_tl {2.5}
-\tl_const:Nn \c_fingering_five_tl {3.0}
+\tl_const:Nn \c_fingering_six_tl {3.0}
\tl_const:Nn \c_fingering_six_seven_x_tl {0.15}
\tl_const:Nn \c_fingering_six_top_tl {3.5}
\tl_const:Nn \c_fingering_six_bot_tl {3.575}
\tl_const:Nn \c_fingering_seven__top_tl {4.0}
\tl_const:Nn \c_fingering_seven_bot_tl {4.075}
-\tl_const:Nn \c_fingering_bell_tl {4.5}
+
% Manage the thumb offset parameters
\tl_set:Nn \l_fingering_thumboffset_x {-.5}
@@ -136,6 +143,26 @@ nodes={anchor=center}
\tl_new:N \l_fingering_trill_offset_tl
\bool_new:N \l_fingering_trill_offset_LR_bool
+% Macro to set hole positions for each instrument (R=recorder, W=tin whistle)
+\cs_new:Nn \l_fingering_set_hole_positions:n {
+ \str_case:nn {#1}{
+ {R}{
+ \tl_set:Nn \l_fingering_one_tl {1.0}
+\tl_set:Nn \l_fingering_two_tl {1.5}
+\tl_set:Nn \l_fingering_three_tl {2.0}
+\tl_set:Nn \l_fingering_four_tl {2.5}
+\tl_set:Nn \l_fingering_five_tl {3.0}
+\tl_set:Nn \l_fingering_bell_tl {4.5}
+}
+ {W}{
+\tl_set:Nn \l_fingering_one_tl {.5}
+\tl_set:Nn \l_fingering_two_tl {1}
+\tl_set:Nn \l_fingering_three_tl {1.5}
+\tl_set:Nn \l_fingering_four_tl {2.0}
+\tl_set:Nn \l_fingering_five_tl {2.5}
+\tl_set:Nn \l_fingering_bell_tl {3.0}
+}
+}}
% Command parameters
\keys_define:nn {fingering}{
@@ -169,16 +196,17 @@ nodes={anchor=center}
\keys_set:nn {fingering} {#1}
\keys_set:nn {fingering} {trill={}} % trill makes no sense as a global option
}
-% Set defaults
+% Set defaults for recorder
\fingeringSetup{thumboffset=true,trilldir=LR,LHRHdivider=true,LHRHspace=10pt,width=20pt}
% Generic fingering generator: takes a clist, splits it between top holes and bottom holes
% and produces the corresponding diagram
% basic idea for splitting the clist using step_inline and pop from Jonathan P. Spratte (Skillmon)
-\cs_new_protected:Nn \fingering_generate_fingering:n
+\cs_new_protected:Nn \fingering_generate_recorder_fingering:n
{
\clist_set:Nn \l_fingering_holes_clist {#1}
+\l_fingering_set_hole_positions:n {R}
\clist_clear:N \l_fingering_topholes_clist
\int_step_inline:nn { 4 } {
\clist_pop:NNF \l_fingering_holes_clist \l_tmpa_tl { \msg_error:nn { recorder-fingering } { too-few }}
@@ -198,9 +226,9 @@ nodes={anchor=center}
% now shift the bottom holes to make a small space between LH and RH holes
\begin{scope}[yshift=-\l_fingering_top_bottom_space_tl]
\clist_pop:NN \l_fingering_holes_clist \l_tmpa_tl
- \node[hole=\l_tmpa_tl]~at~(0,-\c_fingering_four_tl)~{};
+ \node[hole=\l_tmpa_tl]~at~(0,-\l_fingering_four_tl)~{};
\clist_pop:NN \l_fingering_holes_clist \l_tmpa_tl
- \node[hole=\l_tmpa_tl]~at~(0,-\c_fingering_five_tl)~{};
+ \node[hole=\l_tmpa_tl]~at~(0,-\l_fingering_five_tl)~{};
% display the bottom two paired holes
\clist_pop:NN \l_fingering_holes_clist \l_tmpa_tl
\int_case:nnTF {\l_tmpa_tl}{
@@ -240,7 +268,7 @@ nodes={anchor=center}
\clist_if_empty:NTF \l_fingering_holes_clist
{}
{\clist_pop:NN \l_fingering_holes_clist \l_tmpa_tl
- \node[hole=\l_tmpa_tl]~at~(0,-\c_fingering_bell_tl)~{};}
+ \node[hole=\l_tmpa_tl]~at~(0,-\l_fingering_bell_tl)~{};}
% display trill arrows if present
\clist_if_empty:NTF \l_fingering_trill_holes_clist
{}
@@ -272,12 +300,71 @@ nodes={anchor=center}
\end{tikzpicture}}
}
+\cs_new_protected:Nn \fingering_generate_whistle_fingering:n
+{ \l_fingering_set_hole_positions:n {W}
+ \clist_set:Nn \l_fingering_holes_clist {#1}
+ \resizebox{\l_fingering_size_dim}{!}{
+ \begin{tikzpicture}[/fingering]
+% display the top three holes
+ \clist_pop:NN \l_fingering_holes_clist \l_tmpa_tl
+ \node[hole=\l_tmpa_tl]~at~(0,-\l_fingering_one_tl)~{};
+ \clist_pop:NN \l_fingering_holes_clist \l_tmpa_tl
+ \node[hole=\l_tmpa_tl]~at~(0,-\l_fingering_two_tl)~{};
+ \clist_pop:NN \l_fingering_holes_clist \l_tmpa_tl
+ \node[hole=\l_tmpa_tl]~at~(0,-\l_fingering_three_tl)~{};
+% add the divider if selected
+ \bool_if:NTF \l_fingering_LHRH_divider_bool
+ {\draw[overlay]~($(-.5,-1.75)+(0,-\l_fingering_top_bottom_space_tl/2)$)~
+ --($(.5,-1.75)+(0,-\l_fingering_top_bottom_space_tl/2)$);}
+ {}
+% now shift the bottom holes to make a small space between LH and RH holes
+ \begin{scope}[yshift=-\l_fingering_top_bottom_space_tl]
+ \clist_pop:NN \l_fingering_holes_clist \l_tmpa_tl
+ \node[hole=\l_tmpa_tl]~at~(0,-\l_fingering_four_tl)~{};
+ \clist_pop:NN \l_fingering_holes_clist \l_tmpa_tl
+ \node[hole=\l_tmpa_tl]~at~(0,-\l_fingering_five_tl)~{};
+ \clist_pop:NN \l_fingering_holes_clist \l_tmpa_tl
+ \node[hole=\l_tmpa_tl]~at~(0,-\c_fingering_six_tl)~{};
+% display the bell hole if present
+ \clist_if_empty:NTF \l_fingering_holes_clist
+ {}
+ {\clist_pop:NN \l_fingering_holes_clist \l_tmpa_tl
+ \node[hole=\l_tmpa_tl]~at~(0,-\l_fingering_bell_tl)~{};}
+% display trill arrows if present
+ \clist_if_empty:NTF \l_fingering_trill_holes_clist
+ {}
+ {
+ \clist_map_variable:NNn \l_fingering_trill_holes_clist \l_tmpa_tl
+ {\int_compare:nNnTF {\l_tmpa_tl} > {6}
+ {\msg_warning:nn { recorder-fingering } { no-hole }}
+ {\int_compare:nNnTF {\l_tmpa_tl} > {3}
+ {\tl_set:Nn \l_fingering_top_bottom_space_tl {0}}
+ {}
+ \bool_if:nTF {\l_fingering_trill_offset_LR_bool}
+ {\int_compare:nNnTF {\l_tmpa_tl} > {3}
+ {\tl_set:Nn \l_fingering_trill_offset_tl {.5}
+ \prop_get:NnN \l_fingering_pointer_prop {RPointer}
+ \l_fingering_trill_pointer_tl }
+ {\tl_set:Nn \l_fingering_trill_offset_tl {-.5}
+ \prop_get:NnN \l_fingering_pointer_prop {LPointer}
+ \l_fingering_trill_pointer_tl }
+ }
+ {}
+ \int_set:Nn \l_tmpb_int {\l_tmpa_tl}
+ \node[overlay]~at~($(\l_fingering_trill_offset_tl,
+ -\l_tmpb_int/2)+(0,\l_fingering_top_bottom_space_tl)
+ $)~{\l_fingering_trill_pointer_tl};
+ }
+ }
+ }
+ \end{scope}
+ \end{tikzpicture}}
+ }
-
-
+\cs_generate_variant:Nn \fingering_generate_whistle_fingering:n { V }
% create variable version of the command
-\cs_generate_variant:Nn \fingering_generate_fingering:n { V }
+\cs_generate_variant:Nn \fingering_generate_recorder_fingering:n { V }
% Main user commands and synonyms
% First basic commands to display the fingering for any note
@@ -285,7 +372,7 @@ nodes={anchor=center}
\group_begin:
\keys_set:nn {fingering} {#1}
\prop_get:NnN \l_fingering_F_prop {#2} \l_tmpa_tl
- \fingering_generate_fingering:V \l_tmpa_tl
+ \fingering_generate_recorder_fingering:V \l_tmpa_tl
\group_end:
}
\cs_set_eq:NN \Sopranino \Alto
@@ -295,11 +382,20 @@ nodes={anchor=center}
\group_begin:
\keys_set:nn {fingering} {#1}
\prop_get:NnN \l_fingering_C_prop {#2} \l_tmpa_tl
- \fingering_generate_fingering:V \l_tmpa_tl
+ \fingering_generate_recorder_fingering:V \l_tmpa_tl
\group_end:
}
\cs_set_eq:NN \Tenor \Soprano
+\NewDocumentCommand{\Whistle}{O{}m}{
+ \group_begin:
+ \keys_set:nn {fingering} {#1}
+ \prop_get:NnN \l_fingering_D_prop {#2} \l_tmpa_tl
+ \fingering_generate_whistle_fingering:V \l_tmpa_tl
+ \group_end:
+}
+
+
% Now commands to add new fingerings:
% First, a note = { } version for multiple fingerings
% This command will override existing fingerings
@@ -307,6 +403,7 @@ nodes={anchor=center}
\str_case:nnTF {#1}{
{F} {\prop_put_from_keyval:Nn \l_fingering_F_prop {#2}}
{C}{\prop_put_from_keyval:Nn \l_fingering_C_prop {#2}}
+ {D}{\prop_put_from_keyval:Nn \l_fingering_D_prop {#2}}
}
{}
{\msg_error:nn { recorder-fingering }{ wrong-instrument}}
@@ -330,11 +427,21 @@ nodes={anchor=center}
{\prop_put:Nnn \l_fingering_C_prop {#2} {#3}}
}}
+\NewDocumentCommand{\NewDfingering}{smm}{
+\IfBooleanTF{#1}
+ {\prop_put:Nnn \l_fingering_D_prop {#2} {#3}}
+ {\prop_get:NnNTF \l_fingering_D_prop {#2} \l_tmpa_tl
+ {\msg_error:nn { recorder-fingering } { key-exists }}
+ {\prop_put:Nnn \l_fingering_D_prop {#2} {#3}}
+ }}
+
% macros to copy fingerings (for now internal only)
\cs_new_protected:Nn \fingering_add_F_fingering:nn {\prop_put:Nnn \l_fingering_F_prop {#1} {#2}}
\cs_new_protected:Nn \fingering_add_C_fingering:nn {\prop_put:Nnn \l_fingering_C_prop {#1} {#2}}
+\cs_new_protected:Nn \fingering_add_D_fingering:nn {\prop_put:Nnn \l_fingering_D_prop {#1} {#2}}
\cs_generate_variant:Nn \fingering_add_F_fingering:nn {nV}
\cs_generate_variant:Nn \fingering_add_C_fingering:nn {nV}
+\cs_generate_variant:Nn \fingering_add_D_fingering:nn {nV}
% These macros take two arguments: a new key and an existing key, and create a new
% fingering in the associated property list with the new key name and the existing key
@@ -348,6 +455,11 @@ nodes={anchor=center}
{\prop_get:NnN \l_fingering_C_sharp_flat_prop {#1} \l_tmpa_tl
\prop_get:NoN \l_fingering_C_prop {\l_tmpa_tl} \l_tmpb_tl
\fingering_add_C_fingering:nV {#1} {\l_tmpb_tl}}
+
+ \cs_new_protected:Nn \fingering_copy_D:nn
+ {\prop_get:NnN \l_fingering_D_sharp_flat_prop {#1} \l_tmpa_tl
+ \prop_get:NoN \l_fingering_D_prop {\l_tmpa_tl} \l_tmpb_tl
+ \fingering_add_D_fingering:nV {#1} {\l_tmpb_tl}}
\NewDocumentCommand{\debug}{O{f}m}{
\str_case:nn {#1}{
@@ -423,6 +535,26 @@ nodes={anchor=center}
eb' = {t,0,1,1,0,1,2,0}
}
+\AddFingerings{D}{
+ D ={1,1,1,1,1,1},
+ D# ={1,1,1,1,1,h},
+ E = {1,1,1,1,1,0},
+ F = {1,1,1,1,h,0},
+ F# ={1,1,1,1,0,0},
+ G = {1,1,1,0,0,0},
+ G# ={1,1,h,0,0,0},
+ A = {1,1,0,0,0,0},
+ A#= {1,h,0,0,0,0},
+ B = {1,0,0,0,0,0},
+ C = {0,1,1,0,0,0},
+ C# ={0,0,0,0,0,0},
+ d = {0,1,1,1,1,1},
+ c = {h,0,0,0,0,0},
+ d = {0,1,1,1,1,1},
+ d' = {0,1,1,0,0,0}
+}
+
+
% These are equivalent lists for generating the # versions
% new_key = {existing_key}
\prop_set_from_keyval:Nn \l_fingering_F_sharp_flat_prop {
@@ -455,9 +587,31 @@ nodes={anchor=center}
d#' = {eb'}
}
+\prop_set_from_keyval:Nn \l_fingering_D_sharp_flat_prop {
+ d# = {D#},
+ Eb = {D#},
+ eb = {D#},
+ e = {E},
+ f = {F},
+ f# = {F#},
+ Gb = {F#},
+ gb = {F#},
+ g = {G},
+ g# = {G#},
+ a = {A},
+ a# = {A#},
+ Bb = {A#},
+ bb = {A#},
+ b = {B},
+ c# = {C#},
+ Db = {C#},
+ db = {C#}
+}
+
% Add all the sharp fingerings.
\prop_map_function:NN \l_fingering_F_sharp_flat_prop \fingering_copy_F:nn
\prop_map_function:NN \l_fingering_C_sharp_flat_prop \fingering_copy_C:nn
+ \prop_map_function:NN \l_fingering_D_sharp_flat_prop \fingering_copy_D:nn
% Transposition tables (may be useful; currently not used)
\prop_set_from_keyval:Nn \l_fingering_F_to_C_prop {
diff --git a/macros/latex/contrib/recorder-fingering/recorder-fingering.tex b/macros/latex/contrib/recorder-fingering/recorder-fingering.tex
index f68080b9e4..486d6b0f81 100644
--- a/macros/latex/contrib/recorder-fingering/recorder-fingering.tex
+++ b/macros/latex/contrib/recorder-fingering/recorder-fingering.tex
@@ -24,7 +24,7 @@
\DefineShortVerb{\|}
\title{The \texttt{recorder-fingering} package}
\author{Alan Munn\\amunn@msu.edu}
-\date{Version 1.1b\\February 21, 2023}
+\date{Version 1.2\\July 15, 2023}
\lstset{%
basicstyle=\ttfamily\small,
@@ -33,9 +33,8 @@
showstringspaces=false,
breaklines=true,
breakautoindent=true,
- frame=single
- captionpos=t
- language=TeX
+ language=TeX,
+ frame=tl,
}
\newcommand*{\pkg}[1]{\texttt{#1}}
@@ -51,13 +50,13 @@
\maketitle
\thispagestyle{empty}
\begin{abstract}{\noindent
-The |recorder-fingering| package provides support for generating fingering diagrams for baroque fingering recorders. Standard fingerings are provided for recorders in both C and F, along with methods to create and display alternate fingerings for trills, etc.
+The |recorder-fingering| package provides support for generating fingering diagrams for baroque fingering recorders and the tin whistle. Standard fingerings are provided for recorders in both C and F, and the tin whistle in D, along with methods to create and display alternate fingerings for trills, etc.
}
\end{abstract}
\section{Display commands}
-This package provides five commands (|\Sopranino|, |\Soprano|, |\Alto|, |\Tenor|, and |\Bass|)\footnote{Because \pkg{musixtex} defines commands \pkg{\bs alto} and \pkg{\bs bass} the fingering display commands are capitalized.} which will produce a fingering diagram for any note in the playable range of that recorder. At present, there are no differences between the three F recorders (sopranino, alto, and bass) and the two C recorders (soprano and tenor), so the different command names are simply there for convenience.
+This package provides five recorder commands (|\Sopranino|, |\Soprano|, |\Alto|, |\Tenor|, and |\Bass|) and one tin whistle command (|\Whistle|).\footnote{Because \pkg{musixtex} defines commands \pkg{\bs alto} and \pkg{\bs bass} the fingering display commands are capitalized.} which will produce a fingering diagram for any note in the playable range of that recorder. At present, there are no differences between the three F recorders (sopranino, alto, and bass) and the two C recorders (soprano and tenor), so the different command names are simply there for convenience.
\begin{table}[htpb]
@@ -74,9 +73,9 @@ This package provides five commands (|\Sopranino|, |\Soprano|, |\Alto|, |\Tenor|
\caption{Display commands}
\end{table}
\subsection{Note ranges and notation\label{Notes}}
-The notes range from C–Eb for recorders in C (|\Soprano| and |\Tenor|) or F–Ab for recorders in F (|\Sopranino| and |\Alto|).
+The notes range from C–Eb for recorders in C (|\Soprano| and |\Tenor|) or F–Ab for recorders in F (|\Sopranino| and |\Alto|), and D-d' for the tin whistle.
-Notes are noted as C-B (first octave) c-b (second octave) and c'–eb' (third octave) with an equivalent scheme starting at F for the recorders in F.
+Notes are noted as C-B (first octave) c-b (second octave) and c'–eb' (third octave) with an equivalent scheme starting at F for the recorders in F, and starting at D for the tin whistle.
Enharmonic notes are available for any of the flat/sharp notes (i.e., Db and C\#, etc. are both defined by default.)
\subsection{Display parameters}
@@ -99,7 +98,7 @@ trill = \{<list of holes>\} & add a trill marker at each hole position in the li
\caption{Display options}
\end{table}
-The |width| parameter sets the width of the diagram; it defaults to |20pt| for the default thumb offset diagrams. If you set |thumboffset=false| you will probably want to choose a smaller value e.g. |10pt|.
+The |width| parameter sets the width of the diagram; it defaults to |20pt| for the default thumb offset diagrams. If you set |thumboffset=false| you will probably want to choose a smaller value e.g. |10pt|. Since the tin whistle has no thumb position, its default is set to |7pt|.
The |trill| parameter sets an arrow pointing to a hole (numbered 1-7 from the top hole). This parameter is only in effect when using the display commands. It will place an arrow on the side specified by |trilldir| at a single hole or comma separated list of holes. e.g. |trill=3| sets an arrow at hole 3, |trill={6,7}| sets arrows at holes 6 and 7.
@@ -121,30 +120,31 @@ e.g. |\fingeringSetup{width=12pt,thumboffset=false}| makes all diagrams use an i
\end{table}
\section{Producing new fingerings}
-There are three commands to add new fingerings to the predefined list, or in fact, to change the existing defaults.
+There are four commands to add new fingerings to the predefined list, or in fact, to change the existing defaults.
\subsection{Note names}
Although the basic predefined fingerings use the note naming schema outlined in section \ref{Notes}, the note names themselves are arbitrary. This allows you to add trill fingerings or alternate fingerings with meaningful names, e.g. |ftrill| or |altF| are possible names for new fingerings.
\subsection{Fingering vectors}
-Fingerings are specified using an 8 (and possibly 9) element comma separated list. Each position in the list denotes a hole starting from the thumb (position 0) to the bell (position 8). Each hole position is indicated by a hole state according to the following scheme:
+Fingerings are specified using an 8 (and possibly 9) element comma separated list (7 for the tin whistle\footnote{Since I don’t play the tin whistle, I don’t know if there are any esoteric fingerings similar to those in the recorder that use the knee to close the bell hole. But in case they do exist, it’s possible to specify a 7th hole for D fingerings.}). For the recorders, each position in the list denotes a hole starting from the thumb (position 0) to the bell (position 8). For the tin whistle, each position in the list denotes a hole. Each hole position is indicated by a hole state according to the following scheme:
\begin{table}[htpb]
\centering
\begin{tabularx}{.8\textwidth}{t{r}X}
\toprule
0 & open hole\\
-1 & closed hole (positions 0-5); single closed hole (positions 6,7)\\
-2 & double closed hole (positions 6,7 only)\\
+1 & closed hole (positions 0-6); or single closed hole (recorder positions 6,7)\\
+2 & double closed hole (recorder positions 6,7 only)\\
t & half hole (thumb)\\
-h & half hole (positions 1-5)\\
+h & half hole (positions 1-6)\\
\bottomrule
\end{tabularx}
\caption{Hole states}
\end{table}
+
\subsection{New fingering commands}
-Two commands |\NewFfingering| and |\NewCfingering| are designed to add a single fingering. They check whether the name for the fingering is already used and produce an error if so. To overwrite an existing fingering, use |\NewFfingering*| and |\NewCfingering*|.
+Three commands |\NewFfingering|, |\NewCfingering|, and |\NewDfingering| are designed to add a single fingering. They check whether the name for the fingering is already used and produce an error if so. To overwrite an existing fingering, use |\NewFfingering*|, |\NewCfingering*| or |\NewDfingering*|.
-The third command is designed to enter a set of new fingerings at once. It will override any existing note names. It takes two arguments, a key, and a key value list consisting of note names plus fingering vectors.
+The fourth command is designed to enter a set of new fingerings at once. It will override any existing note names. It takes two arguments, a key, (F, C, or D) and a key value list consisting of note names plus fingering vectors.
\begin{table}[htpb]
\centering
@@ -152,12 +152,13 @@ The third command is designed to enter a set of new fingerings at once. It will
\toprule
\texttt{\bs NewFfingering\{<notename>\}\{<fingering vector>\}} \\\rule{3em}{0pt}Add a new note and fingering to the F recorder set\\
\texttt{\bs NewCfingering\{<notename>\}\{<fingering vector>\}} \\\rule{3em}{0pt} Add a new note and fingering to the C recorder set\\
-\texttt{\bs AddFingerings\{<key>\}\{<note = \{<fingering vector>\}\}} \\\rule{3em}{0pt} Add a set of new fingerings to the F or C recorder set\\
+\texttt{\bs NewDfingering\{<notename>\}\{<fingering vector>\}} \\\rule{3em}{0pt} Add a new note and fingering to the tin whistle set\\
+\texttt{\bs AddFingerings\{<key>\}\{<note = \{<fingering vector>\}>\}} \\\rule{3em}{0pt} Add a set of new fingerings to the F, C or D instrument set\\
\bottomrule
\end{tabularx}
\caption{Commands for adding new fingerings}
\end{table}
-%\clearpage
+
\subsection{New fingering examples}
\NewFfingering{BbAtrill}{0,1,1,1,1,1,0,0}
\AddFingerings{C}{
@@ -171,7 +172,7 @@ The third command is designed to enter a set of new fingerings at once. It will
\Alto[trill=5]{BbAtrill}
\end{lstlisting}
\Alto[trill=5]{BbAtrill}
-\clearpage
+
\begin{lstlisting}
\AddFingerings{C}{
EFtrill = {0,1,1,1,1,1,0,0},
@@ -189,13 +190,13 @@ The third command is designed to enter a set of new fingerings at once. It will
\Alto{agtrill}
\section{Version History}
-Version 0.5 of this package (the initial version) was in response to a \href{https://tex.stackexchange.com/q/674847/2693}{TeX.se question} and used a substantially different set of user commands. The current version (1.0) is more flexible and has a more useable user interface. Version 1.1 added support for trill annotation, and added a separation between the left and right hand holes. Bug reports and feature requests are welcome at the \href{https://github.com/amunn/recorder-fingering/issues}{GitHub bug tracker}.
+Version 0.5 of this package (the initial version) was in response to a \href{https://tex.stackexchange.com/q/674847/2693}{TeX.se question} and used a substantially different set of user commands. The current version (1.0) is more flexible and has a more useable user interface. Version 1.1 added support for trill annotation, and added a separation between the left and right hand holes. Version 1.2 added support for the tin whistle. Bug reports and feature requests are welcome at the \href{https://github.com/amunn/recorder-fingering/issues}{GitHub bug tracker}.
\section{Acknowledgements}
-This is my first attempt to write a package using |expl3|. Thanks to Jonathan P. Spratte for suggesting how to split fingering vectors and the various LaTeX development team members (David Carlisle, Ulrike Fischer, Phelype Olenik and Joseph Wright) who have answered random |expl3| questions in the TeX.se chat. Thanks to Bob Tennent, whose suggestions resulted in version 1.1. Thanks also to all the TeX.se users who have both asked and answered questions on the site. Your questions encourage new packages like this one and your answers help make the code better.
+This is my first attempt to write a package using |expl3|. Thanks to Jonathan P. Spratte for suggesting how to split fingering vectors and the various LaTeX development team members (David Carlisle, Ulrike Fischer, Phelype Olenik and Joseph Wright) who have answered random |expl3| questions in the TeX.se chat. Thanks to Bob Tennent, whose suggestions resulted in version 1.1. Thanks also to all the TeX.se users who have both asked and answered questions on the site. Your questions encourage new packages like this one and your answers help make the code better. Thanks to Charles-Albert Lehalle for the suggestion to add the tin whistle.
\clearpage
-\section{Samples} The chart below shows all of the possible fingerings.\footnote{Since the top row of the table represents the input name, \pkg{b} and \pkg{\#} are used instead the proper symbols \flat\ and \sharp.}
+\section{Samples} The charts below shows all of the defaults fingerings for the C recorders and the tin whistle.\footnote{Since the top row of the table represents the input name, \pkg{b} and \pkg{\#} are used instead the proper symbols \flat\ and \sharp.}
-\section*{Recorder in C soprano chart}
+\section*{Soprano recorder in C fingering chart}
\begin{tabular}{cccccccccccc}
\toprule
C & C\# & D & Eb & E & F & F\# & G & Ab & A & Bb & B\\
@@ -235,22 +236,65 @@ c & c\# & d & eb & e & f & f\# & g & ab & a & bb & b\\
\bottomrule
\end{tabular}
-\fingeringSetup{width=10pt,thumboffset=false}
\bigskip
+\begin{minipage}[t]{.66\linewidth}
+\fingeringSetup{width=7pt}
+\section*{Tin whistle in D fingering chart}
+\begin{tabular}{*{12}c}
+\toprule
+D & D\# & E & F & F\# & G & G\# & A & A\# & B & C & C\#\\
+\midrule
+\Whistle{D} &
+\Whistle{D#} &
+\Whistle{E} &
+\Whistle{F} &
+\Whistle{F#} &
+\Whistle{G} &
+\Whistle{G#} &
+\Whistle{A} &
+\Whistle{A#} &
+\Whistle{B} &
+\Whistle{C} &
+\Whistle{C#}\\
+\bottomrule
+\end{tabular}
-Here's what the fingering diagrams look like with |thumboffset=false|:
-
-
+\bigskip
+\begin{tabular}{*{13}c}
+\toprule
+d & d\# & e & f & f\# & g & g\# & a & a\# & b & c & c\# & d' \\
+\midrule
+\Whistle{d} &
+\Whistle{d#} &
+\Whistle{e} &
+\Whistle{f} &
+\Whistle{f#} &
+\Whistle{g} &
+\Whistle{g#} &
+\Whistle{a} &
+\Whistle{a#} &
+\Whistle{b} &
+\Whistle{c} &
+\Whistle{c#} &
+\Whistle{d'} \\
+\bottomrule
+\end{tabular}
+\end{minipage}
+\fingeringSetup{width=10pt,thumboffset=false}
+\hfill
+\begin{minipage}[t]{.33\linewidth}
+\section*{\raggedright Example diagrams with \texttt{thumboffset=false}}
\begin{tabular}{cccc}
\toprule
c' & c\#' & d' & eb'\\
\midrule
\Soprano{c'} &
\Soprano{db'} &
-\Soprano{d'} &
+ &
\Soprano{eb'}\\
\bottomrule
\end{tabular}
+\end{minipage}
\clearpage
\section{Using in conjunction with \texttt{musixtex}}
\fingeringSetup{thumboffset=true,width=12pt}