\input musixtex
\input musixlyr                        % for lyrics
\input $HOME/tex/music/tabs/mymusixsty % for \author, \maketitle etc.
\input $HOME/tex/music/tabs/tabdefs    % extra macros for tabs and chords
%
\hoffset=-15.4mm\hsize=190mm\voffset=-15.4mm\vsize=259mm
\nopagenumbers
\fulltitle{tabdefs.tex}
\subtitle{\svtpoint\bf Tabulature macros for \musixtex}
\author{By R.J. Gelten\\%
        Please send comments and\\suggestions to {\tt tgakrg$@$chem.tue.nl}%
}
\othermention{%
 \noindent Tuning:\\
 \tuning{1}{D} \quad \tuning{4}{D} \quad \\
 \tuning{2}{A} \quad \tuning{5}{A} \quad \\
 \tuning{3}{G} \quad \tuning{6}{D}
}
\maketitle
%\reversestrings
%%%%%%%%%%%%%%%%%%%%%%%%%%
% EXAMPLES IN FOUR SIZES %
%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\putdisclaimer
\settab 1
\nobarnumbers
\let\extractline\leftline
\hbox{\hskip20pt
\vbox{\hsize=50mm
\generalmeter{\meterfrac{2}{10}}
\smalltabsize
\showstrings D A G D A D
\startextract
  \znotes\upchord{D/F$\sharp$}\en
  \Notes\tab64\tab17\tab20\tab37\tab17\tab20\tab37\tab40\en
  \bar
  \Notes\chotab60\chotab5{12}\chotab40\chotab30\chotab2{14}\tab10\sk\en
\setrightrepeat\endextract
}\hskip 4cm
\vbox{\hsize=50mm
\generalmeter{\meterfrac44}
\normaltabsize
\showstrings D A G D A D
\startextract
  \znotes\upchord{D/F$\sharp$}\en
  \Notes\tab64\tab17\tab20\tab37\tab17\tab20\tab37\tab40\en
  \bar
  \Notes\chotab60\chotab5{12}\chotab40\chotab30\chotab2{14}\tab10\sk\en
\setrightrepeat\endextract
}}

\hbox{\hskip20pt
\vbox{\hsize=50mm
\largetabsize
\showstrings D A G D A D
\startextract
  \znotes\upchord{D/F$\sharp$}\en
  \Notes\tab64\tab17\tab20\tab37\tab17\tab20\tab37\tab40\en
  \bar
  \Notes\chotab60\chotab5{12}\chotab40\chotab30\chotab2{14}\tab10\sk\en
\setrightrepeat\endextract
}\hskip 4cm
\vbox{\hsize=50mm
\Largetabsize
\showstrings D A G D A D
\startextract
  \znotes\upchord{D/F$\sharp$}\en
  \Notes\tab64\tab17\tab20\tab37\tab17\tab20\lyr\tab37\tab40\en
  \bar
  \Notes\chotab60\chotab5{12}\chotab40\chotab30\chotab2{14}\tab10\sk\en
\setrightrepeat\endextract
}}


\instrumentnumber{2}
\settab 1
\generalmeter{\meterC}
\nobarnumbers
\interinstrument=6\internote
\startpiece
%% bar1
\znotes\upchord{D}\en
\Notes\tab17\tab20\tab37\tab17\tab20\tab37\tab40%
     &\ibu0m0\qb0 {`d}\qb0 {'o}\qb0 h\tbu0\qb0 k%
      \ibu0m0\qb0 o\qb0 h\qb0 k\tbu0\qb0 d\en
\leftrightrepeat %%% 2
\znotes\upchord{D/F$\sharp$}\en
\Notes\tab64\tab17\tab20\tab37\tab17\tab20\tab37\tab40%
     &\ibu0m0\qb0 {`f}\qb0 {'o}\qb0 h\tbu0\qb0 k%
      \ibu0m0\qb0 o\qb0 h\qb0 k\tbu0\qb0 d\en
\bar %%% 3
\znotes\upchord{D/G}\en
\Notes\tab65\tab17\tab20\tab37\tab17\tab20\tab37\tab40%
     &\ibu0m0\qb0 {`g}\qb0 {'o}\qb0 h\tbu0\qb0 k%
      \ibu0m0\qb0 o\qb0 h\qb0 k\tbu0\qb0 d\en
\setrightrepeat
\endpiece
%%%%%%%%%%%%%%%%%%%%
% EXPLANATORY TEXT %
%%%%%%%%%%%%%%%%%%%%
\parindent=20pt
\def\mybsl{\char`\\}
\def\mylbr{\char`\{}
\def\myrbr{\char`\}}
\largetabsize
\item{-}{\tt\mybsl settab$n$} sets the tabulature defaults for instrument
  $n$. These defaults include {\tt\mybsl setlines$n$ 6}, 
  \par{\tt\mybsl setclefsymbol$n$\mylbr\mybsl tabclef\myrbr} and
  {\tt\mybsl largetabsize}.
