Ascii Text drucken (Gitarrentabulatur)

Antwort erstellen


Diese Frage dient dazu, das automatisierte Versenden von Formularen durch Spam-Bots zu verhindern.
Smilies
:D :) :( :o :shock: :? 8) :lol: :-x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:

BBCode ist eingeschaltet
[img] ist eingeschaltet
[flash] ist ausgeschaltet
[url] ist eingeschaltet
Smilies sind eingeschaltet

Die letzten Beiträge des Themas

Ich habe die Datenschutzerklärung gelesen und bin damit einverstanden.

   

Wenn du eine Datei oder mehrere Dateien anhängen möchtest, gib die Details unten ein.

Ansicht erweitern Die letzten Beiträge des Themas: Ascii Text drucken (Gitarrentabulatur)

von cgnieder » Mo 12. Aug 2013, 17:54

sr hat geschrieben:Wenn ich den Code [...] in Guitartex einsetze
Was ist denn Guitartex? Kurzes suchen im Netz zeigt mir GuitarTeX2 als wahrscheinlichsten Kandidaten. Dort lese ich
Obwohl das Satzsystem LaTeX von GuitarTeX2 genutzt wird, müssen sie wenig (oder nichts) über LaTeX wissen.
Was mir das Gefühl vermittelt, man müsste eigentlich gar kein LaTeX verwenden, sondern die programmeigenen Direktiven?

Grüße

von Besserwisser » Mo 12. Aug 2013, 16:57

sr hat geschrieben:macht der mir wg. dem gchords.sty folgenden Code:
Wer ist "der"?

von sr » So 11. Aug 2013, 15:40

O.K. das sieht schonmal sehr gut aus.

Wenn mit jetzt noch jemand sagen kann, wie ich es vermeiden kann den Umweg über tex-Export, dessen Manipulation und dann kompillieren per Hand zu gehen, seid Ihr meine Helden.

Wenn ich den Code von Besserwisser in Guitartex einsetze, macht der mir wg. dem gchords.sty folgenden Code:
\begin{verbatim} 
\gtxchord{}{~~~~~~~~~~~~~~~~~~~~~F~~~~~~~~G}\\
\gtxchord{}{e|-----0-------------------------0------------|}\\
\gtxchord{}{B|--3-----3--1-------1-----1--3-----3--1------|}\\
\gtxchord{}{G|--------------0h2--2--2----------------0h2--|}\\
\gtxchord{}{D|-------------------3----3-------------------|}\\
\gtxchord{}{A|--------------------------------------------|}\\
\gtxchord{}{E|----------------------------3---------------|}\\


\gtxchord{}{~~~~Am~~~~G~~~~~~~~~~~~~~~~~F~~~~~~~~~~G~~~~Am}\\
\gtxchord{}{e|----0--------0------------------3p0-------0---|}\\
\gtxchord{}{B|--1----3--3----3--1-------1----------1h3--1---|}\\
\gtxchord{}{G|---------------------0h2--2--2----------------|}\\
\gtxchord{}{D|--------------------------3-------------------|}\\
\gtxchord{}{A|--0---------------------------------------0---|}\\
\gtxchord{}{E|-------3--3--------------------------3--------|}\\
\end{verbatim}
Danke vorab.
Gruß
Sven

von Besserwisser » Sa 10. Aug 2013, 15:35

Warum so umständlich? Die Standard-LaTeX-Umgebung verbatim sollte dafür vollkommen ausreichend sein:
\documentclass{article}
\usepackage[ a4paper, left=2cm, right=1cm, top=1.5cm, bottom=2cm, noheadfoot]{geometry}

\begin{document}
\begin{verbatim}
                     F        G               Am    G                 F          G    Am
e|-----0-------------------------0--------------0--------0------------------3p0-------0---|
B|--3-----3--1-------1-----1--3-----3--1------1----3--3----3--1-------1----------1h3--1---|
G|--------------0h2--2--2----------------0h2---------------------0h2--2--2----------------|
D|-------------------3----3-------------------------------------------3-------------------|
A|--------------------------------------------0---------------------------------------0---|
E|----------------------------3--------------------3--3--------------------------3--------|


    G                F        G               Am    G                 F          G    Am
