%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                                                 %%
%% Package name: gtrcrd                                            %%
%% Author: Riccardo Bresciani - gtrcrd@tex.nopkoguo.it             %%
%%                                                                 %%
%% Copyright 2012-2013 Riccardo Bresciani                          %%
%%                                                                 %%
%% Description: This package is suitable to add chords to lyrics.  %%
%% The main advantages of using this package is that chords are    %%
%% written before the text they refer to and LaTeX takes care of   %%
%% typesetting them above the lyrics in the right place: thanks to %%
%% this we avoid the task of correctly aligning chords above the   %%
%% lyrics, which is tedious in the case of a monospaced font and   %%
%% absolutely non-trivial in the case of variable-width fonts.     %%
%%                                                                 %%
%% This work may be distributed and/or modified under the          %%
%% conditions of the LaTeX Project Public License, either          %%
%% version 1.3c of this license or (at your option) any            %%
%% later version.                                                  %%
%% The latest version of the license is in                         %%
%%    http://www.latex-project.org/lppl.txt                        %%
%% and version 1.3c or later is part of all distributions of LaTeX %%
%% version 2005/12/01 or later.                                    %%
%%                                                                 %%
%% This work consists of the files: README, gtrcrd.sty,            %%
%% gtrcrd-doc.tex, gtrcrd-doc.pdf                                  %%
%%                                                                 %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ProvidesPackage{gtrcrd} [2013/12/24 v1.1 Guitar chords]

\newlength{\wordwidth}
\newlength{\crdwidth}
\newlength{\crdheight}
\setlength{\crdheight}{3ex}

\newcommand{\crdfont}{\footnotesize \sffamily}

