| 1 |
\documentclass{article} |
| 2 |
\usepackage{gchords} |
| 3 |
\usepackage{geometry} |
| 4 |
\usepackage{rotating} |
| 5 |
|
| 6 |
\begin{document} |
| 7 |
\begin{center} |
| 8 |
{\Large GCHORDS, a \LaTeXe\ package to draw guitar chord diagrams}\\ |
| 9 |
\vskip 0.2cm |
| 10 |
{\large by Kasper Peeters, [email protected]} |
| 11 |
\end{center} |
| 12 |
\vskip 4cm GCHORDS is a \LaTeXe\ package to draw those familiar guitar |
| 13 |
chord diagrams. Options are available to draw them in any size, using |
| 14 |
any number of strings, produce black dotes or numbered circles to |
| 15 |
denote fingers, add chordnames, show the number of the top fret, |
| 16 |
specify fonts for almost any symbol occuring in the diagram and many |
| 17 |
more. There is also a macro to typeset chords above lyrics. A small |
| 18 |
TCL script for graphical construction of chord symbols is also |
| 19 |
included. This is a short guide to show how the commands work, with a |
| 20 |
few examples included. Feel free to contact me if you want other |
| 21 |
features included. |
| 22 |
\medskip |
| 23 |
|
| 24 |
Note that, in order for this to work, you need the \LaTeX\ `lcircle' font |
| 25 |
in various sizes. |
| 26 |
\medskip |
| 27 |
|
| 28 |
The homepage for this macro package is |
| 29 |
{\tt http://www.damtp.cam.ac.uk/user/kp229/gchords/}. |
| 30 |
|
| 31 |
\renewcommand\topfretsiz{3pt} |
| 32 |
|
| 33 |
%------------------------------------------------------------------------- |
| 34 |
\section{Quick guide} |
| 35 |
|
| 36 |
The main macro is called {\tt$\backslash$chord}, and should be used as follows: |
| 37 |
|
| 38 |
\bigskip |
| 39 |
{$\backslash${\tt chord}\{{\it modifiers}\/\}\{$x_1,x_2,\ldots$\}\{{\it |
| 40 |
name}\/\}}, where |
| 41 |
\begin{itemize} |
| 42 |
\item {\it modifiers}\/: Currently, there are two uses of this part. |
| 43 |
Putting a `t' in it draws a thick top fret. Putting in an arbitrary number |
| 44 |
(large numbers must be put in curly braces) resuls in this number being |
| 45 |
printed at the top left corner of the diagram (denoting a fret position). |
| 46 |
\item $x_1,x_2,\ldots$: Each $x_i$ contains the information for a single |
| 47 |
string. Recognized commands are |
| 48 |
\begin{itemize} |
| 49 |
\item {\tt b}: This note is a base note and will be printed a bit larger |
| 50 |
than the others, |
| 51 |
\item {\tt n}: This string does not contain any dots. |
| 52 |
\item {\tt x}: This string should be muted (a $\times$ appears above the |
| 53 |
string). |
| 54 |
\item {\tt o}: This string should be explicitly labelled as open (a |
| 55 |
$\circ$ symbol appears above the |
| 56 |
string). |
| 57 |
\item {\tt f{\it num}\/}: This note should be played with finger number |
| 58 |
{\it num}\/. The number will be put inside the (open) dot. |
| 59 |
\item {\tt p{\it num}\/}: Fret number on which the dot should be |
| 60 |
placed. If you need numbers larger than $9$, they must be enclosed in |
| 61 |
curly braces. |
| 62 |
\item {\tt t{\it txt}\/}: Adds a label to this string, to be put at |
| 63 |
the very top of the diagram (useful to add the name of the note, for |
| 64 |
instance). If you need more than one character, put the text in |
| 65 |
curly brackets (though this probably will not fit). |
| 66 |
\item {\tt s{\it num}\/}: Use a different string to put this note on. |
| 67 |
\end{itemize} |
| 68 |
\item {\it name}\/: The name of the chord. Appears underneath the diagram. |
| 69 |
\end{itemize} |
| 70 |
If you want to put more notes on one string, just add the $f$ and $p$ |
| 71 |
sequences. They {\em must}\/ appear in top-down order in order for the |
| 72 |
strings to be drawn correctly. |
| 73 |
|
| 74 |
The chord macro can be used in tables if you need a lot of diagrams neatly |
| 75 |
aligned. For a row of diagrams, the shortcut {$\backslash$\texttt{chords}$\{$ |
| 76 |
\textit{chords}$\}$} may be used (where {\it chords}\/ is a sequence of chord |
| 77 |
macros). |
| 78 |
|
| 79 |
\smallchords\def\xoff{0}\def\yoff{0} A few examples will illustrate |
| 80 |
the possibilities. First, lets put a diagram in the text itself, like |
| 81 |
\chord{t}{n,n,p2,p2,p1,n}{}, which is just A minor. The numbers of the |
| 82 |
fingers can be put in, resulting in |
| 83 |
\chord{t}{n,n,f2p2,f0p2,f1p1,n}{}. Now let's make the diagrams a bit |
| 84 |
larger and put them in a separate line, like |
| 85 |
\def\numfrets{6}\mediumchords\def\xoff{2}\def\yoff{2} |
| 86 |
\chords{\chord{t}{t{E}n,t{A}n,t{E}f{m}p2,t{A}f3p2,t{C}f1p1,t{E}n}{Am}\chord{t}{x,f3p3,f2p2,o,f1p1,n}{C}} |
| 87 |
In the first diagram you can see how to put note names at the top of |
| 88 |
the diagram. It is also possible to display a larger part of the |
| 89 |
neck, like in \def\numfrets{10} |
| 90 |
\chords{\chord{t}{p5,p7,p7,p6,p5,p5}{A}} which can also be displayed |
| 91 |
as \def\numfrets{5} \chords{\chord{{5~}}{p1,p3,p3,p2,p1,p1}{A}} Nice |
| 92 |
patterns to play are the following: |
| 93 |
\chords{\chord{}{p1p4,p1p3,p1p3,p1p3,p1p4,p1p4}{} \def\numfrets{20} |
| 94 |
\chord{}{p{10}p{13},p{10}p{12},p{10}p{12},p{10}p{12},p{10}p{13},p{10}p{13}}{}} |
| 95 |
|
| 96 |
%------------------------------------------------------------------------- |
| 97 |
\section{Gchords and lyrics} |
| 98 |
|
| 99 |
You can also typeset chords above lyrics by using the {\tt |
| 100 |
$\backslash$upchord} command, provided by Yotam Medini. You use it as |
| 101 |
follows |
| 102 |
\begin{verbatim} |
| 103 |
\begin{verse} |
| 104 |
\smallchords |
| 105 |
\newcommand{\AsevenMaj}{\chord{t}{x,n,p2,p1,p2,n}{A7+}} |
| 106 |
Getting to \upchord{\AsevenMaj}know you |
| 107 |
\end{verse} |
| 108 |
\end{verbatim} |
| 109 |
which produces the output |
| 110 |
\begin{verse} |
| 111 |
\smallchords |
| 112 |
\newcommand{\AsevenMaj}{\chord{t}{x,n,p2,p1,p2,n}{A7+}} |
| 113 |
Getting to \upchord{\AsevenMaj}know you |
| 114 |
\end{verse} |
| 115 |
See the file {\tt get2knowu.tex} for a more complicated example. |
| 116 |
|
| 117 |
There is currently no functionality for rotated diagrams, but you can |
| 118 |
rotate the diagrams using the ``rotating'' package: |
| 119 |
{\smallchords\hspace{10ex}\raisebox{-10ex}{\vbox{\begin{rotate}{90} |
| 120 |
\chord{t}{x,n,p2,p1,p2,n}{A7+} |
| 121 |
\end{rotate}}}} |
| 122 |
|
| 123 |
%------------------------------------------------------------------------- |
| 124 |
\section{Chordbox graphical chord editor} |
| 125 |
|
| 126 |
Included in the distribution is a small TCL script which provides a |
| 127 |
graphical editor for chords. This script was written by David R.~Lovell. |
| 128 |
To start it, for instance with 8 frets, type |
| 129 |
\begin{quote} |
| 130 |
\verb|wish chordbox.tcl 8| |
| 131 |
\end{quote} |
| 132 |
After constructing the chord and entering the name, press the `print' button |
| 133 |
to see the \LaTeX{} command printed on stdout. |
| 134 |
|
| 135 |
It is possible to use the `b' and `\#' symbols in the `name' field to |
| 136 |
denote `flat' and `sharp' chords. |
| 137 |
|
| 138 |
%------------------------------------------------------------------------- |
| 139 |
\section{Sizes and defaults} |
| 140 |
|
| 141 |
It's possible to change the dimensions, fonts, number of strings etc.\ by |
| 142 |
using one of the following settings. |
| 143 |
\begin{itemize} |
| 144 |
\item {$\backslash${\tt strings}\{{\it num}\/\}}: number of strings on your guitar. |
| 145 |
\item {$\backslash${\tt numfrets}\{{\it num}\/\}}: length (number of frets) of |
| 146 |
a diagram. |
| 147 |
\item {$\backslash${\tt chordsize}\{{\it dim}\/\}}: distance between two frets in some |
| 148 |
dimension known to \TeX. |
| 149 |
\item {$\backslash${\tt fingerfont}\{{\it font}\/\}}: font used for numbering of |
| 150 |
fingers. This can be any font, but if it is too large, the number will not |
| 151 |
fit into the circle, so beware. |
| 152 |
\item {$\backslash${\tt namefont}\{{\it font}\/\}}: font used when typesetting the name |
| 153 |
of the chord. |
| 154 |
\item {$\backslash${\tt fretposfont}\{{\it font}\/\}}: font used when typesetting the |
| 155 |
position of on the neck of the top fret in the diagram. |
| 156 |
\item {$\backslash${\tt dampsymbol}\{{\it symbol}\/\}}: a single symbol in any font you |
| 157 |
like, used to denote damped strings (usually a $\times$). |
| 158 |
\item {$\backslash${\tt fatsiz}\{{\it dec}\/\}}: size of a fat note (the physical size |
| 159 |
will be {$\backslash${\tt fatsiz*}$\backslash${\tt chordsize/2}}). |
| 160 |
\item {$\backslash${\tt normalsiz}\{{\it dec}\/\}}: size of a normal note. |
| 161 |
\item {$\backslash${\tt fingsiz}\{{\it dec}\/\}}: size of the circle used to produce |
| 162 |
`numbered fingers'. |
| 163 |
\item {$\backslash${\tt fatfingsiz}\{{\it dec}\/\}}: size of the circle used to produce |
| 164 |
`numbered fingers', used for the fatter notes. |
| 165 |
\item {$\backslash${\tt topfretsiz}\{{\it dim}\}}: thickness of the |
| 166 |
top fret (when the `t' modifier is used). |
| 167 |
\item {$\backslash${\tt xoff}\{{\it dec}\/\}},{$\backslash${\tt yoff}\{{\it dec}\/\}}: the left lower |
| 168 |
corner of the diagram in units of {$\backslash${\tt chordsize}}. |
| 169 |
\end{itemize} |
| 170 |
|
| 171 |
There are two sizes predefined, which can be activated by |
| 172 |
{$\backslash${\tt smallchords}} and {$\backslash${\tt mediumchords}}. |
| 173 |
|
| 174 |
|
| 175 |
\end{document} |