e|-----0-------------------------0--------------0--------0------------------3p0-------0---|
B|--3-----3--1-------1-----1--3-----3--1------1----3--3----3--1-------1----------1h3--1---|
G|--------------0h2--2--2----------------0h2---------------------0h2--2--2----------------|
D|-------------------3----3-------------------------------------------3-------------------|
A|--------------------------------------------0---------------------------------------0---|
E|--3-------------------------3--------------------3--3--------------------------3--------|

\end{verbatim}
\end{document}
Wenn man darin noch Dinge wie fett o. ä. haben will, kann man auch die alltt-Umgebung des gleichnamigen Pakets verwende.

von sudo » Fr 9. Aug 2013, 18:40

Bei listings gibt es eine Option eine nicht-proportionale Schrift (typewriter) zu verwenden. Was den \texttt-absatz angeht, verstehe ich deinen Einwand nicht. Mein Minimalbeispiel enthält eine Typewriter. Hast du das mal laufen lassen?

von sr » Fr 9. Aug 2013, 13:43

Hi,

funktioniert weder mit externem Absatz noch mit listings!
Schrift bleibt proportional.

Kein Minimalbeispiel

von sudo » Fr 9. Aug 2013, 12:13

Hi,

ich hatte keine Lust mich durch deinen ganzen Code zu lesen, daher kann mir auch etwas engangen sein, aber:
Bis auf die Akorde oben und die überlangen Zeilen, ergibt
\documentclass{scrartcl}
\begin{document}
\texttt{
                     F        G               Am    G                 F          G    Am\\
e|-----0-------------------------0--------------0--------0------------------3p0-------0---|\\
B|--3-----3--1-------1-----1--3-----3--1------1----3--3----3--1-------1----------1h3--1---|\\
G|--------------0h2--2--2----------------0h2---------------------0h2--2--2----------------|\\
D|-------------------3----3-------------------------------------------3-------------------|\\
A|--------------------------------------------0---------------------------------------0---|\\
E|----------------------------3--------------------3--3--------------------------3--------|\\
}%% Bei einem Absatz innerhalb von texttt meckert TeX, also Absatz außerhalb

\texttt{
    G                F        G               Am    G                 F          G    Am\\
e|-----0-------------------------0--------------0--------0------------------3p0-------0---|\\
B|--3-----3--1-------1-----1--3-----3--1------1----3--3----3--1-------1----------1h3--1---|\\
G|--------------0h2--2--2----------------0h2---------------------0h2--2--2----------------|\\
D|-------------------3----3-------------------------------------------3-------------------|\\
A|--------------------------------------------0---------------------------------------0---|\\
E|--3-------------------------3--------------------3--3--------------------------3--------|\\
} 

\end{document}
schon fast genau das was ich denke, dass du es haben willst. Die Positionierung der Akorde ist allerdings schwieriger. Ich würde vorschlagen tikz zu benutzen und aus dem ganzen eine Art Graphik zu machen. Würde dann auch professioneller aussehen. Man könnte aber auch mit listings arbeiten. Da gibt es glaube ich die Möglichkeit Leerzeichen nicht zu irgnorieren.

Ascii Text drucken (Gitarrentabulatur)

von sr » Fr 9. Aug 2013, 11:18

Ich möchte diesen Text, als nicht-proportionale Schrift in einem LaTex Dokument mitdrucken:
                     F        G               Am    G                 F          G    Am
e|-----0-------------------------0--------------0--------0------------------3p0-------0---|
B|--3-----3--1-------1-----1--3-----3--1------1----3--3----3--1-------1----------1h3--1---|
G|--------------0h2--2--2----------------0h2---------------------0h2--2--2----------------|
D|-------------------3----3-------------------------------------------3-------------------|
A|--------------------------------------------0---------------------------------------0---|
E|----------------------------3--------------------3--3--------------------------3--------|


    G                F        G               Am    G                 F          G    Am
e|-----0-------------------------0--------------0--------0------------------3p0-------0---|
B|--3-----3--1-------1-----1--3-----3--1------1----3--3----3--1-------1----------1h3--1---|
G|--------------0h2--2--2----------------0h2---------------------0h2--2--2----------------|
D|-------------------3----3-------------------------------------------3-------------------|
A|--------------------------------------------0---------------------------------------0---|
E|--3-------------------------3--------------------3--3--------------------------3--------|
Das ist eine Tabulatur für Gitarre und die Darstellung im erzeugten PDF-Dokument, soll exakt der Ascii-Codedarstellung entsprechen!

Die benötigte *.sty - Datei habe ich als Code angehängt, da das mit den Dateien als Anhang nicht geht!

