diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/gchords')
-rw-r--r-- | Master/texmf-dist/doc/latex/gchords/README | 12 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/gchords/chordbox.tcl | 178 | ||||
-rwxr-xr-x | Master/texmf-dist/doc/latex/gchords/gchords_doc.pdf | bin | 0 -> 59500 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/gchords/gchords_doc.tex | 175 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/gchords/get2knowu.tex | 112 |
5 files changed, 477 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/gchords/README b/Master/texmf-dist/doc/latex/gchords/README new file mode 100644 index 00000000000..deffd5cf3e0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/gchords/README @@ -0,0 +1,12 @@ + +This is the `gchords' LaTeX package, enabling you to typeset guitar +chord diagrams. The documentation is in gchords_doc.tex (and the +associated ps file). + +D. R. Lovell kindly provided me with a TCL script which can be used to +graphically construct the diagrams and then generate TeX input files. + +All available under the GNU General Public License. + +Kasper Peeters, <K.Peeters@damtp.cam.ac.uk> + diff --git a/Master/texmf-dist/doc/latex/gchords/chordbox.tcl b/Master/texmf-dist/doc/latex/gchords/chordbox.tcl new file mode 100644 index 00000000000..e4d5fdfbe8b --- /dev/null +++ b/Master/texmf-dist/doc/latex/gchords/chordbox.tcl @@ -0,0 +1,178 @@ +# +# $Id: chordbox.tcl,v 1.4 2002/08/28 15:39:51 t16 Exp $ +# +# Graphical helper tool for gchords.sty, written by David R. Lovell, +# with additions by Kasper Peeters. +# +upvar #0 ChordBoxInfo cb +upvar #0 BlotArray blot +upvar #0 DampArray damp +wm title . "Chord Box" + +frame .top +frame .middle +frame .bottom + +set strings 6 +set frets [lindex $argv 0] +if {$frets == ""} { + puts "Usage: wish chordbox.tcl \[number of frets\]" + exit +} +set dx 0.5 +set dy 1.0 +set left $dx +set right [expr $left + ($strings - 1) * $dx] +set width [expr $right + $left] +set bottom [expr 0.3 * $dy] +set top [expr $bottom + ($frets - 1) * $dy] +set height [expr $top + $bottom] +set xgrid [expr $dx] +set ygrid [expr $dy] +canvas .c -width ${width}c -height ${height}c +.c config -cursor dot + +set cb(rad) [winfo fpixels .c [expr 0.3 * $dx]c] +set cb(gridx) [winfo fpixels .c ${dx}c] +set cb(gridy) [winfo fpixels .c ${dy}c] +set cb(left) [winfo fpixels .c ${left}c] +set cb(right) [winfo fpixels .c ${right}c] +set cb(top) [winfo fpixels .c [expr ($frets - 1) * $dy]c] +set cb(bottom) [winfo fpixels .c ${dy}c] +set cb(nut) [winfo fpixels .c ${bottom}c] +set cb(damp) [winfo fpixels .c [expr $bottom / 2]c] + +#label .name -text "Name: " +#entry .nameentry -width 15 -relief sunken -bd 2 -textvariable name +label .spell -text "Name: " +entry .spellentry -width 15 -relief sunken -bd 2 -textvariable spelling +scale .zerofret -from -1 -to 24 -length ${height}c -width 0.3c -orient vertical -variable zerofret +#set zerofret -1 +button .print -text Print -command print +button .quit -text Quit -command exit + +pack .print .quit -in .top -side left -fill x -expand 1 +pack .zerofret .c -in .middle -side left -fill y -expand 1 +pack .spellentry .spell -in .bottom -side bottom -padx 1m -pady 1m +#pack .nameentry .name -in .bottom -side bottom -padx 1m -pady 1m +pack .top .middle .bottom -side top -fill x -expand 1 + +for {set i 0} {$i < $strings} {incr i} { + set x [expr $left + $i * $dx] + .c create line ${x}c ${bottom}c ${x}c ${top}c +} +for {set i 0} {$i < [expr $frets - 1]} {incr i} { + set y [expr $bottom + $i * $dy] + .c create line ${left}c ${y}c ${right}c ${y}c +} + +bind .c <1> "mkBlot .c %x %y" + + +proc mkBlot { c x y } { + upvar #0 ChordBoxInfo cb + upvar #0 BlotArray blot + upvar #0 DampArray damp + + set cx [$c canvasx $x $cb(gridx)] + set cy [$c canvasy $y $cb(gridy)] + if {($cx < $cb(left))} { + set cx $cb(left) + } + if {($cx > $cb(right))} { + set cx $cb(right) + } + if {($cy < $cb(nut))} { + set s [expr round($cx / $cb(gridx))] + if [info exists damp($s)] { + $c delete $damp($s) + unset damp($s) + } else { + set damp($s) [$c create line \ + [expr $cx - $cb(rad)] [expr $cb(damp) - $cb(rad)]\ + [expr $cx + $cb(rad)] [expr $cb(damp) + $cb(rad)]\ + $cx $cb(damp) \ + [expr $cx - $cb(rad)] [expr $cb(damp) + $cb(rad)]\ + [expr $cx + $cb(rad)] [expr $cb(damp) - $cb(rad)]\ + ] + } + return + } + + if {($cy < $cb(bottom))} { + set cy $cb(bottom) + } + if {($cy > $cb(top))} { + set cy $cb(top) + } + set f [expr round($cy / $cb(gridy))] + set s [expr round($cx / $cb(gridx))] + +# puts "$x, $y = ($cx,$cy), $s, $f" + + if [info exists blot($s,$f)] { + $c delete $blot($s,$f) + unset blot($s,$f) + } else { + set blot($s,$f) [$c create oval\ + [expr $cx - $cb(rad)] [expr $cy - $cb(rad)] \ + [expr $cx + $cb(rad)] [expr $cy + $cb(rad)] -fill black] + } +} + +proc print {} { + upvar #0 ChordBoxInfo cb + upvar #0 frets frets + upvar #0 strings strings + upvar #0 zerofret zerofret +# upvar #0 name name + upvar #0 spelling spelling + upvar #0 BlotArray blot + upvar #0 DampArray damp + + puts "\\def\\numfrets\{$frets\}" + puts -nonewline "\\chord\{" + if {$zerofret == 0} { + puts -nonewline "t" + } + if {$zerofret > 0} { + puts -nonewline $zerofret + } + puts -nonewline "\}\{" + + for {set s 1} {$s <= $strings} {incr s} { + set nmarks 0 + for {set f 0} {$f < $frets} {incr f} { + if [info exists blot($s,$f)] { + puts -nonewline "p\{$f\}" + incr nmarks + } + } + if {$nmarks == 0} { + if [info exists damp($s)] { + puts -nonewline "x" + } else { + puts -nonewline "n" + } + } + if {$s < $strings} { + puts -nonewline "," + } + } + + puts -nonewline "\}\{" + +# if { $name != "" } { +# puts -nonewline "$name" +# } +# +# puts -nonewline "\}\{" + + if { $spelling != "" } { + regsub -all , $spelling \},\{ texspelling + regsub -all b $texspelling \\ensuremath\{\\flat\} texspelling + regsub -all \# $texspelling \\ensuremath\{\\sharp\} texspelling + puts -nonewline "\{$texspelling\}" + } + puts "\}" +} diff --git a/Master/texmf-dist/doc/latex/gchords/gchords_doc.pdf b/Master/texmf-dist/doc/latex/gchords/gchords_doc.pdf Binary files differnew file mode 100755 index 00000000000..4f44c56904e --- /dev/null +++ b/Master/texmf-dist/doc/latex/gchords/gchords_doc.pdf diff --git a/Master/texmf-dist/doc/latex/gchords/gchords_doc.tex b/Master/texmf-dist/doc/latex/gchords/gchords_doc.tex new file mode 100644 index 00000000000..d8152f93aeb --- /dev/null +++ b/Master/texmf-dist/doc/latex/gchords/gchords_doc.tex @@ -0,0 +1,175 @@ +\documentclass{article} +\usepackage{gchords} +\usepackage{geometry} +\usepackage{rotating} + +\begin{document} +\begin{center} +{\Large GCHORDS, a \LaTeXe\ package to draw guitar chord diagrams}\\ +\vskip 0.2cm +{\large by Kasper Peeters, kasper.peeters@aei.mpg.de} +\end{center} +\vskip 4cm GCHORDS is a \LaTeXe\ package to draw those familiar guitar +chord diagrams. Options are available to draw them in any size, using +any number of strings, produce black dotes or numbered circles to +denote fingers, add chordnames, show the number of the top fret, +specify fonts for almost any symbol occuring in the diagram and many +more. There is also a macro to typeset chords above lyrics. A small +TCL script for graphical construction of chord symbols is also +included. This is a short guide to show how the commands work, with a +few examples included. Feel free to contact me if you want other +features included. +\medskip + +Note that, in order for this to work, you need the \LaTeX\ `lcircle' font +in various sizes. +\medskip + +The homepage for this macro package is +{\tt http://www.damtp.cam.ac.uk/user/kp229/gchords/}. + +\renewcommand\topfretsiz{3pt} + +%------------------------------------------------------------------------- +\section{Quick guide} + +The main macro is called {\tt$\backslash$chord}, and should be used as follows: + +\bigskip +{$\backslash${\tt chord}\{{\it modifiers}\/\}\{$x_1,x_2,\ldots$\}\{{\it +name}\/\}}, where +\begin{itemize} +\item {\it modifiers}\/: Currently, there are two uses of this part. +Putting a `t' in it draws a thick top fret. Putting in an arbitrary number +(large numbers must be put in curly braces) resuls in this number being +printed at the top left corner of the diagram (denoting a fret position). +\item $x_1,x_2,\ldots$: Each $x_i$ contains the information for a single +string. Recognized commands are +\begin{itemize} +\item {\tt b}: This note is a base note and will be printed a bit larger +than the others, +\item {\tt n}: This string does not contain any dots. +\item {\tt x}: This string should be muted (a $\times$ appears above the +string). +\item {\tt o}: This string should be explicitly labelled as open (a + $\circ$ symbol appears above the +string). +\item {\tt f{\it num}\/}: This note should be played with finger number +{\it num}\/. The number will be put inside the (open) dot. +\item {\tt p{\it num}\/}: Fret number on which the dot should be +placed. If you need numbers larger than $9$, they must be enclosed in +curly braces. +\item {\tt t{\it txt}\/}: Adds a label to this string, to be put at + the very top of the diagram (useful to add the name of the note, for + instance). If you need more than one character, put the text in + curly brackets (though this probably will not fit). +\item {\tt s{\it num}\/}: Use a different string to put this note on. +\end{itemize} +\item {\it name}\/: The name of the chord. Appears underneath the diagram. +\end{itemize} +If you want to put more notes on one string, just add the $f$ and $p$ +sequences. They {\em must}\/ appear in top-down order in order for the +strings to be drawn correctly. + +The chord macro can be used in tables if you need a lot of diagrams neatly +aligned. For a row of diagrams, the shortcut {$\backslash$\texttt{chords}$\{$ +\textit{chords}$\}$} may be used (where {\it chords}\/ is a sequence of chord +macros). + +\smallchords\def\xoff{0}\def\yoff{0} A few examples will illustrate +the possibilities. First, lets put a diagram in the text itself, like +\chord{t}{n,n,p2,p2,p1,n}{}, which is just A minor. The numbers of the +fingers can be put in, resulting in +\chord{t}{n,n,f2p2,f0p2,f1p1,n}{}. Now let's make the diagrams a bit +larger and put them in a separate line, like +\def\numfrets{6}\mediumchords\def\xoff{2}\def\yoff{2} +\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}} +In the first diagram you can see how to put note names at the top of +the diagram. It is also possible to display a larger part of the +neck, like in \def\numfrets{10} +\chords{\chord{t}{p5,p7,p7,p6,p5,p5}{A}} which can also be displayed +as \def\numfrets{5} \chords{\chord{{5~}}{p1,p3,p3,p2,p1,p1}{A}} Nice +patterns to play are the following: +\chords{\chord{}{p1p4,p1p3,p1p3,p1p3,p1p4,p1p4}{} \def\numfrets{20} +\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}}{}} + +%------------------------------------------------------------------------- +\section{Gchords and lyrics} + +You can also typeset chords above lyrics by using the {\tt +$\backslash$upchord} command, provided by Yotam Medini. You use it as +follows +\begin{verbatim} +\begin{verse} +\smallchords +\newcommand{\AsevenMaj}{\chord{t}{x,n,p2,p1,p2,n}{A7+}} +Getting to \upchord{\AsevenMaj}know you +\end{verse} +\end{verbatim} +which produces the output +\begin{verse} +\smallchords +\newcommand{\AsevenMaj}{\chord{t}{x,n,p2,p1,p2,n}{A7+}} +Getting to \upchord{\AsevenMaj}know you +\end{verse} +See the file {\tt get2knowu.tex} for a more complicated example. + +There is currently no functionality for rotated diagrams, but you can +rotate the diagrams using the ``rotating'' package: +{\smallchords\hspace{10ex}\raisebox{-10ex}{\vbox{\begin{rotate}{90} +\chord{t}{x,n,p2,p1,p2,n}{A7+} +\end{rotate}}}} + +%------------------------------------------------------------------------- +\section{Chordbox graphical chord editor} + +Included in the distribution is a small TCL script which provides a +graphical editor for chords. This script was written by David R.~Lovell. +To start it, for instance with 8 frets, type +\begin{quote} +\verb|wish chordbox.tcl 8| +\end{quote} +After constructing the chord and entering the name, press the `print' button +to see the \LaTeX{} command printed on stdout. + +It is possible to use the `b' and `\#' symbols in the `name' field to +denote `flat' and `sharp' chords. + +%------------------------------------------------------------------------- +\section{Sizes and defaults} + +It's possible to change the dimensions, fonts, number of strings etc.\ by +using one of the following settings. +\begin{itemize} +\item {$\backslash${\tt strings}\{{\it num}\/\}}: number of strings on your guitar. +\item {$\backslash${\tt numfrets}\{{\it num}\/\}}: length (number of frets) of +a diagram. +\item {$\backslash${\tt chordsize}\{{\it dim}\/\}}: distance between two frets in some +dimension known to \TeX. +\item {$\backslash${\tt fingerfont}\{{\it font}\/\}}: font used for numbering of +fingers. This can be any font, but if it is too large, the number will not +fit into the circle, so beware. +\item {$\backslash${\tt namefont}\{{\it font}\/\}}: font used when typesetting the name +of the chord. +\item {$\backslash${\tt fretposfont}\{{\it font}\/\}}: font used when typesetting the +position of on the neck of the top fret in the diagram. +\item {$\backslash${\tt dampsymbol}\{{\it symbol}\/\}}: a single symbol in any font you +like, used to denote damped strings (usually a $\times$). +\item {$\backslash${\tt fatsiz}\{{\it dec}\/\}}: size of a fat note (the physical size +will be {$\backslash${\tt fatsiz*}$\backslash${\tt chordsize/2}}). +\item {$\backslash${\tt normalsiz}\{{\it dec}\/\}}: size of a normal note. +\item {$\backslash${\tt fingsiz}\{{\it dec}\/\}}: size of the circle used to produce +`numbered fingers'. +\item {$\backslash${\tt fatfingsiz}\{{\it dec}\/\}}: size of the circle used to produce +`numbered fingers', used for the fatter notes. +\item {$\backslash${\tt topfretsiz}\{{\it dim}\}}: thickness of the + top fret (when the `t' modifier is used). +\item {$\backslash${\tt xoff}\{{\it dec}\/\}},{$\backslash${\tt yoff}\{{\it dec}\/\}}: the left lower +corner of the diagram in units of {$\backslash${\tt chordsize}}. +\end{itemize} + +There are two sizes predefined, which can be activated by +{$\backslash${\tt smallchords}} and {$\backslash${\tt mediumchords}}. + + +\end{document} diff --git a/Master/texmf-dist/doc/latex/gchords/get2knowu.tex b/Master/texmf-dist/doc/latex/gchords/get2knowu.tex new file mode 100644 index 00000000000..f9399978e46 --- /dev/null +++ b/Master/texmf-dist/doc/latex/gchords/get2knowu.tex @@ -0,0 +1,112 @@ +\documentclass[12pt]{article} + +\usepackage{geometry} +\setlength{\parindent}{0pt} +% \setlength{\textwidth}{6.5in} +\setlength{\textwidth}{7.2in} + +% \usepackage{gchords2} +\usepackage{gchords} + +\iftrue +% From: Richard Cobbe (cobbe@directlink.net) +% Subject: Re: Raised Guitar Chords in LaTeX +% Newsgroups: comp.text.tex +% Date: 2000/04/20 +% \newcommand{\chord}... + +\newcommand\mychords{ +\def\chordsize{1.6mm} % distance between two frets (and two strings) +\font\fingerfont=cmr5 % font used for numbering fingers +% \font\fingerfont=cmmi5 % font used for numbering fingers +\font\namefont=cmr10 % font used for labeling of the chord +\font\fretposfont=cmr7 % font used for the fret position marker +% \def\dampsymbol{$\scriptstyle\times$} % `damp this string' marker +\def\dampsymbol{{\tiny$\scriptstyle\times$}} % `damp this string' marker +} + +\renewcommand\yoff{3} +\renewcommand\fingsiz{1.6} + +\newcommand{\AsevenMaj}{\chord{t}{x,n,p2,p1,p2,n}{A7+}} +\newcommand{\Aseven}{\chord{t}{x,n,p2,n,p2,n}{A7}} +\newcommand{\A}{\chord{t}{x,n,p2,p2,p2,n}{A}} +\newcommand{\BmseveN}{\chord{t}{x,p2,p4,p3,p3,p2}{Bm7+}} +\newcommand{\BmsevenA}{\chord{t}{x,n,p4,p4,p3,n}{Bm/A}} +\newcommand{\Bmseven}{\chord{t}{x,p2,p4,p2,p3,p2}{Bm7}} +\newcommand{\Bm}{\chord{t}{x,p2,p4,p4,p3,p2}{Bm}} +\newcommand{\Bseven}{\chord{t}{x,f1p2,p4,f1p2,p4,f1p2,}{B7}} +\newcommand{\BsevenBasDs}{\chord{t}{x,x,p1,p2,n,p2}{B7/D\#}} +\newcommand{\CssevenLight}{\chord{t}{x,p4,p3,p4,p2,x}{C\#7}} +\newcommand{\DmBasB}{\chord{t}{x,p2,p3,p2,p3,x}{Dm/B}} +\newcommand{\DseveN}{\chord{t}{x,x,n,p2,p2,p2}{D7+}} +\newcommand{\Dsix}{\chord{t}{x,x,n,p2,n,p2}{D6}} +\newcommand{\D}{\chord{t}{x,x,n,p2,p3,p2}{D}} +\newcommand{\EseveNNine}{\chord{t}{n,f1p2,f1p2,p4,p3,f1p2,}{E79}} +\newcommand{\EseveN}{\chord{t}{n,p2,p2,p4,p3,p4}{E7}} +\newcommand{\EsevenFour}{\chord{t}{n,p2,p2,p4,p3,p5}{E7,11}} +\newcommand{\Eseven}{\chord{t}{n,p2,p2,p1,p3,n}{E7}} +\newcommand{\Fsmin}{\chord{t}{f1p2,p4,p4,f1p2,f1p2,f1p2,}{F\#m}} +\newcommand{\FsminLight}{\chord{t}{x,x,f3p4,f1p2,f1p2,f1p2,}{F\#m}} +\newcommand{\FsminBasSeveN}{\chord{t}{x,x,f3p3,f1p2,f1p2,f1p2,}{F\#m/E\#}} +\newcommand{\FsminBasSeven}{\chord{t}{x,x,f2p2,f1p2,f1p2,f1p2,}{F\#m/E}} +\newcommand{\FsminSeven}{\chord{t}{f1p2,p4,p4,f1p2,p5,f1p2,}{F\#7m}} +\newcommand{\Gsminseven}{\chord{t}{f2p4,x,f4p4,f4p4,f4p4,f4p4,}{G\#7}} + +\fi + +\begin{document} + +\mychords + +% \mediumchords +% \chord{t}{x,f3p3,f2p2,n,f1p1,f4p3,}{C} +\pagestyle{empty} + +% textwidth is \textwidth. +\begin{center} +\Large +\textbf{Getting to Know You} / \textsl{Rogers \& Hammerstein} \\ +Arranged \& Performed: \textsl{James Taylor} \\ +{\normalsize Recover \& Typeset: \textsl{Yotam Medini}} +\end{center} + +\begin{verse} + \large + Getting to \upchord{\AsevenMaj}know you, + Getting to know all \upchord{\EsevenFour}{about} \upchord{\EseveN}{you} + \quad\upchord{\EseveNNine}{\qquad } \upchord{\EseveN}{\qquad } \\ + Getting to \upchord{\Bm}{like} \quad\upchord{\BmseveN}{you}, + \upchord{\Bmseven}{Gett}ing to hope \upchord{\Eseven}{you} like + \upchord{\AsevenMaj}{me} + \qquad\upchord{\BmsevenA}{\qquad} \upchord{\Eseven}{\qquad}\\ + + Getting to \upchord{\AsevenMaj}know you, + Putting it my way, but \upchord{\D}{nice} --- \upchord{\DseveN}ly + \qquad\upchord{\Dsix}{\qquad} \\ + You are pre\upchord{\FsminSeven}{cise}ly \upchord{\Bseven}{my} cup of + \upchord{\Bmseven}{tea} \quad\upchord{\Eseven}{\quad} \\ + + Getting to \upchord{\AsevenMaj}know you, + Getting to feel free and \upchord{\EsevenFour}{ea} --- \upchord{\EseveN}{sy} + \quad\upchord{\EseveNNine}{\qquad} \upchord{\EseveN}{\qquad } \\ + When I am \upchord{\Bm}{with} \upchord{\BmseveN}{you}, + \upchord{\Bmseven}{Gett}ing to know \upchord{\Eseven}{what} to + \upchord{\A}{say} \qquad\upchord{\Aseven}{\qquad} + +\pagebreak + + Haven't you \upchord{\D}{no}ticed, + \upchord{\Gsminseven}{Suddenly} I'm \upchord{\CssevenLight}{bright} + and \upchord{\Fsmin}{breezy} \upchord{\Bseven}{\qquad}\\ + Because of \upchord{\A}{all} \quad \upchord{\Fsmin}{the} + \quad\upchord{\Bmseven}{beautiful} and \upchord{\Eseven}{new}\\ + \upchord{\FsminLight}{Things} \quad\upchord{\FsminBasSeveN}{I'm} + \qquad\upchord{\FsminBasSeven}{learning} about \upchord{\BsevenBasDs}{you}\\ + \upchord{\DmBasB}{Day} \quad\upchord{\Eseven}{by} + \qquad[ \upchord{\A}{day} \(\mid\) Getting to \ldots ] +\end{verse} + + +\end{document} + |