%%%%%%%%%%%%%%%%   General Definitions %%%%%%%%%%%%%%%%%%%%%%


\newcommand{\stack}[3]{\hspace{-#1in}\raisebox{#2ex}{#3}\hspace{4.5ex}}
\newcommand{\ngs}[1]{\hspace{-#1mm}}
\newcommand{\pss}[1]{\hspace{#1mm}}
\newcommand{\ups}[2]{\raisebox{#1mm}{#2}}
\newcommand{\dns}[2]{\raisebox{-#1mm}{#2}}
\newcommand{\x}[1]{\stack{.3}{4}{#1}}
\newcommand{\xx}[4]{\x{#1\stack{#2}{#3}{#4}}}
\newcommand{\putab}[1]{\stack{.5}{2}{#1}}
\newcommand{\Hdot}{\Huge .}

%%%%%%%%%%%%%%%%% Combined Characters Definitions %%%%%%%%%%%%%%

%%% Combinations with Xamili

\newcommand{\xaxa}{\xam\stack{.4}{1.5}{\xam}}
\newcommand{\aexa}{\xam\stack{.35}{-2.3}{\apell}}
\newcommand{\elxa}{\xam\stack{.5}{-1.9}{\ela}}
\newcommand{\apxa}{\xam\stack{.3}{-1.8}{\afl}}

\newcommand{\dant}{\ant\stack{.3}{1.5}{\Hdot}}
\newcommand{\daap}{\Apo\stack{.35}{-3.5}{\dant}}
\newcommand{\apkl}{\Apo\stack{.35}{2.5}{\kla}}
\newcommand{\vmdi}{\ngs{15}\dns{.5}\mdi\stack{.15}{3}{n}}
\newcommand{\grkn}{\knt\stack{.2}{-1.5}{\gor}}
\newcommand{\olke}{\oli\stack{.35}{1.5}{\ken}}
\newcommand{\psfol}{\oli\stack{.35}{-3}{\psf}}
\newcommand{\psfis}{\Iso\stack{.35}{-3}{\psf}}
\newcommand{\keol}{\oli\stack{.35}{-1.5}{\ken}}
\newcommand{\knol}{\oli\stack{.35}{-1}{\knt}}
\newcommand{\knoll}{\oli\stack{.2}{-1}{\knt}}
\newcommand{\olkn}{\oli\stack{.35}{1}{\knt}}
\newcommand{\psolkn}{\olkn\stack{.6}{-3}{\psf}}
\newcommand{\oakn}{\oli\stack{.5}{1}{\afl\ngs{5}\knt}}
\newcommand{\suel}{\Apo\ups{1}{\Ela}}
\newcommand{\omolol}{\oli\hspace{.08in}\oli\stack{.65}{-3.5}{\oma}}
\newcommand{\isol}{\Iso\stack{.4}{-3.5}{\psf}}
\newcommand{\psol}{\oli\stack{.4}{-3.5}{\psf}}
\newcommand{\pskeol}{\keol\stack{.65}{-3.5}{\psf}}
\newcommand{\okla}{\oli\stack{.35}{1}{\kla}}
\newcommand{\ikla}{\iso\stack{.3}{1}{\kla}}
\newcommand{\anol}{\oli\stack{.4}{-3}{\ant}}
\newcommand{\oiom}{\oli\ \Iso\stack{.5}{-3.5}{\oma}}
\newcommand{\olis}{\oli\stack{.45}{1.8}{\Iso}}
\newcommand{\peol}{\pet\stack{.35}{2}{\oli}}
\newcommand{\peis}{\pet\stack{.45}{2.5}{\Iso}}
\newcommand{\peel}{\pet\stack{.48}{3.3}{\Ela}}
\newcommand{\apel}{\afl\stack{.52}{.95}{\Ela}}
\newcommand{\apell}{\afl\stack{.61}{.55}{\ela}}
\newcommand{\peapel}{\peel\stack{.75}{1.8}{\apo}}
\newcommand{\oliskn}{\oli\stack{.5}{1.3}{\iso}\stack{.43}{1.3}{\knt}}
\newcommand{\olupkn}{\oli\stack{.45}{1.3}{\upo}\stack{.36}{1.3}{\knt}}
\newcommand{\olelkn}{\oli\stack{.65}{1.5}{\ela}\stack{.45}{1.5}{\knt}}
\newcommand{\olk}{\oli\ken}
\newcommand{\okkn}{\olk\stack{.6}{1.5}{\knt}}
\newcommand{\knok}{\olk\stack{.55}{-1.5}{\knt}}
\newcommand{\peup}{\pet\stack{.3}{2.5}{\upo}}
\newcommand{\oipd}{\oli\stack{.15}{1.5}{\ips}}
\newcommand{\oipa}{\oli\stack{.45}{1.5}{\ips}}
\newcommand{\pipd}{\pet\stack{.15}{2.5}{\ips}}
\newcommand{\pipa}{\pet\stack{.45}{2.5}{\ips}}
\newcommand{\olxa}{\oli\stack{.45}{1.5}{\xam}}
\newcommand{\pexa}{\pet\stack{.45}{2.5}{\xam}}
\newcommand{\oxkn}{\oli\stack{.55}{1.5}{\xam\ngs{1}\knt}}

%%%%%%%%%%%%%%%%% Tone Definitions %%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% A Tone

\newcommand{\AHXOC}[1]{\ooe\stack{.20}{2.8}{\ips}\ngs{8}#1}

%%% B Tone

\newcommand{\BHXOC}[1]{\dns{2}{\xmb}\stack{.25}{1.5}{\knoll}
\ngs{20}#1\stack{.25}{1.5}\xfe}
\newcommand{\BHXOCpa}{\dns{2}{\xmb}\stack{.25}{1.5}{\knoll}
\ngs{20}Pa\stack{.25}{1.5}\xfd}

%%% C Tone

\newcommand{\CHXOCga}{\pss{2}\chx\pss{1}Ga}
\newcommand{\CHXOCgapa}{\pss{2}\chx\pss{1}Ga Pa\stack{.39}{2.5}{\ela}}
\newcommand{\CHXOCpa}{\dns{1.5}{\mga\stack{.15}{2.5}{\gor}}\ngs{8}Pa
\stack{.45}{2.5}{\ela}}
\newcommand{\CHXOC}{\oli\stack{.3}{-1.5}{\god}\stack{.5}{1.5}{\knoll}}

%%% D Tone

\newcommand{\DHXOC}[1]{\mdd\stack{.18}{3.2}{\ips} #1}

%%% A Plagal Tone

\newcommand{\pAHXOC}{l\stack{.1}{1.8}{p}\ngs{5}\ooe Pa}
\newcommand{\pAHXOCeip}{l\stack{.1}{1.8}{p}\ngs{5}\ooe
\pss{3}Pa\pss{3}\raisebox{-6mm}{Ke\stack{.20}{2.8}{\oipd}}}

%%% B Plagal Tone

\newcommand{\pBHXOCpa}{l\stack{.1}{1.5}p\ngs{5}\xmb\pss{5}{Pa}
\stack{.17}{1.5}{\xfd}}
\newcommand{\pBHXOCdia}{l\stack{.1}{1.5}p\ngs{5}\xmb\pss{5}{Pa}
\stack{.17}{1.5}{\xfd}\ngs{6}\olke}
\newcommand{\pBHXOCdib}{l\stack{.1}{1.5}p\ngs{5}\xmb\pss{5}{Pa}\pss{5}
\olke\stack{.55}{-2.5}{\xfa}}
\newcommand{\pBHXOCbou}{l\stack{.1}{1.5}p\ngs{5}\xmb\pss{5}{Bou}
\stack{.25}{1.5}{\xfe}}
\newcommand{\pBHXOCboua}{l\stack{.1}{1.5}p\ngs{5}\xmb\pss{5}{Bou}
\stack{.25}{1.5}{\xfe}}
\newcommand{\pBHXOCboub}{l\stack{.1}{1.5}p\ngs{5}\xmb\pss{5}{Bou}
\stack{.25}{1.5}{\xfe}\ngs{6}\knoll}

%%% Heavy Tone

\newcommand{\BAPYC}[1]{\mvd\pss{3}#1}

%%% D Plagal Tone

\newcommand{\pDHXOC}{l\stack{.1}{1.8}{p}\ngs{5}\mdd}
\newcommand{\NH}{\mdd\stack{.12}{2.5}n}

%%%%%%%%%%%%%%%%% Tempo Definitions %%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\BPA}{\ups{2}{q\stack{.25}{1}{\drg}}}
\newcommand{\MEC}{\ups{2}{q\stack{.25}{1}{\dia}}}
\newcommand{\MTP}{\ups{2}{q\stack{.25}{1}{\arg}}}
\newcommand{\KAN}{\ups{2}{q\stack{.18}{1}{\kav}}}
\newcommand{\TAX}{\ups{2}{q\stack{.08}{1}{\gor}}}
\newcommand{\XYM}{\ups{2}{q\stack{.08}{1}{\dgr}}}