Der Text soll im nachfolgend eingefügten Code/Dokument/PDF hinter

\gtxchord{}{<~INTRO~>}\\

gedruckt werden.

Ein Versuch mit \texttt{} klappt bisher nicht.
\texttt{
                     F        G               Am    G                 F          G    Am
e|-----0-------------------------0--------------0--------0------------------3p0-------0---|
B|--3-----3--1-------1-----1--3-----3--1------1----3--3----3--1-------1----------1h3--1---|
G|--------------0h2--2--2----------------0h2---------------------0h2--2--2----------------|
D|-------------------3----3-------------------------------------------3-------------------|
A|--------------------------------------------0---------------------------------------0---|
E|----------------------------3--------------------3--3--------------------------3--------|


    G                F        G               Am    G                 F          G    Am
e|-----0-------------------------0--------------0--------0------------------3p0-------0---|
B|--3-----3--1-------1-----1--3-----3--1------1----3--3----3--1-------1----------1h3--1---|
G|--------------0h2--2--2----------------0h2---------------------0h2--2--2----------------|
D|-------------------3----3-------------------------------------------3-------------------|
A|--------------------------------------------0---------------------------------------0---|
E|--3-------------------------3--------------------3--3--------------------------3--------|
}
Hier der Songtext:
\documentclass[german, 12pt]{article}
\usepackage[ a4paper, left=2cm, right=1cm, top=1.5cm, bottom=2cm, noheadfoot]{geometry}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage{color}
\usepackage{graphicx}
\usepackage{ifthen}
\usepackage{calc}
\usepackage{gchords}
%

\pagestyle{empty}

%
%------definition of font colors-----------
\definecolor{chorus}{rgb}{1,0,0}
\definecolor{bridge}{rgb}{0,0,1}
\definecolor{instr}{rgb}{.3,.3,.3}
\definecolor{tab}{rgb}{.3,.3,.3}
\definecolor{second_text}{rgb}{1,1,1}
\definecolor{second_back}{rgb}{.7,.7,.7}
%
%------definition of environments-------
\newenvironment{chorus}{\color{chorus}}{\normalcolor}
\newenvironment{bridge}{\color{bridge}}{\normalcolor}
\newenvironment{instr}{\color{instr}}{\normalcolor}
\newenvironment{gtxtab}{\color{tab}}{\normalcolor}
%
%------counter for line numbers------
%\newcounter{verscnt}[section]
%\newcommand{\vers}{\stepcounter{verscnt}%
%\makebox[0.5cm][r]{\scriptsize\theverscnt\normalsize}%
%\makebox[0.5cm]{}}
%
\newcommand{\gtxchordsize}{\footnotesize}
\setlength{\parindent}{0pt}

%------PostScript-Header für die Chord-Songs------
%\special{header=/usr/local/lib/guitartex/chord-common.ps}

\sloppy
\setlength{\unitlength}{1mm}