\newcommand{\CHORD}[3][]{%
\settowidth{\wordwidth}{#3}%
\settowidth{\crdwidth}{{\crdfont #2#1}}%
#3%
\hspace{-\wordwidth}\raisebox{2.2ex}{\parbox[b][\crdheight][b]{\crdwidth}{\crdfont #2#1}}%
\addtolength{\wordwidth}{-\crdwidth}%
\hspace{\wordwidth}%
}

\newcommand{\chordsbelow}{%
\renewcommand{\CHORD}[3][]{%
\settowidth{\wordwidth}{##3}%
\settowidth{\crdwidth}{{\crdfont ##2##1}}%
##3%
\hspace{-\wordwidth}\raisebox{-2.2ex}{\parbox[t][\crdheight][t]{\crdwidth}{\crdfont ##2##1}}%
\addtolength{\wordwidth}{-\crdwidth}%
\hspace{\wordwidth}%
}%
}


\newcommand{\crdA}[2][]{\CHORD[#1]{A}{#2}}
\newcommand{\crdB}[2][]{\CHORD[#1]{B}{#2}}
\newcommand{\crdC}[2][]{\CHORD[#1]{C}{#2}}
\newcommand{\crdD}[2][]{\CHORD[#1]{D}{#2}}
\newcommand{\crdE}[2][]{\CHORD[#1]{E}{#2}}
\newcommand{\crdF}[2][]{\CHORD[#1]{F}{#2}}
\newcommand{\crdG}[2][]{\CHORD[#1]{G}{#2}}

\newcommand{\crdAm}[2][]{\CHORD[#1]{Am}{#2}}
\newcommand{\crdBm}[2][]{\CHORD[#1]{Bm}{#2}}
\newcommand{\crdCm}[2][]{\CHORD[#1]{Cm}{#2}}
\newcommand{\crdDm}[2][]{\CHORD[#1]{Dm}{#2}}
\newcommand{\crdEm}[2][]{\CHORD[#1]{Em}{#2}}
\newcommand{\crdFm}[2][]{\CHORD[#1]{Fm}{#2}}
\newcommand{\crdGm}[2][]{\CHORD[#1]{Gm}{#2}}

\newcommand{\crdAb}[2][]{\CHORD[#1]{A$\flat$}{#2}}
\newcommand{\crdBb}[2][]{\CHORD[#1]{B$\flat$}{#2}}
\newcommand{\crdCb}[2][]{\CHORD[#1]{C$\flat$}{#2}}
\newcommand{\crdDb}[2][]{\CHORD[#1]{D$\flat$}{#2}}
\newcommand{\crdEb}[2][]{\CHORD[#1]{E$\flat$}{#2}}
\newcommand{\crdFb}[2][]{\CHORD[#1]{F$\flat$}{#2}}
\newcommand{\crdGb}[2][]{\CHORD[#1]{G$\flat$}{#2}}

\newcommand{\crdAbm}[2][]{\CHORD[#1]{A$\flat$m}{#2}}
\newcommand{\crdBbm}[2][]{\CHORD[#1]{B$\flat$m}{#2}}
\newcommand{\crdCbm}[2][]{\CHORD[#1]{C$\flat$m}{#2}}
\newcommand{\crdDbm}[2][]{\CHORD[#1]{D$\flat$m}{#2}}
\newcommand{\crdEbm}[2][]{\CHORD[#1]{E$\flat$m}{#2}}
\newcommand{\crdFbm}[2][]{\CHORD[#1]{F$\flat$m}{#2}}
\newcommand{\crdGbm}[2][]{\CHORD[#1]{G$\flat$m}{#2}}

\newcommand{\crdAs}[2][]{\CHORD[#1]{A$\sharp$}{#2}}
\newcommand{\crdBs}[2][]{\CHORD[#1]{B$\sharp$}{#2}}
\newcommand{\crdCs}[2][]{\CHORD[#1]{C$\sharp$}{#2}}
\newcommand{\crdDs}[2][]{\CHORD[#1]{D$\sharp$}{#2}}
\newcommand{\crdEs}[2][]{\CHORD[#1]{E$\sharp$}{#2}}
\newcommand{\crdFs}[2][]{\CHORD[#1]{F$\sharp$}{#2}}
\newcommand{\crdGs}[2][]{\CHORD[#1]{G$\sharp$}{#2}}

\newcommand{\crdAsm}[2][]{\CHORD[#1]{A$\sharp$m}{#2}}
\newcommand{\crdBsm}[2][]{\CHORD[#1]{B$\sharp$m}{#2}}
\newcommand{\crdCsm}[2][]{\CHORD[#1]{C$\sharp$m}{#2}}
\newcommand{\crdDsm}[2][]{\CHORD[#1]{D$\sharp$m}{#2}}
\newcommand{\crdEsm}[2][]{\CHORD[#1]{E$\sharp$m}{#2}}
\newcommand{\crdFsm}[2][]{\CHORD[#1]{F$\sharp$m}{#2}}
\newcommand{\crdGsm}[2][]{\CHORD[#1]{G$\sharp$m}{#2}}

\newcommand{\neolatin}{%
\renewcommand{\crdA}[2][]{\CHORD[##1]{La}{##2}}%
\renewcommand{\crdB}[2][]{\CHORD[##1]{Si}{##2}}%
\renewcommand{\crdC}[2][]{\CHORD[##1]{Do}{##2}}%
\renewcommand{\crdD}[2][]{\CHORD[##1]{Re}{##2}}%
\renewcommand{\crdE}[2][]{\CHORD[##1]{Mi}{##2}}%
\renewcommand{\crdF}[2][]{\CHORD[##1]{Fa}{##2}}%
\renewcommand{\crdG}[2][]{\CHORD[##1]{Sol}{##2}}%
%
\renewcommand{\crdAm}[2][]{\CHORD[##1]{Lam}{##2}}%
\renewcommand{\crdBm}[2][]{\CHORD[##1]{Sim}{##2}}%
\renewcommand{\crdCm}[2][]{\CHORD[##1]{Dom}{##2}}%
\renewcommand{\crdDm}[2][]{\CHORD[##1]{Rem}{##2}}%
\renewcommand{\crdEm}[2][]{\CHORD[##1]{Mim}{##2}}%
\renewcommand{\crdFm}[2][]{\CHORD[##1]{Fam}{##2}}%
\renewcommand{\crdGm}[2][]{\CHORD[##1]{Solm}{##2}}%
%
\renewcommand{\crdAb}[2][]{\CHORD[##1]{La$\flat$}{##2}}%
\renewcommand{\crdBb}[2][]{\CHORD[##1]{Si$\flat$}{##2}}%
\renewcommand{\crdCb}[2][]{\CHORD[##1]{Do$\flat$}{##2}}%
\renewcommand{\crdDb}[2][]{\CHORD[##1]{Re$\flat$}{##2}}%
\renewcommand{\crdEb}[2][]{\CHORD[##1]{Mi$\flat$}{##2}}%
\renewcommand{\crdFb}[2][]{\CHORD[##1]{Fa$\flat$}{##2}}%
\renewcommand{\crdGb}[2][]{\CHORD[##1]{Sol$\flat$}{##2}}%
%
\renewcommand{\crdAbm}[2][]{\CHORD[##1]{La$\flat$m}{##2}}%
\renewcommand{\crdBbm}[2][]{\CHORD[##1]{Si$\flat$m}{##2}}%
\renewcommand{\crdCbm}[2][]{\CHORD[##1]{Do$\flat$m}{##2}}%
\renewcommand{\crdDbm}[2][]{\CHORD[##1]{Re$\flat$m}{##2}}%
\renewcommand{\crdEbm}[2][]{\CHORD[##1]{Mi$\flat$m}{##2}}%
\renewcommand{\crdFbm}[2][]{\CHORD[##1]{Fa$\flat$m}{##2}}%
\renewcommand{\crdGbm}[2][]{\CHORD[##1]{Sol$\flat$m}{##2}}%
%
\renewcommand{\crdAs}[2][]{\CHORD[##1]{La$\sharp$}{##2}}%
\renewcommand{\crdBs}[2][]{\CHORD[##1]{Si$\sharp$}{##2}}%
\renewcommand{\crdCs}[2][]{\CHORD[##1]{Do$\sharp$}{##2}}%
\renewcommand{\crdDs}[2][]{\CHORD[##1]{Re$\sharp$}{##2}}%
\renewcommand{\crdEs}[2][]{\CHORD[##1]{Mi$\sharp$}{##2}}%
\renewcommand{\crdFs}[2][]{\CHORD[##1]{Fa$\sharp$}{##2}}%
\renewcommand{\crdGs}[2][]{\CHORD[##1]{Sol$\sharp$}{##2}}%
%
\renewcommand{\crdAsm}[2][]{\CHORD[##1]{La$\sharp$m}{##2}}%
\renewcommand{\crdBsm}[2][]{\CHORD[##1]{Si$\sharp$m}{##2}}%
\renewcommand{\crdCsm}[2][]{\CHORD[##1]{Do$\sharp$m}{##2}}%
\renewcommand{\crdDsm}[2][]{\CHORD[##1]{Re$\sharp$m}{##2}}%
\renewcommand{\crdEsm}[2][]{\CHORD[##1]{Mi$\sharp$m}{##2}}%
\renewcommand{\crdFsm}[2][]{\CHORD[##1]{Fa$\sharp$m}{##2}}%
\renewcommand{\crdGsm}[2][]{\CHORD[##1]{Sol$\sharp$m}{##2}}%
}

\newcommand{\notranspose}{
\let\A\crdA
\let\B\crdB
\let\C\crdC
\let\D\crdD
\let\E\crdE
\let\F\crdF
\let\G\crdG

\let\Am\crdAm
\let\Bm\crdBm
\let\Cm\crdCm
\let\Dm\crdDm
\let\Em\crdEm
\let\Fm\crdFm
\let\Gm\crdGm

\let\Ab\crdAb
\let\Bb\crdBb
\let\Cb\crdCb
\let\Db\crdDb
\let\Eb\crdEb
\let\Fb\crdFb
\let\Gb\crdGb

\let\Abm\crdAbm
\let\Bbm\crdBbm
\let\Cbm\crdCbm
\let\Dbm\crdDbm
\let\Ebm\crdEbm
\let\Fbm\crdFbm
\let\Gbm\crdGbm

\let\As\crdAs
\let\Bs\crdBs
\let\Cs\crdCs
\let\Ds\crdDs
\let\Es\crdEs
\let\Fs\crdFs
\let\Gs\crdGs

\let\Asm\crdAsm
\let\Bsm\crdBsm
\let\Csm\crdCsm
\let\Dsm\crdDsm
\let\Esm\crdEsm
\let\Fsm\crdFsm
\let\Gsm\crdGsm
}

\newcommand\transposeOneUp{
\let\A\crdBb
\let\B\crdC
\let\C\crdDb
\let\D\crdEb
\let\E\crdF
\let\F\crdGb
\let\G\crdAb

\let\Am\crdBbm
\let\Bm\crdCm
\let\Cm\crdDbm
\let\Dm\crdEbm
\let\Em\crdFm
\let\Fm\crdGbm
\let\Gm\crdAbm

\let\Ab\crdA
\let\Bb\crdB
\let\Cb\crdC
\let\Db\crdD
\let\Eb\crdE
\let\Fb\crdF
\let\Gb\crdG

\let\Abm\crdAm
\let\Bbm\crdBm
\let\Cbm\crdCm
\let\Dbm\crdDm
\let\Ebm\crdEm
\let\Fbm\crdFm
\let\Gbm\crdGm

\let\As\crdB
\let\Bs\crdCs
\let\Cs\crdD
\let\Ds\crdE
\let\Es\crdFs
\let\Fs\crdG
\let\Gs\crdA

\let\Asm\crdBm
\let\Bsm\crdCsm
\let\Csm\crdDm
\let\Dsm\crdEm
\let\Esm\crdFsm
\let\Fsm\crdGm
\let\Gsm\crdAm
}

\newcommand\transposeTwoUp{
\let\A\crdB
\let\B\crdCs
\let\C\crdD
\let\D\crdE
\let\E\crdFs
\let\F\crdG
\let\G\crdA

\let\Am\crdBm
\let\Bm\crdCsm
\let\Cm\crdDm
\let\Dm\crdEm
\let\Em\crdFsm
\let\Fm\crdGm
\let\Gm\crdAm

\let\Ab\crdBb
\let\Bb\crdC
\let\Cb\crdDb
\let\Db\crdEb
\let\Eb\crdF
\let\Fb\crdGb
\let\Gb\crdAb

\let\Abm\crdBbm
\let\Bbm\crdCm
\let\Cbm\crdDbm
\let\Dbm\crdEbm
\let\Ebm\crdFm
\let\Fbm\crdGbm
\let\Gbm\crdAbm

\let\As\crdC
\let\Bs\crdD
\let\Cs\crdEb
\let\Ds\crdF
\let\Es\crdG
\let\Fs\crdAb
\let\Gs\crdBb

\let\Asm\crdCm
\let\Bsm\crdDm
\let\Csm\crdEbm
\let\Dsm\crdFm
\let\Esm\crdGm
\let\Fsm\crdAbm
\let\Gsm\crdBbm
}

\newcommand\transposeThreeUp{
\let\A\crdC
\let\B\crdD
\let\C\crdEb
\let\D\crdF
\let\E\crdG
\let\F\crdAb
\let\G\crdBb

\let\Am\crdCm
\let\Bm\crdDm
\let\Cm\crdEbm
\let\Dm\crdFm
\let\Em\crdGm
\let\Fm\crdAbm
\let\Gm\crdBbm

\let\Ab\crdB
\let\Bb\crdCs
\let\Cb\crdD
\let\Db\crdE
\let\Eb\crdFs
\let\Fb\crdG
\let\Gb\crdA

\let\Abm\crdBm
\let\Bbm\crdCsm
\let\Cbm\crdDm
\let\Dbm\crdEm
\let\Ebm\crdFsm
\let\Fbm\crdGm
\let\Gbm\crdAm

\let\As\crdCs
\let\Bs\crdDs
\let\Cs\crdE
\let\Ds\crdFs
\let\Es\crdGs
\let\Fs\crdA
\let\Gs\crdB

\let\Asm\crdCsm
\let\Bsm\crdDsm
\let\Csm\crdEm
\let\Dsm\crdFsm
\let\Esm\crdGsm
\let\Fsm\crdAm
\let\Gsm\crdBm
}

\newcommand\transposeFourUp{
\let\A\crdCs
\let\B\crdDs
\let\C\crdE
\let\D\crdFs
\let\E\crdGs
\let\F\crdA
\let\G\crdB

\let\Am\crdCsm
\let\Bm\crdDsm
\let\Cm\crdEm
\let\Dm\crdFsm
\let\Em\crdGsm
\let\Fm\crdAm
\let\Gm\crdBm

\let\Ab\crdC
\let\Bb\crdD
\let\Cb\crdEb
\let\Db\crdF
\let\Eb\crdG
\let\Fb\crdAb
\let\Gb\crdBb

\let\Abm\crdCm
\let\Bbm\crdDm
\let\Cbm\crdEbm
\let\Dbm\crdFm
\let\Ebm\crdGm
\let\Fbm\crdAbm
\let\Gbm\crdBbm

\let\As\crdD
\let\Bs\crdE
\let\Cs\crdF
\let\Ds\crdG
\let\Es\crdA
\let\Fs\crdBb
\let\Gs\crdC

\let\Asm\crdDm
\let\Bsm\crdEm
\let\Csm\crdFm
\let\Dsm\crdGm
\let\Esm\crdAm
\let\Fsm\crdBbm
\let\Gsm\crdCm
}

\newcommand\transposeFiveUp{
\let\A\crdD
\let\B\crdE
\let\C\crdF
\let\D\crdG
\let\E\crdA
\let\F\crdBb
\let\G\crdC

\let\Am\crdDm
\let\Bm\crdEm
\let\Cm\crdFm
\let\Dm\crdGm
\let\Em\crdAm
\let\Fm\crdBbm
\let\Gm\crdCm

\let\Ab\crdCs
\let\Bb\crdDs
\let\Cb\crdE
\let\Db\crdFs
\let\Eb\crdGs
\let\Fb\crdA
\let\Gb\crdB

\let\Abm\crdCsm
\let\Bbm\crdDsm
\let\Cbm\crdEm
\let\Dbm\crdFsm
\let\Ebm\crdGsm
\let\Fbm\crdAm
\let\Gbm\crdBm

\let\As\crdDs
\let\Bs\crdEs
\let\Cs\crdFs
\let\Ds\crdGs
\let\Es\crdAs
\let\Fs\crdB
\let\Gs\crdCs

\let\Asm\crdDsm
\let\Bsm\crdEsm
\let\Csm\crdFsm
\let\Dsm\crdGsm
\let\Esm\crdAsm
\let\Fsm\crdBm
\let\Gsm\crdCsm
}

\newcommand\transposeSixUp{
\let\A\crdDs
\let\B\crdEs
\let\C\crdFs
\let\D\crdGs
\let\E\crdAs
\let\F\crdB
\let\G\crdCs

\let\Am\crdDsm
\let\Bm\crdEsm
\let\Cm\crdFsm
\let\Dm\crdGsm
\let\Em\crdAsm
\let\Fm\crdBm
\let\Gm\crdCsm

\let\Ab\crdD
\let\Bb\crdE
\let\Cb\crdF
\let\Db\crdG
\let\Eb\crdA
\let\Fb\crdBb
\let\Gb\crdC

\let\Abm\crdDm
\let\Bbm\crdEm
\let\Cbm\crdFm
\let\Dbm\crdGm
\let\Ebm\crdAm
\let\Fbm\crdBbm
\let\Gbm\crdCm

\let\As\crdE
\let\Bs\crdFs
\let\Cs\crdG
\let\Ds\crdA
\let\Es\crdB
\let\Fs\crdC
\let\Gs\crdD

\let\Asm\crdEm
\let\Bsm\crdFsm
\let\Csm\crdGm
\let\Dsm\crdAm
\let\Esm\crdBm
\let\Fsm\crdCm
\let\Gsm\crdDm
}

\newcommand{\transposeSixDown}{\transposeSixUp}

\newcommand{\transposeFiveDown}{
\let\A\crdE
\let\B\crdFs
\let\C\crdG
\let\D\crdA
\let\E\crdB
\let\F\crdC
\let\G\crdD

\let\Am\crdEm
\let\Bm\crdFsm
\let\Cm\crdGm
\let\Dm\crdAm
\let\Em\crdBm
\let\Fm\crdCm
\let\Gm\crdDm

\let\Ab\crdDs
\let\Bb\crdEs
\let\Cb\crdFs
\let\Db\crdGs
\let\Eb\crdAs
\let\Fb\crdB
\let\Gb\crdCs

\let\Abm\crdDsm
\let\Bbm\crdEsm
\let\Cbm\crdFsm
\let\Dbm\crdGsm
\let\Ebm\crdAsm
\let\Fbm\crdBm
\let\Gbm\crdCsm

\let\As\crdF
\let\Bs\crdG
\let\Cs\crdAb
\let\Ds\crdBb
\let\Es\crdC
\let\Fs\crdDb
\let\Gs\crdEb

\let\Asm\crdGm
\let\Bsm\crdGm
\let\Csm\crdAbm
\let\Dsm\crdBbm
\let\Esm\crdCm
\let\Fsm\crdDbm
\let\Gsm\crdEbm
}

\newcommand{\transposeFourDown}{
\let\A\crdF
\let\B\crdG
\let\C\crdAb
\let\D\crdBb
\let\E\crdC
\let\F\crdDb
\let\G\crdEb

\let\Am\crdFm
\let\Bm\crdGm
\let\Cm\crdAbm
\let\Dm\crdBbm
\let\Em\crdCm
\let\Fm\crdDbm
\let\Gm\crdEbm

\let\Ab\crdE
\let\Bb\crdFs
\let\Cb\crdG
\let\Db\crdA
\let\Eb\crdB
\let\Fb\crdCs
\let\Gb\crdD

\let\Abm\crdEm
\let\Bbm\crdFsm
\let\Cbm\crdGm
\let\Dbm\crdAm
\let\Ebm\crdBm
\let\Fbm\crdCsm
\let\Gbm\crdDm

\let\As\crdFs
\let\Bs\crdGs
\let\Cs\crdA
\let\Ds\crdB
\let\Es\crdCs
\let\Fs\crdD
\let\Gs\crdE

\let\Asm\crdFsm
\let\Bsm\crdGsm
\let\Csm\crdAm
\let\Dsm\crdBm
\let\Esm\crdCsm
\let\Fsm\crdDm
\let\Gsm\crdEm
}

\newcommand{\transposeThreeDown}{
\let\A\crdFs
\let\B\crdGs
\let\C\crdA
\let\D\crdB
\let\E\crdCs
\let\F\crdD
\let\G\crdE

\let\Am\crdFsm
\let\Bm\crdGsm
\let\Cm\crdAm
\let\Dm\crdBm
\let\Em\crdCsm
\let\Fm\crdDm
\let\Gm\crdEm

\let\Ab\crdF
\let\Bb\crdG
\let\Cb\crdAb
\let\Db\crdBb
\let\Eb\crdC
\let\Fb\crdDb
\let\Gb\crdEb

\let\Abm\crdFm
\let\Bbm\crdGm
\let\Cbm\crdAbm
\let\Dbm\crdBbm
\let\Ebm\crdCm
\let\Fbm\crdDbm
\let\Gbm\crdEbm

\let\As\crdG
\let\Bs\crdA
\let\Cs\crdBb
\let\Ds\crdC
\let\Es\crdD
\let\Fs\crdEb
\let\Gs\crdF

\let\Asm\crdGm
\let\Bsm\crdAm
\let\Csm\crdBbm
\let\Dsm\crdCm
\let\Esm\crdDm
\let\Fsm\crdEbm
\let\Gsm\crdFm
}

\newcommand{\transposeTwoDown}{
\let\A\crdG
\let\B\crdA
\let\C\crdBb
\let\D\crdC
\let\E\crdD
\let\F\crdEb
\let\G\crdF

\let\Am\crdGm
\let\Bm\crdAm
\let\Cm\crdBbm
\let\Dm\crdCm
\let\Em\crdDm
\let\Fm\crdEbm
\let\Gm\crdFm

\let\Ab\crdFs
\let\Bb\crdGs
\let\Cb\crdA
\let\Db\crdB
\let\Eb\crdCs
\let\Fb\crdDs
\let\Gb\crdE

\let\Abm\crdFsm
\let\Bbm\crdGsm
\let\Cbm\crdAm
\let\Dbm\crdBm
\let\Ebm\crdCsm
\let\Fbm\crdDsm
\let\Gbm\crdEm

\let\As\crdGs
\let\Bs\crdAs
\let\Cs\crdB
\let\Ds\crdCs
\let\Es\crdDs
\let\Fs\crdE
\let\Gs\crdFs

\let\Asm\crdGsm
\let\Bsm\crdAsm
\let\Csm\crdBm
\let\Dsm\crdCsm
\let\Esm\crdDsm
\let\Fsm\crdEm
\let\Gsm\crdFsm
}

\newcommand{\transposeOneDown}{
\let\A\crdGs
\let\B\crdAs
\let\C\crdB
\let\D\crdCs
\let\E\crdDs
\let\F\crdE
\let\G\crdFs

\let\Am\crdGsm
\let\Bm\crdAsm
\let\Cm\crdBm
\let\Dm\crdCsm
\let\Em\crdDsm
\let\Fm\crdEm
\let\Gm\crdFsm

\let\Ab\crdG
\let\Bb\crdA
\let\Cb\crdBb
\let\Db\crdC
\let\Eb\crdD
\let\Fb\crdEb
\let\Gb\crdF

\let\Abm\crdGm
\let\Bbm\crdAm
\let\Cbm\crdBbm
\let\Dbm\crdCm
\let\Ebm\crdDm
\let\Fbm\crdEbm
\let\Gbm\crdFm

\let\As\crdA
\let\Bs\crdB
\let\Cs\crdC
\let\Ds\crdD
\let\Es\crdE
\let\Fs\crdF
\let\Gs\crdG

\let\Asm\crdAm
\let\Bsm\crdBm
\let\Csm\crdCm
\let\Dsm\crdDm
\let\Esm\crdEm
\let\Fsm\crdFm
\let\Gsm\crdGm
}

\DeclareOption{notranspose}{
\notranspose
}

\DeclareOption{transposeOneUp}{
\transposeOneUp
}

\DeclareOption{transposeTwoUp}{
\transposeTwoUp
}

\DeclareOption{transposeThreeUp}{
\transposeThreeUp
}

\DeclareOption{transposeFourUp}{
\transposeFourUp
}

\DeclareOption{transposeFiveUp}{
\transposeFiveUp
}

\DeclareOption{transposeSixUp}{
\transposeSixUp
}

\DeclareOption{transposeSixDown}{
\transposeSixDown
}

\DeclareOption{transposeFiveDown}{
\transposeFiveDown
}

\DeclareOption{transposeFourDown}{
\transposeFourDown
}

\DeclareOption{transposeThreeDown}{
\transposeThreeDown
}

\DeclareOption{transposeTwoDown}{
\transposeTwoDown
}

\DeclareOption{transposeOneDown}{
\transposeOneDown
}

\newcommand{\normalize}{
\renewcommand\crdBs[2][]{\crdC[##1]{##2}}
\renewcommand\crdEs[2][]{\crdF[##1]{##2}}
\renewcommand\crdBsm[2][]{\crdCm[##1]{##2}}
\renewcommand\crdEsm[2][]{\crdFm[##1]{##2}}

\renewcommand\crdCb[2][]{\crdB[##1]{##2}}
\renewcommand\crdFb[2][]{\crdE[##1]{##2}}
\renewcommand\crdCbm[2][]{\crdBm[##1]{##2}}
\renewcommand\crdEbm[2][]{\crdDsm[##1]{##2}}
}

\newcommand{\sharponly}{
\renewcommand\crdAb[2][]{\crdGs[##1]{##2}}
\renewcommand\crdBb[2][]{\crdAs[##1]{##2}}
\renewcommand\crdCb[2][]{\crdB[##1]{##2}}
\renewcommand\crdDb[2][]{\crdCs[##1]{##2}}
\renewcommand\crdEb[2][]{\crdDs[##1]{##2}}
\renewcommand\crdFb[2][]{\crdE[##1]{##2}}
\renewcommand\crdGb[2][]{\crdFs[##1]{##2}}

\renewcommand\crdAbm[2][]{\crdGsm[##1]{##2}}
\renewcommand\crdBbm[2][]{\crdAsm[##1]{##2}}
\renewcommand\crdCbm[2][]{\crdBm[##1]{##2}}
\renewcommand\crdDbm[2][]{\crdCsm[##1]{##2}}
\renewcommand\crdEbm[2][]{\crdDsm[##1]{##2}}
\renewcommand\crdFbm[2][]{\crdEm[##1]{##2}}
\renewcommand\crdGbm[2][]{\crdFsm[##1]{##2}}
}

\newcommand{\flatonly}{
\renewcommand\crdAs[2][]{\crdBb[##1]{##2}}
\renewcommand\crdBs[2][]{\crdC[##1]{##2}}
\renewcommand\crdCs[2][]{\crdDb[##1]{##2}}
\renewcommand\crdDs[2][]{\crdEb[##1]{##2}}
\renewcommand\crdEs[2][]{\crdF[##1]{##2}}
\renewcommand\crdFs[2][]{\crdGb[##1]{##2}}
\renewcommand\crdGs[2][]{\crdAb[##1]{##2}}

\renewcommand\crdAsm[2][]{\crdBbm[##1]{##2}}
\renewcommand\crdBsm[2][]{\crdCm[##1]{##2}}
\renewcommand\crdCsm[2][]{\crdDbm[##1]{##2}}
\renewcommand\crdDsm[2][]{\crdEbm[##1]{##2}}
\renewcommand\crdEsm[2][]{\crdFm[##1]{##2}}
\renewcommand\crdFsm[2][]{\crdGbm[##1]{##2}}
\renewcommand\crdGsm[2][]{\crdAbm[##1]{##2}}
}

\DeclareOption{sharponly}{
\sharponly
}

\DeclareOption{flatonly}{
\flatonly
}

\DeclareOption{normalize}{
\normalize
}

\DeclareOption{chordsbelow}{
\chordsbelow
}

\DeclareOption{neolatin}{
\neolatin
}

\ExecuteOptions{notranspose}
\ProcessOptions