\item{-}The names of the strings can be printed by calling the macro
  {\tt\mybsl showstrings\mylbr$s_1 s_2 s_3 s_4 s_5 s_6$\myrbr}, where 
  each $s$ gets a string name.
\item{-}In the dvi-file, the tabulature may look ugly because of the box
  that is placed behind each number on a string. The postscript file,
  however, should look a lot better.
\item{-}Setting the {\sl meters} works in the usual way, with
  {\tt\mybsl generalmeter}, {\tt\mybsl setmeter} etc.
\item{-} 
  If you like the disclaimer, you can use it by putting
  {\tt\mybsl putdisclaimer} in your document. It doesn't work when
  {\tt musixsty} is included. To change the text of the
  disclaimer, you can redefine the two lines with:
  {\tt\mybsl def\mybsl disclineone\mylbr text\myrbr} and
  {\tt\mybsl def\mybsl disclinetwo\mylbr text\myrbr}. 
\item{-} 
  The sizes of the tabs above were set with {\tt\mybsl smalltabsize},
  {\tt\mybsl normaltabsize},  {\tt\mybsl largetabsize} and
  {\tt\mybsl Largetabsize}. The default is {\tt\mybsl largetabsize}.
  These macros give false behaviour if used together with 
  {\tt\mybsl smallmusicsize} etc.,
  because {\tt\mybsl smallmusicsize} sets the staff line distance for all
  instruments, but does not set the right font size for tabulature staffs. 
  Use in combination with {\tt\mybsl setsize$n$\mylbr$size$\myrbr} to get
  correct spacings and fonts for all instruments.
%
\item{-} The macros that put numbers on the TAB-lines are:
 \itemitem{$*$} {\tt\mybsl tab}$n p$, where $n = 1,...,6$ is the string 
 number (1 is the highest string) and $p$ is the number that is put
 on the TAB-line. The numbers are centered (they use {\tt\mybsl ccharnote}).
 \itemitem{$*$} {\tt\mybsl ltab}$n p$ uses {\tt\mybsl lcharnote},
 hence the TAB-numbers spill to the left.
 \itemitem{$*$} {\tt\mybsl rtab}$n p$ uses {\tt\mybsl rcharnote},
 hence the TAB-numbers spill to the right.
 \itemitem{$*$} {\tt\mybsl chotab}$n p$ is a {\tt\mybsl tab} without
 a skip. It is used to put the numbers above each other (like for a
 chord).
 \itemitem{$*$} {\tt\mybsl lchotab}$n p$ is a left-spilling
 {\tt\mybsl chotab}.
 \itemitem{$*$} {\tt\mybsl rchotab}$n p$ is a right-spilling
 {\tt\mybsl chotab}.
\item{ }Lyrics can be used in the usual way.
\item{-}The string counting can be reversed by invoking the macro
{\tt\mybsl reversestrings}. The macro {\tt\mybsl guitarstrings} reverses
this behaviour back to the common way to indicate guitar strings.
\item{-}Some \labove{macros}{C} are \cabove{defined}{D} to
put chords \rabove{above}{E} the lyrics.
The code for the three chords in this line are:\par
{\tt\mybsl labove\mylbr macros\myrbr\mylbr C\myrbr},
{\tt\mybsl cabove\mylbr defined\myrbr\mylbr D\myrbr} and
{\tt\mybsl rabove\mylbr above\myrbr\mylbr E\myrbr}.

%
\bye