\newcommand{\gtxchord}[2]{\sbox{\gtxchordbox}{#1}\sbox{\textbox}{#2}%
	\ifthenelse{\lengthtest{\wd\textbox>\wd\gtxchordbox}}%
	{%
		\raisebox{2ex}[2ex][2.5ex]{\makebox[0pt][l]{\scriptsize\bf#1}}#2%
	}{%
	\raisebox{2ex}[2ex][2.5ex]{\makebox[0pt][l]{\scriptsize\bf#1}}\makebox[\wd\gtxchordbox+0.5em][l]{#2}%
	}%
}%

\newcommand{\guitartab}{%
\makebox[0cm][l]{\raisebox{12.5ex}{\footnotesize{e}}}%
\makebox[0cm][l]{\raisebox{10.5ex}{\footnotesize{B}}}%
\makebox[0cm][l]{\raisebox{8.5ex}{\footnotesize{G}}}%
\makebox[0cm][l]{\raisebox{6.5ex}{\footnotesize{D}}}%
\makebox[0cm][l]{\raisebox{4.5ex}{\footnotesize{A}}}%
\makebox[0cm][l]{\raisebox{2.5ex}{\footnotesize{E}}}%
~~
\makebox[0cm][l]{\raisebox{13ex}{\line(1,0){130}}}%
\makebox[0cm][l]{\raisebox{11ex}{\line(1,0){130}}}%
\makebox[0cm][l]{\raisebox{9ex}{\line(1,0){130}}}%
\makebox[0cm][l]{\raisebox{7ex}{\line(1,0){130}}}%
\makebox[0cm][l]{\raisebox{5ex}{\line(1,0){130}}}%
\makebox[0cm][l]{\raisebox{3ex}{\line(1,0){130}}}%
~}

\newcommand{\basstab}{%
\makebox[0cm][l]{\raisebox{8.5ex}{\footnotesize{G}}}%
\makebox[0cm][l]{\raisebox{6.5ex}{\footnotesize{D}}}%
\makebox[0cm][l]{\raisebox{4.5ex}{\footnotesize{A}}}%
\makebox[0cm][l]{\raisebox{2.5ex}{\footnotesize{E}}}%
~~
\makebox[0cm][l]{\raisebox{9ex}{\line(1,0){130}}}%
\makebox[0cm][l]{\raisebox{7ex}{\line(1,0){130}}}%
\makebox[0cm][l]{\raisebox{5ex}{\line(1,0){130}}}%
\makebox[0cm][l]{\raisebox{3ex}{\line(1,0){130}}}%
~}

\newcommand{\gtxtabs}[2]{\makebox[0cm][l]{\raisebox{#1}{#2}}}



%------start of document-----------
\begin{document}
\newsavebox{\gtxchordbox}
\newsavebox{\textbox}
%
%
\renewcommand{\baselinestretch}{1,1}
\bfseries
%
%----- New Song -----
\newpage\addcontentsline{toc}{section}{LET HET GO}
\begin{center} \section*{LET HET GO}\end{center}
\index{LET HET GO}\index{PASSENGER!LET HET GO}\begin{center}PASSENGER\end{center}
CAPO: 7 \hfill Seite 1 von 2
\noindent\rule[1ex]{\textwidth}{0.5 pt}


\gtxchord{}{<~INTRO~>}\\


\gtxchord{}{<~R~>}\\


\gtxchord{}{WELL~YOU~ONLY~NEED~THE~}\gtxchord{F}{LIGHT~WHEN~IT~S~BURNING~}\gtxchord{C}{LOW}\\
\gtxchord{}{ONLY~MISS~THE~}\gtxchord{G}{SUN~WHEN~IT~S~STARTS~TO~}\gtxchord{AM}{SNOW}\\
\gtxchord{}{ONLY~KNOW~YOUR~}\gtxchord{F}{LOVER~WHEN~YOU~LET~HER~}\gtxchord{C}{GO~~~~~~}\gtxchord{G}{~}\\
\gtxchord{}{ONLY~KNOW~YOU~VE~BEEN~}\gtxchord{F}{HIGH~WHEN~YOU~RE~FEELING~}\gtxchord{C}{LOW}\\
\gtxchord{}{ONLY~HATE~THE~}\gtxchord{G}{ROAD~WHEN~YOU~RE~MISSIN~~}\gtxchord{AM}{HOME}\\
\gtxchord{}{ONLY~KNOW~YOUR~}\gtxchord{F}{LOVER~WHEN~YOU~VE~LET~HER~}\gtxchord{C}{GO}\\
\gtxchord{G}{~~AND~YOU~LET~HER~GO}\\




\gtxchord{}{AM~~~F~~~G~~~EM}\\
\gtxchord{}{AM~~~F~~~G}\\




\gtxchord{}{<~1~>}\\


\gtxchord{AM}{STARING~AT~THE~BOTTOM~OF~YOUR~}\gtxchord{F}{GLASS}\\
\gtxchord{}{HOPING~O}\gtxchord{G}{NE~DAY~YOU~WILL~MAKE~A~DREAM~}\gtxchord{EM}{LAST}\\
\gtxchord{}{THE~DREAMS~COME}\gtxchord{AM}{~SLOW~AND~GOES~SO}\gtxchord{F}{~FAST~~~~~~}\gtxchord{G}{~}\\
\gtxchord{}{YOU~}\gtxchord{AM}{SEE~HER~WHEN~YOU~CLOSE~YOUR~}\gtxchord{F}{EYES}\\
\gtxchord{}{MAYBE~}\gtxchord{G}{ONE~DAY~YOU~WILL~UNDERSTAND~}\gtxchord{EM}{WHY}\\
\gtxchord{}{EVERYTHING~YOU~}\gtxchord{AM}{TOUCH~ALL~IT~}\gtxchord{F}{DIES~~~~~~}\gtxchord{G}{~}\\




\gtxchord{}{<~R~>}\\


\gtxchord{}{BECAUSE~YOU~ONLY~NEED~THE~}\gtxchord{F}{LIGHT~WHEN~IT~S~BURNING~}\gtxchord{C}{LOW}\\
\gtxchord{}{ONLY~MISS~THE~}\gtxchord{G}{SUN~WHEN~IT~S~STARTS~TO~}\gtxchord{AM}{SNOW}\\
\gtxchord{}{ONLY~KNOW~YOUR~}\gtxchord{F}{LOVER~WHEN~YOU~LET~HER~}\gtxchord{C}{GO~~~~~~}\gtxchord{G}{~}\\
\gtxchord{}{ONLY~KNOW~YOU~VE~BEEN~}\gtxchord{F}{HIGH~WHEN~YOU~RE~FEELING~}\gtxchord{C}{LOW}\\
\gtxchord{}{ONLY~HATE~THE~}\gtxchord{G}{ROAD~WHEN~YOU~RE~MISSIN~~}\gtxchord{AM}{HOME}\\
\gtxchord{}{ONLY~KNOW~YOUR~}\gtxchord{F}{LOVER~WHEN~YOU~VE~LET~HER~}\gtxchord{C}{GO~~~~}\gtxchord{G}{~}\\




\gtxchord{}{<~2~>}\\
\gtxchord{}{0}\\
\gtxchord{AM}{STARING~AT~THE~CEILING~IN~THE~}\gtxchord{F}{DARK}\\
\gtxchord{}{SAME~OLD~}\gtxchord{G}{EMPTY~FEELING~IN~YOUR~}\gtxchord{EM}{HEART}\\
\gtxchord{}{LOVE~COMES~}\gtxchord{AM}{SLOW~AND~IT~GOES~SO}\gtxchord{F}{~FAST~~~}\gtxchord{G}{~}\\
\gtxchord{}{WELL~YOU~}\gtxchord{AM}{SEE~HER~WHEN~YOU~FALL~AS}\gtxchord{F}{LEEP}\\
\gtxchord{}{BUT~TO~NEVER~TO~}\gtxchord{G}{TOUCH~AND~NEVER~TO~}\gtxchord{EM}{KEEP}\\
\gtxchord{}{BECAUSE~YOU~LOVED~HER~TO~}\gtxchord{AM}{MUCH}\\
\gtxchord{}{AND~YOU~DIVE~TOO~}\gtxchord{F}{DEEP~~~~~~~}\gtxchord{G}{~}\\




\gtxchord{}{<~R~>~BECAUSE~YOU~ONLY~NEED~THE....}\\


\gtxchord{}{AND~YOU~LET~HER~}\gtxchord{AM}{GO}\\
\gtxchord{}{OOOOO~}\gtxchord{F}{OOOOO~}\gtxchord{G}{OOOOOO}\\
\gtxchord{}{AND~YOU~LET~HER~}\gtxchord{AM}{GO}\\
\gtxchord{}{OOOOOOO~}\gtxchord{F}{OOOOO~}\gtxchord{G}{OOOOO}\\
\gtxchord{}{AND~YOU~LET~HER~}\gtxchord{AM}{GO~~~~~~~~~}\gtxchord{F}{~~~~~}\gtxchord{G}{~~~~}\gtxchord{EM}{~~}\\




\gtxchord{}{AM~~~~F~~~~G}\\




\gtxchord{}{<~R~>~BECAUSE~YOU~ONLY~NEED~THE....}\\


\gtxchord{G}{~~AND~YOU~LET~HER~GO}\\




\gtxchord{}{<~R~>~BECAUSE~YOU~ONLY~NEED~THE....}\\


\gtxchord{G}{~~AND~YOU~LET~HER~GO~}\gtxchord{AM}{}\\

\end{document}
ebenfalls benötigte Datei, da das hochladen, auch mit .txt Endung, nicht geht: gchords.sty
%
% GCHORDS, a LaTeX2e package to draw guitar chord diagrams.
%
% version 1.3.1 by K.Peeters, t16@nikhef.nl
%
% See ChangeLog for a list of changes.
% 
%-------------------------------------------------------------------------
% Variable, user definable stuff is below.

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{gchords}


% Your guitar
\newcommand\strings{6}          % number of strings on your guitar
\newcommand\numfrets{5}         % length (no of frets) of a diagram

% These should be modified if you want chords in a different size
\newcommand\mediumchords{
\def\gchordsize{3.0mm}    % distance between two frets (and two strings)
\font\fingerfont=cmr5    % 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$}    % symbol of the `damp this string' marker
}
\newcommand\smallchords{
\def\gchordsize{2.0mm}    % distance between two frets (and two strings)
\font\fingerfont=cmr5    % 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$}    % symbol of the `damp this string' marker
}

\mediumchords

% Dotsizes (which scale with the chordsize macro)
\newcommand\fatsiz{1.6}         % size of a fat note
\newcommand\normalsiz{1.2}      % size of a normal note
\newcommand\fingsiz{1.4}      % size of the circle around a numbered finger
\newcommand\fatfingsiz{1.8}      % size of the circle around a numbered finger

% Position of the chord in its bounding box
\newcommand\xoff{2}             % pos(\xoff,\yoff) is left lower corner of diagram
\newcommand\yoff{2}

%-------------------------------------------------------------------------

\makeatletter
\newcommand\basenote{\circle*{\fatsiz}}
\newcommand\stdnote{\circle*{\normalsiz}}
\newcommand\fingnote{\circle{\fingsiz}}
\newcommand\fatfingnote{\circle{\fatfingsiz}}
\newcommand\cvline{\line(0,1)}
\newcommand\chline{\line(1,0)}

\newcommand\gchords[1]{$$\hbox{#1}$$}
\newcommand\chtext[1]{\vbox{\settowidth{\hsize}{#1 xxxx} {#1
  \newdimen\ascale\ascale=\gchordsize\vskip8\ascale}}}

% #1 modifiers (like num, or fretbar0)
% #2 positions
% #3 chordname

\newcount\truewidth			% the true width of the diagram, computed from strings
\newcount\topline
\newcount\myvpos
\newcount\mylength
\newcount\fnum              % current f{...} value (number of finger)
\newcount\fpos              % current p{...} value
\newcount\ghor              % string number currently being drawn
\newcount\prevpos           % previous value of p{...}, zero if no previous dot on string
\newcount\dlen              % length of the vertical line to draw between dots
\newcount\cpos              % scratch variable to hold vertical position of dot
\newcount\stpos
\newdimen\needsize

\newcommand\gchord[3]{\vbox{\hbox{\newdimen\ascale\ascale=\gchordsize
\truewidth=\strings\advance\truewidth by -1
\advance\truewidth by \xoff
\topline=\numfrets
\advance\topline by \yoff
\advance\topline by 2

%%% The Diagram itself %%%%%%%%%
\unitlength\ascale
\begin{picture}(\truewidth,\topline)
\advance\topline by -1
\advance\truewidth by -\xoff
\myvpos=\yoff\advance\myvpos by \numfrets
%%% Parse the modifier string %%
\newcommand\topbar{n}
\@tfor\modstr:=#1\do 
   { \if\modstr t{\thicklines\put(\xoff,\myvpos){\chline{\truewidth}}\thinlines}
	 \else {\advance\topline by -2
			\put(\xoff,\topline){\hbox to 0pt{\hss\fretposfont\modstr\ }}
		   }
	 \fi
   }

%%% Horizontal lines (frets)%%%%
\mylength=0
\myvpos=\yoff
\advance\myvpos by 1  % first fret starts a bit higher
\@whilenum \mylength<\numfrets \do {  
  \put(\xoff,\myvpos){\chline{\truewidth}}
  \advance\mylength by 1
  \advance\myvpos   by 1}

%%% The Dots %%%%%%%%%%%%%%%%%%%
\newcommand\fnow{n}
\newcommand\pnow{n}
\newcommand\snow{n}

\putdots{#2}{\gchordsize}
\put(\xoff,0){\hbox to \truewidth\ascale{\hss\namefont #3\hss}}
\end{picture}
}}}

%\newcommand{\putdots}[2]{\@tfor\thisele:=#1\do{\if\thisele {}{hi}
%  \else\if\thisele p{}
%  \else.\thisele{}\fi\fi}}

\long\def\ReturnAfterFi#1\fi{\fi#1}
    \def\f@rc#1#2#3{%
      \def\temp@ty{#2}%
      \ifx\@empty\temp@ty
      \else
        \ReturnAfterFi{%
          \f@@rc#1#2\f@@rc{#3}%
        }%
      \fi
    }%

\def\@forc#1#2#3{\expandafter\f@rc\expandafter#1{#2 K}{#3}}
%\def\f@rc#1#2#3{\def\temp@ty{#2}\ifx\@empty\temp@ty\else
%                                    \f@@rc#1#2\f@@rc{#3}\fi}
\def\f@@rc#1#2#3\f@@rc#4{\def#1{#2}#4\f@rc#1{#3}{#4}}

%\newcommand{\putdots}[2]{\@tfor\thisel:=#1K\do{\message{(\thisel)}\ifx\thisel{}\else\if\thisel K{SHIT}\else\ifx\thisel p{}\else.\thisel{}\fi\fi\fi}}

\newcommand{\putdots}[2]{
  \prevpos=0
  \fpos=0
  \ghor=\xoff
  \let\curnote\stdnote
  \let\curfing\fingnote
  \def\Ktest{K}\def\cotest{,}\def\btest{b}\def\ftest{f}
  \def\stest{s}\def\ptest{p}\def\xtest{x}\def\ntest{n}
  \@forc\thisel{#1}{
      \ifx\thisel\Ktest{}\else
      \ifx\thisel\cotest\cpos=-\fpos\advance\cpos by \numfrets\advance\cpos by \yoff
				  \ifnum\cpos > \yoff
		          	\dlen=\cpos
		 	      	\advance\dlen by -\yoff
  				  	\put(\ghor,\yoff){\cvline{\dlen}}
				  \fi
				  \prevpos=0
				  \fpos=0
				  \fnum=0
				  \renewcommand\pnow{n}
				  \renewcommand\fnow{n}
				  \renewcommand\snow{n}
				  \advance\ghor by 1
	  \else\ifx\thisel\btest\let\curnote\basenote
						\let\curfing\fatfingnote
      \else\ifx\thisel\ftest\renewcommand\snow{n}\renewcommand\pnow{n}\renewcommand\fnow{y}
      \else\ifx\thisel\stest\renewcommand\snow{y}\renewcommand\pnow{n}\renewcommand\fnow{n}
      \else\ifx\thisel\ptest\renewcommand\snow{n}\renewcommand\pnow{y}\renewcommand\fnow{n}
      \else\ifx\thisel\xtest{\put(\ghor,\yoff){\cvline{\numfrets}}
			   		     \needsize=\ascale
			   		     \divide\needsize by 2
			   		     \unitlength\needsize
						 \multiply\ghor by 2
						 \multiply\topline by 2
						 \advance\topline by -1
                         \put(\ghor,\topline){\hbox to 0pt{\hss{\dampsymbol}\hss}}
						}
      \else\ifx\thisel\ntest\put(\ghor,\yoff){\cvline{\numfrets}}
      \else      		
    	 \if\fnow y \fnum=\thisel
		 \else\if\snow y \ghor=\thisel\advance\ghor by \xoff
					     \advance\ghor by -1
		 \else
			 \prevpos=\fpos\advance\prevpos by -1
  		     \fpos=\thisel
			 \ifnum\fnum > 0
				  \cpos=\fpos\advance\cpos by -1
				  \ifnum\cpos > \prevpos
			        \dlen=\fpos\advance\dlen by -\prevpos
							 \advance\dlen by -1
			        \stpos=\topline\advance\stpos by -\fpos
  		 	        \put(\ghor,\stpos){\cvline{\dlen}}
				  \fi
			 \else
				\put(\ghor,\yoff){\cvline{\numfrets}}
			 \fi
   		     \cpos=-\fpos\advance\cpos by \numfrets\advance\cpos by \yoff
	         {
   		     \needsize=\ascale
   		     \divide\needsize by 2
   		     \unitlength\needsize
			 \multiply\ghor by 2
   		     \multiply\cpos by 2
	   	     \advance\cpos by 1
			 \ifnum\fnum > 0
				\put(\ghor,\cpos){\curfing}
				\put(\ghor,\cpos){$\vcenter{\vskip 0.5em\vbox{\hbox to 0pt{\hss{\fingerfont\number\fnum}\hss}}}$}
			 \else
				\put(\ghor,\cpos){\curnote}
			 \fi
             }
		     \let\curnote\stdnote
			 \let\curfing\fingnote
		 \fi\fi
      \fi\fi\fi\fi\fi\fi\fi\fi
    }
}

\makeatother

% That's all folks!
%-------------------------------------------------------------------------

Danke vorab für Eure Hilfe

Gruß
Sven

Nach oben