Merge branch 'master' of https://gitlab.com/jrpie-notes/musiktheorietheorie
This commit is contained in:
commit
4980104bca
31 changed files with 158 additions and 1447 deletions
Binary file not shown.
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -57,3 +57,4 @@ build/
|
||||||
|
|
||||||
# xournal++ temp files
|
# xournal++ temp files
|
||||||
*.xopp~
|
*.xopp~
|
||||||
|
*.autosave.xopp
|
||||||
|
|
21
README.md
21
README.md
|
@ -1,11 +1,16 @@
|
||||||
# musiktheorie
|
# Musiktheorietheorie
|
||||||
|
|
||||||
These are the lecture notes for the 'musiktheorie', taught in MusikAka 2022 at the University of Bonn.
|
|
||||||
|
|
||||||
The [latest version][1] is availabe as a pdf download via GitLab runner.
|
Notizen zum Kurs Mathematische Musiktheorie von Georg Schröter
|
||||||
You can also have a look at the generated [log files][2] or visit the
|
|
||||||
[gl pages][3] index directly.
|
|
||||||
|
|
||||||
[1]: 2022-musiktheorie/musiktheorie.pdf
|
CdE MusikAkademie 2022
|
||||||
[2]: 2022-musiktheorie/musiktheorie.log
|
|
||||||
[3]: 2022-musiktheorie/
|
|
||||||
|
|
||||||
|
Die Notizen sind unvollständig und enthalten vermutlich einige Fehler.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Die neuste Version ist [hier][1] als pdf verfügbar.
|
||||||
|
|
||||||
|
[1]: https://jrpie-notes.gitlab.io/cde/musiktheorietheorie/musiktheorie.pdf
|
||||||
|
|
58
abc/README
58
abc/README
|
@ -1,58 +0,0 @@
|
||||||
The abc package lets you include lines of music written in the ABC Plus
|
|
||||||
language (http://abcplus.sourceforge.net).
|
|
||||||
|
|
||||||
This is version 2.0b of the package (a maintenance release)
|
|
||||||
|
|
||||||
Copyright 2005-2016 Enrico Gregorio
|
|
||||||
|
|
||||||
This program is provided under the terms of the
|
|
||||||
LaTeX Project Public License distributed from CTAN
|
|
||||||
archives in directory macros/latex/base/lppl.txt.
|
|
||||||
|
|
||||||
Author: Enrico Gregorio
|
|
||||||
Enrico dot Gregorio at univr dot it
|
|
||||||
|
|
||||||
This work has the LPPL maintenance status "author-maintained".
|
|
||||||
|
|
||||||
This work consists of the following files:
|
|
||||||
|
|
||||||
README (this file)
|
|
||||||
abc.dtx
|
|
||||||
abc.ins
|
|
||||||
abc.pdf
|
|
||||||
|
|
||||||
and of the derived files
|
|
||||||
|
|
||||||
abc.sty
|
|
||||||
mup.sty
|
|
||||||
example.tex
|
|
||||||
poll.abc
|
|
||||||
mupexa.tex
|
|
||||||
simple.mup
|
|
||||||
|
|
||||||
To install the distribution:
|
|
||||||
|
|
||||||
o run "latex abc.ins"
|
|
||||||
o run "latex -shell-escape example.tex" for a test
|
|
||||||
o move "abc.sty" and "mup.sty" to locations where LaTeX will
|
|
||||||
find it (the FAQ on CTAN in /help/uktug-FAQ gives more
|
|
||||||
information about this magic place)
|
|
||||||
|
|
||||||
Please note that you need, on your system, the
|
|
||||||
utilities "abcm2ps" (http://abcplus.sourceforge.net),
|
|
||||||
either "ps2eps" (which comes with TeX Live) or "ps2epsi"
|
|
||||||
(which comes with Ghostscript), and epstopdf (which
|
|
||||||
comes with TeX Live) if you use pdflatex.
|
|
||||||
|
|
||||||
If you want to compile the Mup examples, you need the
|
|
||||||
utility "mup" (http://www.arkkra.com), along with the
|
|
||||||
Postscript utilities mentioned above.
|
|
||||||
|
|
||||||
Note also that you must enable "shell escape" on your
|
|
||||||
TeX system via the command line switch (at least); see
|
|
||||||
your distribution's documentation. However, this is not
|
|
||||||
strictly necessary in order to use the package, see the
|
|
||||||
documentation.
|
|
||||||
|
|
||||||
2016/05/15
|
|
||||||
Enrico Gregorio
|
|
824
abc/abc.dtx
824
abc/abc.dtx
|
@ -1,824 +0,0 @@
|
||||||
% \iffalse meta-comment
|
|
||||||
%
|
|
||||||
% Copyright (C) 2005-2015 by Enrico Gregorio
|
|
||||||
% <Enrico dot Gregorio at univr dot it>
|
|
||||||
% -------------------------------------------------------
|
|
||||||
%
|
|
||||||
% This file may be distributed and/or modified under the conditions of
|
|
||||||
% the LaTeX Project Public License, either version 1.2 of this license
|
|
||||||
% or (at your option) any later version. The latest version of this
|
|
||||||
% license is in:
|
|
||||||
%
|
|
||||||
% http://www.latex-project.org/lppl.txt
|
|
||||||
%
|
|
||||||
% and version 1.2 or later is part of all distributions of LaTeX
|
|
||||||
% version 1999/12/01 or later.
|
|
||||||
%
|
|
||||||
% \fi
|
|
||||||
%
|
|
||||||
% \iffalse
|
|
||||||
%<*driver>
|
|
||||||
\ProvidesFile{abc.dtx}
|
|
||||||
%</driver>
|
|
||||||
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
|
|
||||||
%<package>\ProvidesPackage{abc}
|
|
||||||
%<*package>
|
|
||||||
[2016/05/15 v2.0b Enrico Gregorio]
|
|
||||||
%</package>
|
|
||||||
%<*driver>
|
|
||||||
\documentclass{ltxdoc}
|
|
||||||
\usepackage{verbatim}
|
|
||||||
\newenvironment{smallverb}{\footnotesize\verbatim}{\endverbatim}
|
|
||||||
\EnableCrossrefs
|
|
||||||
\CodelineIndex
|
|
||||||
\RecordChanges
|
|
||||||
\begin{document}
|
|
||||||
\DocInput{abc.dtx}
|
|
||||||
\end{document}
|
|
||||||
%</driver>
|
|
||||||
% \fi
|
|
||||||
%
|
|
||||||
% \CheckSum{416}
|
|
||||||
%
|
|
||||||
% \CharacterTable
|
|
||||||
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
|
|
||||||
% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
|
|
||||||
% Digits \0\1\2\3\4\5\6\7\8\9
|
|
||||||
% Exclamation \! Double quote \" Hash (number) \#
|
|
||||||
% Dollar \$ Percent \% Ampersand \&
|
|
||||||
% Acute accent \' Left paren \( Right paren \)
|
|
||||||
% Asterisk \* Plus \+ Comma \,
|
|
||||||
% Minus \- Point \. Solidus \/
|
|
||||||
% Colon \: Semicolon \; Less than \<
|
|
||||||
% Equals \= Greater than \> Question mark \?
|
|
||||||
% Commercial at \@ Left bracket \[ Backslash \\
|
|
||||||
% Right bracket \] Circumflex \^ Underscore \_
|
|
||||||
% Grave accent \` Left brace \{ Vertical bar \|
|
|
||||||
% Right brace \} Tilde \~}
|
|
||||||
%
|
|
||||||
% \changes{v2.0b}{2016/05/15}{Use shellesc}
|
|
||||||
%
|
|
||||||
% \changes{v2.0a}{2015/09/09}{Fixed gobbling of leading lines that
|
|
||||||
% start with \%}
|
|
||||||
%
|
|
||||||
% \changes{v2.0}{2008/03/03}{Many changes, in order to allow for Mup
|
|
||||||
% support; added saveall and nosaveall options}
|
|
||||||
%
|
|
||||||
% \changes{v1.1}{2007/03/27}{Added \cs{endgroup} when the warning for
|
|
||||||
% a non existent file is issued}
|
|
||||||
%
|
|
||||||
% \changes{v1.0}{2006/03/22}{After long delay decided to publish it}
|
|
||||||
%
|
|
||||||
% \changes{v0.7}{2005/11/21}{Corrected some errors from previous
|
|
||||||
% version; changed `abcinput' to support keyword-value pairs like
|
|
||||||
% the environment; added the production of a batch file when the
|
|
||||||
% `noshellescape' option is active; improved the documentation}
|
|
||||||
%
|
|
||||||
% \changes{v0.7beta}{2005/11/19}{Added the `postoptions' and `width'
|
|
||||||
% keywords}
|
|
||||||
%
|
|
||||||
% \changes{v0.6}{2005/11/18}{Changed options: erased `nix' and
|
|
||||||
% `dos', added `ps2epsidos' to correct a mistake}
|
|
||||||
%
|
|
||||||
% \changes{v0.5}{2005/11/13}{Added the interface to keyval}
|
|
||||||
%
|
|
||||||
% \changes{v0.4}{2005/11/10}{Initial version; too many things changed}
|
|
||||||
%
|
|
||||||
% \changes{v.0.1-0.3}{2005/11/01}{Very preliminar versions}
|
|
||||||
%
|
|
||||||
% \GetFileInfo{abc.dtx}
|
|
||||||
%
|
|
||||||
% \DoNotIndex{\newcommand,\newenvironment,\def,\ifpdf,\begin}
|
|
||||||
% \DoNotIndex{\DeclareOption,\ExecuteOptions,\RequirePackage}
|
|
||||||
% \DoNotIndex{\renewcommand,\else,\fi,\relax,\@bsphack,\@esphack}
|
|
||||||
% \DoNotIndex{\active,\AtEndOfPackage,\catcode,\centering}
|
|
||||||
% \DoNotIndex{\closeout,\comment,\do,\dospecials,\end,\endcomment}
|
|
||||||
% \DoNotIndex{\fbox,\gdef,\immediate,\includegraphics,\let}
|
|
||||||
% \DoNotIndex{\linewidth,\message,\newif,\newwrite,\openout}
|
|
||||||
% \DoNotIndex{\PackageWarning,\space,\the,\verbatim@line}
|
|
||||||
% \DoNotIndex{\verbatim@processline,\verbatim@start,\write}
|
|
||||||
% \DoNotIndex{\@makeother,\IfFileExists,\ProcessOptions}
|
|
||||||
% \DoNotIndex{\@ifnextchar,\define@key,\MessageBreak,\setkeys}
|
|
||||||
% \DoNotIndex{\stepcounter,\newcounter,\trivlist,\AtEndDocument}
|
|
||||||
% \DoNotIndex{\@empty,\edef,\csname,\endcsname,\edef,\begingroup}
|
|
||||||
% \DoNotIndex{\endgroup,\endtrivlist,\global,\if,\ifx,\item}
|
|
||||||
% \DoNotIndex{\PackageWarningNoLine,\PassOptionsToPackage}
|
|
||||||
% \DoNotIndex{\ProvidesPackage,\@arabic}
|
|
||||||
%
|
|
||||||
% \title{The \textsf{abc} package\thanks{This document corresponds to
|
|
||||||
% \textsf{abc}~\fileversion, dated \filedate.}}
|
|
||||||
%
|
|
||||||
% \author{Enrico Gregorio \\ \texttt{Enrico dot Gregorio at univr dot it}}
|
|
||||||
%
|
|
||||||
% \date{\filedate}
|
|
||||||
%
|
|
||||||
% \maketitle
|
|
||||||
%
|
|
||||||
% \section{Introduction}
|
|
||||||
% There are several ways to set music using \TeX{}, notably
|
|
||||||
% Musix\TeX{} and Lilypond. Both are very powerful and,
|
|
||||||
% consequently, a bit difficult to learn and to use.
|
|
||||||
%
|
|
||||||
% From the point of view of notation, the ABC
|
|
||||||
% system\footnote{\texttt{http://staffweb.cms.gre.ac.uk/\char`\~c.walshaw/abc/}}
|
|
||||||
% is much simpler. A recent extension of this language, called
|
|
||||||
% ABC~Plus\footnote{\texttt{http://abcplus.sourceforge.net}}, allows
|
|
||||||
% for setting multiple staves and polyphony. One of the best programs
|
|
||||||
% for converting these notations into sheet music is
|
|
||||||
% \texttt{abcm2ps}, which can take an ABC or ABC~Plus file and
|
|
||||||
% transform it into a PostScript\texttrademark{} file.
|
|
||||||
%
|
|
||||||
% The purpose of this package is to allow \LaTeX{} users to include in
|
|
||||||
% their documents small excerpts of music written directly in
|
|
||||||
% ABC (Plus). It exploits the \verb|\write18| technique available with
|
|
||||||
% the Web2C implementation of the \TeX{} system and free utilities
|
|
||||||
% like \texttt{ps2eps}, \texttt{ps2epsi} and \texttt{epstopdf}. From
|
|
||||||
% version 2.0b we check the existence of the \textsf{shellesc} package
|
|
||||||
% in order to be compatible with Lua\TeX.
|
|
||||||
%
|
|
||||||
% This package can be used both with \LaTeX{} and
|
|
||||||
% \textsc{pdf}\LaTeX{}, without any change in the user's source file.
|
|
||||||
% It employs also the package \textsf{keyval} by David Carlisle and
|
|
||||||
% ideas from the \textsf{verbatim} package in the \LaTeX{} tools.
|
|
||||||
%
|
|
||||||
% Martin Tarenskeen wrote me about possible support of Mup--Music
|
|
||||||
% Publisher\footnote{\texttt{http://www.arkkra.com}} and actually it
|
|
||||||
% was easy to add it along with some improvements partly suggested by
|
|
||||||
% him. Therefore the package now comes along with a new \textsf{mup}
|
|
||||||
% package; see section~\ref{mup}. I owe many thanks to Martin for
|
|
||||||
% testing the new version.
|
|
||||||
%
|
|
||||||
% We are studying whether it is feasible to extend support also to
|
|
||||||
% other music printing programs like Lilypond.
|
|
||||||
%
|
|
||||||
% \section{Usage}
|
|
||||||
% \DescribeEnv{abc}
|
|
||||||
% The only environment provided by this package is \verb|abc| with
|
|
||||||
% the following syntax:
|
|
||||||
% \begin{quote}
|
|
||||||
% \verb|\begin{abc}[|\meta{keyword}$=$\meta{value}\verb|...]|\\
|
|
||||||
% \meta{ABC Plus material}\\
|
|
||||||
% \verb|\end{abc}|
|
|
||||||
% \end{quote}
|
|
||||||
% The environment should be used only in LR-mode. Its output is set
|
|
||||||
% in a `center' environment. We give a list of the available
|
|
||||||
% keywords.
|
|
||||||
% \begin{description}
|
|
||||||
%
|
|
||||||
% \item[\normalfont\texttt{name=}\meta{name}:] \meta{name} is a name
|
|
||||||
% for the temporary file which will be output and massaged by
|
|
||||||
% \texttt{abcm2ps}. \emph{Warning}: the extension \texttt{.abc} is
|
|
||||||
% automatically added to the file name; esistent files with the same
|
|
||||||
% name will be silently erased. If the keyword is specified without a
|
|
||||||
% value, then the output file receives a unique name.
|
|
||||||
%
|
|
||||||
% \item[\normalfont\texttt{options=}\meta{options}:] \meta{options}
|
|
||||||
% are command line parameters to the \texttt{abcm2ps} utility; the
|
|
||||||
% default are `\texttt{-O= -c}'.
|
|
||||||
%
|
|
||||||
% \item[\normalfont\texttt{postoptions=}\meta{postoptions}:]
|
|
||||||
% \meta{postoptions} are possible command line options which, in
|
|
||||||
% \texttt{abcm2ps} syntax, go after the file name.
|
|
||||||
%
|
|
||||||
% \item[\normalfont\texttt{program=}\meta{program}:] \meta{program} is
|
|
||||||
% used to specify an alternative program to \texttt{abc2mps} (if
|
|
||||||
% existent). In this case users must specify completely the command
|
|
||||||
% line options, directly in \meta{program} or with \meta{options} and
|
|
||||||
% \meta{postoptions}. For example
|
|
||||||
% \begin{quote}
|
|
||||||
% \verb|\begin[name=song,program=abctoeps,options={-a -b}]|\\
|
|
||||||
% \verb|\begin[name=song,program={abc3ps -a -b}]|
|
|
||||||
% \end{quote}
|
|
||||||
% (assuming there is an \texttt{abc3ps} program).
|
|
||||||
%
|
|
||||||
% \item[\normalfont\texttt{width=}\meta{width}:] \meta{width} should
|
|
||||||
% be a dimension; it is best to express it as a fraction of
|
|
||||||
% \verb|\abcwidth|.
|
|
||||||
%
|
|
||||||
% \item[\normalfont\texttt{center}:] This is a boolean, either true
|
|
||||||
% or false; the default is true, if left flush alignment is preferred,
|
|
||||||
% specify \texttt{center=false}.
|
|
||||||
%
|
|
||||||
% \item[\normalfont\texttt{extension}:] This keyword seems practically
|
|
||||||
% useless, but is needed if one needs to input both ABC and Mup files
|
|
||||||
% in one and the same document. See later on.
|
|
||||||
% \end{description}
|
|
||||||
%
|
|
||||||
% \DescribeMacro{\abcinput}
|
|
||||||
% It is also possible to input an available ABC file. The syntax is
|
|
||||||
% \begin{quote}
|
|
||||||
% \verb|\abcinput|\oarg{options}\marg{name}
|
|
||||||
% \end{quote}
|
|
||||||
% where \meta{name} is the name of the file, without the extension
|
|
||||||
% which should be \texttt{.abc}. In the optional argument users can
|
|
||||||
% put keyword-value pairs as for the environment. Of course the
|
|
||||||
% keyword \texttt{name} is ignored here.
|
|
||||||
%
|
|
||||||
% \DescribeMacro{\abcwidth}
|
|
||||||
% Users have a minimum control (at least in this version) on how to
|
|
||||||
% include some lines of music. The only parameter they can modify is
|
|
||||||
% \verb|\abcwidth| with \verb|\renewcommand|. Its normal value is
|
|
||||||
% \verb|\linewidth|. The best thing to do is
|
|
||||||
% \begin{quote}
|
|
||||||
% \verb|\renewcommand{\abcwidth}{|\meta{fraction}\verb|\linewidth}|
|
|
||||||
% \end{quote}
|
|
||||||
% where \meta{fraction} is some number between $0$ and~$1$. Changing
|
|
||||||
% this parameter affects every subsequent music inclusion, obeying to
|
|
||||||
% the usual scoping rules. The width can be changed locally for the
|
|
||||||
% environment or the command with the method explained before.
|
|
||||||
%
|
|
||||||
% \DescribeMacro{\normalabcoutputfile}
|
|
||||||
% The name for the generic output files is ``\texttt{out-abc}''. In
|
|
||||||
% the (improbable) case that some file \texttt{out-abc.}\meta{ext} is
|
|
||||||
% present in the directory, users can redefine
|
|
||||||
% \verb|\normalabcoutputfile| as they like.
|
|
||||||
%
|
|
||||||
% \section{Package options}
|
|
||||||
% There are some package options, to control what is to be passed for
|
|
||||||
% subsequent processing.
|
|
||||||
%
|
|
||||||
% \subsection{\texttt{shellescape} and \texttt{noshellescape}}
|
|
||||||
% The option \texttt{shellescape} (default) means that some external
|
|
||||||
% programs will be called by \LaTeX{} to get the inclusion of the
|
|
||||||
% music lines. If you don't trust the automatic generation, or your
|
|
||||||
% \TeX{} implementation does not allow the trick with \verb|\write18|,
|
|
||||||
% then use \texttt{noshellescape}. In this case, a name should be
|
|
||||||
% specified for every `abc' environment, because otherwise ABC output
|
|
||||||
% files will be overwritten, since they receive the same generic name,
|
|
||||||
% by default. A file named \texttt{out-abc.sh} is produced,
|
|
||||||
% containing the commands to give for elaborating the music files.
|
|
||||||
%
|
|
||||||
% \subsection{\texttt{generate} and \texttt{nogenerate}}
|
|
||||||
% With the \texttt{generate} option (default) the ABC lines will be
|
|
||||||
% processed by the external programs. The \texttt{nogenerate} option
|
|
||||||
% can be used when the ABC sources have not changed, in order to
|
|
||||||
% increase speed. Also in this case, however, a name should be
|
|
||||||
% specified for all output ABC files.
|
|
||||||
%
|
|
||||||
% \subsection{\texttt{ps2epsi}, \texttt{ps2epsidos} and
|
|
||||||
% \texttt{ps2eps}}
|
|
||||||
% The option \texttt{ps2eps} (default) means that the \texttt{ps2eps}
|
|
||||||
% Perl script will be used for generating the EPS file for graphic
|
|
||||||
% inclusion. Specify the \texttt{ps2epsi} option if you prefer the
|
|
||||||
% \texttt{ps2epsi} program; specify \texttt{ps2epsidos} if you are on
|
|
||||||
% a system where the utility \texttt{ps2epsi} generates a file with
|
|
||||||
% three letter extension \texttt{.epi}.
|
|
||||||
%
|
|
||||||
% \subsection{\texttt{nosaveall} and \texttt{saveall}}
|
|
||||||
% The first is the default, but the second is called implicitly when
|
|
||||||
% the \texttt{noshellescape} is given. When the \texttt{saveall}
|
|
||||||
% option is active, every `abc' environment produces a unique output
|
|
||||||
% file; in other words, the \texttt{name} keyword, without value, is
|
|
||||||
% given for every environment. So the \texttt{noshellescape} option
|
|
||||||
% along with \texttt{generate} will not overwrite the output from
|
|
||||||
% unnamed environment. It is possible that, during the document's
|
|
||||||
% preparation, the numbers added to the default file name are out of
|
|
||||||
% synch, the process should converge. Note that with Lua\TeX{} the
|
|
||||||
% \texttt{nosaveall} option can produce errors, so \texttt{saveall} is
|
|
||||||
% enabled by default, with this engine.
|
|
||||||
%
|
|
||||||
%
|
|
||||||
% \section{Compiling documents}
|
|
||||||
% Users must give the option \texttt{-shell-escape} when compiling
|
|
||||||
% their documents, unless they chose the \texttt{nogenerate} package
|
|
||||||
% option or the \texttt{noshellescape}. Thus one of
|
|
||||||
% \begin{quote}
|
|
||||||
% \texttt{latex -shell-escape} \meta{\TeX{} file name}\\
|
|
||||||
% \texttt{pdflatex -shell-escape} \meta{\TeX{} file name}\\
|
|
||||||
% \texttt{simpdftex latex --extratexopts "-shell-escape"}
|
|
||||||
% \end{quote}
|
|
||||||
% should be used from the command line (or equivalent way, depending
|
|
||||||
% on operating system and distribution).
|
|
||||||
%
|
|
||||||
% \section{An example file}
|
|
||||||
% \iffalse
|
|
||||||
%<*example>
|
|
||||||
% \fi
|
|
||||||
% \begin{smallverb}
|
|
||||||
\documentclass[a4paper,12pt]{article}
|
|
||||||
\usepackage[generate,ps2eps]{abc}
|
|
||||||
\usepackage{mathptmx}
|
|
||||||
|
|
||||||
\begin{document}
|
|
||||||
|
|
||||||
\title{Example of ABC Plus in \LaTeX{}}
|
|
||||||
\author{Guido Gonzato}
|
|
||||||
\date{}
|
|
||||||
\maketitle
|
|
||||||
|
|
||||||
This is a short piece.
|
|
||||||
|
|
||||||
\medskip
|
|
||||||
|
|
||||||
\begin{abc}
|
|
||||||
X:4
|
|
||||||
T:Cronin's Hornpipe
|
|
||||||
R:hornpipe
|
|
||||||
S:Keenan and Glackin
|
|
||||||
E:7
|
|
||||||
M:C|
|
|
||||||
L:1/8
|
|
||||||
K:G
|
|
||||||
BA|GABc dBde|gage dega|bage dBGB|cABG A2BA|!
|
|
||||||
GABc dBde|gage dega|bage dBAB|G2G2 G2:|!
|
|
||||||
fg|afd^c d2ga|bged e2ga|(3bag (3agf gedB|(3cBA AG AcBA|!
|
|
||||||
GABc dBde|~g3e dega|bage dBAB|G2G2 G2:|!
|
|
||||||
\end{abc}
|
|
||||||
|
|
||||||
\medskip
|
|
||||||
|
|
||||||
This is another short piece, but we would like to keep the
|
|
||||||
ABC source in our directory.
|
|
||||||
|
|
||||||
\begin{abc}[name=jacky]
|
|
||||||
X:9
|
|
||||||
T:Jacky Tar
|
|
||||||
R:hornpipe
|
|
||||||
M:4/4
|
|
||||||
L:1/8
|
|
||||||
K:Edor
|
|
||||||
(Bd) | "Em" e2 ed efge | "G" d2 B2 B2 (dB) | "D" ABde faef | d2 A2 A2 (Bd) |
|
|
||||||
"Em" e2 ef g2 fe | "G" dB GB d2 (cB) | "D" AGFE DEFA | "Em" G2 E2 E2 :|
|
|
||||||
(GA) | "Em" BGEG BGEG | BAGF E2 (FG) | "D" BGEG BGEG | AGFE D2 (EF) |
|
|
||||||
"G" GFGB g2 (fe) | dBGB d2 (cB) | "D" AGFE DEFA | "Em" G2 E2 E2 :|
|
|
||||||
\end{abc}
|
|
||||||
|
|
||||||
\clearpage
|
|
||||||
|
|
||||||
And, finally, we want to set also the last piece; its ABC code
|
|
||||||
is already in our directory.
|
|
||||||
|
|
||||||
\medskip
|
|
||||||
|
|
||||||
\abcinput{poll}
|
|
||||||
|
|
||||||
\end{document}
|
|
||||||
% \end{smallverb}
|
|
||||||
% \iffalse
|
|
||||||
%</example>
|
|
||||||
% \fi
|
|
||||||
%
|
|
||||||
% This file is accompanied by a file \texttt{poll.abc}
|
|
||||||
% \iffalse
|
|
||||||
%<*abc>
|
|
||||||
% \fi
|
|
||||||
% \begin{smallverb}
|
|
||||||
X:12
|
|
||||||
T:Poll Ha'penny
|
|
||||||
T:Garra\'i na bhF\'eile\'og
|
|
||||||
R:hornpipe
|
|
||||||
H:The Irish title means "The Garden of Honeysuckles"
|
|
||||||
D:Mary Bergin: Feadoga Stain
|
|
||||||
D:Noel Hill agus Tony McMahon: I gCnoc na Grai
|
|
||||||
Z:id:hn-hornpipe-26
|
|
||||||
M:C|
|
|
||||||
L:1/8
|
|
||||||
K:Amix
|
|
||||||
(3GAB | =cAAG A2 (3AB=c | (3d=cB (3AGF G2 (3B^cd | ed^cA d^cAG | ~A3 G A2 de |
|
|
||||||
~f3 d ~e3 c | d2 (3Bcd efge | aged (3=cBA GB | ~A3 G A2:|
|
|
||||||
|: ef | ~g3 f gfef | g2 ga gedg | eaag a3 g | eaag a2 ag |
|
|
||||||
~f3 d ~e3 c | d2 (3Bcd efge | aged (3=cBA GB | ~A3 G A2 :|
|
|
||||||
% \end{smallverb}
|
|
||||||
% \iffalse
|
|
||||||
%</abc>
|
|
||||||
% \fi
|
|
||||||
%
|
|
||||||
% \section{Mup support}\label{mup}
|
|
||||||
% Everything we have said about ABC translates verbatim for Mup.
|
|
||||||
% Simply call the package with
|
|
||||||
% \iffalse
|
|
||||||
%<*verb>
|
|
||||||
% \fi
|
|
||||||
\begin{verbatim}
|
|
||||||
\usepackage{mup}
|
|
||||||
\end{verbatim}
|
|
||||||
% \iffalse
|
|
||||||
%</verb>
|
|
||||||
% \fi
|
|
||||||
|
|
||||||
% with options just like before, and substitute the string `mup' to
|
|
||||||
% every occurrence of `abc' in the preceding sections. The only
|
|
||||||
% differences are in the default command line options when calling the
|
|
||||||
% external program (they are \texttt{-F} for `mup').
|
|
||||||
%
|
|
||||||
% It is even possible to use both external programs in the same
|
|
||||||
% document. If this is desired, call the \textsf{abc} package and
|
|
||||||
% define a new environment for Mup inclusion as follows
|
|
||||||
% \iffalse
|
|
||||||
%<*verb>
|
|
||||||
% \fi
|
|
||||||
\begin{verbatim}
|
|
||||||
\newenvironment{mup}[1][]
|
|
||||||
{\renewcommand{\normalabcoutputfile}{out-mup}%
|
|
||||||
\abc[program=mup,options={-F},extension=mup,#1]}
|
|
||||||
{\endabc}
|
|
||||||
\newcommand{\mupinput}[2][]{%
|
|
||||||
\abcinput[program=mup,options={-F},extension=mup,#1]{#2}}
|
|
||||||
\end{verbatim}
|
|
||||||
% \iffalse
|
|
||||||
%</verb>
|
|
||||||
% \fi
|
|
||||||
%
|
|
||||||
% Here is an example with Mup.
|
|
||||||
%
|
|
||||||
% \iffalse
|
|
||||||
%<*example-mup>
|
|
||||||
% \fi
|
|
||||||
% \begin{smallverb}
|
|
||||||
\documentclass[a4paper,12pt]{article}
|
|
||||||
\usepackage[generate,ps2eps]{mup}
|
|
||||||
\usepackage{mathptmx}
|
|
||||||
|
|
||||||
\begin{document}
|
|
||||||
|
|
||||||
\title{Example of MUP in \LaTeX{}}
|
|
||||||
\author{Martin Tarenskeen}
|
|
||||||
\date{}
|
|
||||||
\maketitle
|
|
||||||
|
|
||||||
This is a short piece.
|
|
||||||
|
|
||||||
\medskip
|
|
||||||
|
|
||||||
\begin{mup}
|
|
||||||
1: a-;b-;c;d;
|
|
||||||
bar
|
|
||||||
1: e;f;g;a;
|
|
||||||
endbar
|
|
||||||
\end{mup}
|
|
||||||
|
|
||||||
\medskip
|
|
||||||
|
|
||||||
This is another short piece, but we would like to keep the
|
|
||||||
MUP source in our directory.
|
|
||||||
|
|
||||||
\begin{mup}[name=mymup]
|
|
||||||
score
|
|
||||||
staffs=2
|
|
||||||
time=6/8
|
|
||||||
beamstyle=4.,4.
|
|
||||||
|
|
||||||
staff 2
|
|
||||||
clef=bass
|
|
||||||
|
|
||||||
music
|
|
||||||
1: 8c;d;e;f;g;a;
|
|
||||||
2: 4.ceg;cfa;
|
|
||||||
repeatend
|
|
||||||
|
|
||||||
\end{mup}
|
|
||||||
|
|
||||||
\clearpage
|
|
||||||
|
|
||||||
And finally, we want to set also the last piece; its MUP code
|
|
||||||
is already in our directory.
|
|
||||||
|
|
||||||
\medskip
|
|
||||||
|
|
||||||
\mupinput{simple}
|
|
||||||
|
|
||||||
\end{document}
|
|
||||||
% \end{smallverb}
|
|
||||||
% \iffalse
|
|
||||||
%</example-mup>
|
|
||||||
% \fi
|
|
||||||
% This file is accompanied by a file \texttt{simple.mup}
|
|
||||||
% \iffalse
|
|
||||||
%<*mup>
|
|
||||||
% \fi
|
|
||||||
% \begin{smallverb}
|
|
||||||
score
|
|
||||||
staffs=2
|
|
||||||
time=6/8
|
|
||||||
beamstyle=4.,4.
|
|
||||||
|
|
||||||
staff 2
|
|
||||||
clef=bass
|
|
||||||
|
|
||||||
music
|
|
||||||
1: 8c;d;e;f;g;a;
|
|
||||||
2: 4.ceg;cfa;
|
|
||||||
repeatend
|
|
||||||
% \end{smallverb}
|
|
||||||
% \iffalse
|
|
||||||
%</mup>
|
|
||||||
% \fi
|
|
||||||
%
|
|
||||||
% \StopEventually{\PrintChanges\PrintIndex}
|
|
||||||
%
|
|
||||||
% \section{The implementation}
|
|
||||||
% After the usual stuff of package presentation, here are the actual
|
|
||||||
% macros. To begin with the option declarations and the defaults.
|
|
||||||
% The first options are boolean.
|
|
||||||
% \begin{macrocode}
|
|
||||||
%<*package>
|
|
||||||
\RequirePackage{ifluatex}
|
|
||||||
\newif\ifabc@shellescape
|
|
||||||
\newif\ifabc@generate
|
|
||||||
\newif\ifabc@warning
|
|
||||||
\newif\ifabc@saveall
|
|
||||||
\newif\ifabc@mup
|
|
||||||
\DeclareOption{mup}{\abc@muptrue}
|
|
||||||
\DeclareOption{noshellescape}{\abc@shellescapefalse\abc@warningtrue
|
|
||||||
\abc@savealltrue}
|
|
||||||
\DeclareOption{shellescape}{\abc@shellescapetrue}
|
|
||||||
\DeclareOption{nogenerate}{\abc@generatefalse}
|
|
||||||
\DeclareOption{generate}{\abc@generatetrue}
|
|
||||||
\DeclareOption{nosaveall}{\abc@saveallfalse}
|
|
||||||
\DeclareOption{saveall}{\abc@savealltrue}
|
|
||||||
% \end{macrocode}
|
|
||||||
% The following options control the external programs to use.
|
|
||||||
% \begin{macrocode}
|
|
||||||
\def\abc@epsext{eps}
|
|
||||||
\DeclareOption{ps2eps}{\def\abc@pscmd{ps2eps -f}}
|
|
||||||
\DeclareOption{ps2epsi}{\def\abc@pscmd{ps2epsi}\def\abc@epsext{epsi}}
|
|
||||||
\DeclareOption{ps2epsidos}{\def\abc@pscmd{ps2epsi}\def\abc@epsext{epi}}
|
|
||||||
% \end{macrocode}
|
|
||||||
% Now we declare the default options and call the user specified
|
|
||||||
% ones. Since Lua\TeX{} doesn't accept loading different PDF files
|
|
||||||
% with the same name, when this engine is used, the \texttt{saveall}
|
|
||||||
% option is enabled by default.
|
|
||||||
% \begin{macrocode}
|
|
||||||
\ExecuteOptions{generate,shellescape,nosaveall,ps2eps}
|
|
||||||
\ifluatex
|
|
||||||
\ExecuteOptions{saveall}
|
|
||||||
\fi
|
|
||||||
\ProcessOptions\relax
|
|
||||||
% \end{macrocode}
|
|
||||||
%
|
|
||||||
% Then we have to load some packages we need. The first one is to do
|
|
||||||
% verbatim output to a file without reinventing the wheel. Then the
|
|
||||||
% package for implementing keyword-value options; we have to take care
|
|
||||||
% of graphics inclusion, and to control whether we are using \LaTeX{}
|
|
||||||
% with DVI or PDF output.
|
|
||||||
% \begin{macrocode}
|
|
||||||
\RequirePackage{verbatim}
|
|
||||||
\RequirePackage{keyval}
|
|
||||||
\RequirePackage{graphicx}
|
|
||||||
\RequirePackage{ifpdf}
|
|
||||||
% \end{macrocode}
|
|
||||||
% Next we define some internal commands. First of all a boolean for
|
|
||||||
% issuing messages if necessary and a counter to assign unique names
|
|
||||||
% to output files
|
|
||||||
% \begin{macrocode}
|
|
||||||
\newif\ifabc@unprocessedfiles
|
|
||||||
\newcounter{abc@count}
|
|
||||||
% \end{macrocode}
|
|
||||||
% We choose to give explicitly the extensions to the graphics files,
|
|
||||||
% since some user could prefer \texttt{ps2epsi}. Everything is
|
|
||||||
% doubled for Mup support.
|
|
||||||
% \begin{environment}{mup}
|
|
||||||
% \begin{macro}{\mupinput}
|
|
||||||
% \begin{macrocode}
|
|
||||||
\ifabc@mup
|
|
||||||
\newcommand{\abc@cmd}{mup} % virtually no choice
|
|
||||||
\newcommand{\abc@parm}{-F} % -F MUST stay
|
|
||||||
\newcommand{\abc@epstopdfcmd}{epstopdf}
|
|
||||||
\newcommand{\abc@pdfext}{pdf}
|
|
||||||
\def\normalabcoutputfile{out-mup}
|
|
||||||
\def\normalmupoutputfile{\normalabcoutputfile}
|
|
||||||
\def\mup{\abc}
|
|
||||||
\def\endmup{\endabc}
|
|
||||||
\def\mupinput{\abcinput}
|
|
||||||
\def\abc@ext{.mup}
|
|
||||||
\def\abc@packagename{mup}
|
|
||||||
\else
|
|
||||||
\newcommand{\abc@cmd}{abcm2ps} % virtually no choice
|
|
||||||
\newcommand{\abc@parm}{-O= -c} % -O= MUST stay
|
|
||||||
\newcommand{\abc@epstopdfcmd}{epstopdf}
|
|
||||||
\newcommand{\abc@pdfext}{pdf}
|
|
||||||
\def\normalabcoutputfile{out-abc}
|
|
||||||
\def\abc@ext{.abc}
|
|
||||||
\def\abc@packagename{abc}
|
|
||||||
\fi
|
|
||||||
\def\abc@tempfile{\normalabcoutputfile}
|
|
||||||
\def\abc@opt{}
|
|
||||||
\let\abc@postopt\@empty
|
|
||||||
\ifpdf
|
|
||||||
\let\abc@finalext\abc@pdfext
|
|
||||||
\else
|
|
||||||
\let\abc@finalext\abc@epsext
|
|
||||||
\fi
|
|
||||||
\newif\ifabc@center
|
|
||||||
\abc@centertrue
|
|
||||||
% \end{macrocode}
|
|
||||||
% \end{macro}
|
|
||||||
% \end{environment}
|
|
||||||
% The following is the only parameter the user is authorized to
|
|
||||||
% tamper with; it has an alias for Mup.
|
|
||||||
% \begin{macrocode}
|
|
||||||
\newcommand{\abcwidth}{\linewidth} % only fractions of \linewidth
|
|
||||||
\let\mupwidth\abcwidth
|
|
||||||
% \end{macrocode}
|
|
||||||
% \begin{macro}{\abc@startgen}
|
|
||||||
% \begin{macro}{\abc@finishgen}
|
|
||||||
% Now something directly borrowed from the package \textsf{verbatim}.
|
|
||||||
% We declare an output stream and define two macros which will be
|
|
||||||
% called by the \texttt{abc} environment or by the \verb|\abcinput|
|
|
||||||
% command in case we are generating the graphics files. The macro
|
|
||||||
% \verb|\abc@startgen| then passes the control to \verb|\abc@process|
|
|
||||||
% which is different, according to the options given to the package.
|
|
||||||
% \begin{macrocode}
|
|
||||||
\newwrite\abc@out
|
|
||||||
\def\abc@startgen{%
|
|
||||||
\@bsphack
|
|
||||||
\immediate\openout\abc@out\abc@tempfile\abc@ext
|
|
||||||
\let\do\@makeother\dospecials
|
|
||||||
\catcode`\^^M\active \catcode`\^^I=12
|
|
||||||
\def\verbatim@processline{%
|
|
||||||
\immediate\write\abc@out
|
|
||||||
{\the\verbatim@line}}%
|
|
||||||
\verbatim@start}
|
|
||||||
\def\abc@finishgen{%
|
|
||||||
\immediate\closeout\abc@out
|
|
||||||
\@esphack
|
|
||||||
\abc@process
|
|
||||||
}
|
|
||||||
% \end{macrocode}
|
|
||||||
% \end{macro}
|
|
||||||
% \end{macro}
|
|
||||||
% \begin{macro}{\abc@doshellcommand}
|
|
||||||
% \begin{macro}{\abc@nodoshellcommand}
|
|
||||||
% We define a macro for the external massaging of the ABC files and
|
|
||||||
% another one for the case the user doesn't trust or have available
|
|
||||||
% the \verb|\write18| trick; the second one spits out a very simple
|
|
||||||
% shell script which can be used to take care of the compilation; this
|
|
||||||
% file is probably compatible with all systems having a command line
|
|
||||||
% interface. Then we check the options again and define the commands
|
|
||||||
% that really do the job.
|
|
||||||
% \begin{macrocode}
|
|
||||||
\ifluatex
|
|
||||||
\IfFileExists{shellesc.sty}
|
|
||||||
{\RequirePackage{shellesc}\let\abc@shell\ShellEscape}
|
|
||||||
{\def\abc@shell{\immediate\write18}}
|
|
||||||
\else
|
|
||||||
\def\abc@shell{\immediate\write18}
|
|
||||||
\fi
|
|
||||||
\def\abc@doshellcommand{%
|
|
||||||
\abc@shell{%
|
|
||||||
\ifabc@mup
|
|
||||||
\abc@cmd\space
|
|
||||||
\abc@opt\space
|
|
||||||
\abc@parm\space
|
|
||||||
\abc@tempfile\abc@ext\space
|
|
||||||
\else
|
|
||||||
\abc@cmd\space
|
|
||||||
\abc@parm\space
|
|
||||||
\abc@opt\space
|
|
||||||
\abc@tempfile\abc@ext\space
|
|
||||||
\fi
|
|
||||||
\ifx\abc@postopt\@empty
|
|
||||||
\else\space\abc@postopt\fi
|
|
||||||
}%
|
|
||||||
\abc@shell{%
|
|
||||||
\abc@pscmd\space\abc@tempfile.ps
|
|
||||||
}%
|
|
||||||
\ifpdf
|
|
||||||
\abc@shell{%
|
|
||||||
\abc@epstopdfcmd\space\abc@tempfile.\abc@epsext
|
|
||||||
}%
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
\def\abc@nodoshellcommand{%
|
|
||||||
\immediate\write\abc@outsh{%
|
|
||||||
\abc@cmd\space
|
|
||||||
\abc@parm\space
|
|
||||||
\abc@opt\space
|
|
||||||
\abc@tempfile\abc@ext\space
|
|
||||||
\ifx\abc@postopt\@empty
|
|
||||||
\else\space\abc@postopt\fi}%
|
|
||||||
\immediate\write\abc@outsh{%
|
|
||||||
\abc@pscmd\space\abc@tempfile.ps}%
|
|
||||||
\ifpdf
|
|
||||||
\immediate\write\abc@outsh{%
|
|
||||||
\abc@epstopdfcmd\space\abc@tempfile.\abc@epsext}%
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
% \end{macrocode}
|
|
||||||
% We use a conditional to emit a message at the end of the
|
|
||||||
% compilation if some file has not been found and the
|
|
||||||
% \texttt{nogenerate} option was chosen.
|
|
||||||
% \begin{macrocode}
|
|
||||||
\AtEndDocument{%
|
|
||||||
\ifabc@warning\ifabc@unprocessedfiles
|
|
||||||
\PackageWarningNoLine{\abc@packagename}{%
|
|
||||||
\ifabc@shellescape
|
|
||||||
You have set the `shellescape' option, but you ran%
|
|
||||||
\MessageBreak
|
|
||||||
(pdf)latex without the `-shell-escape' command line%
|
|
||||||
\MessageBreak
|
|
||||||
option. Fix it either with the `noshellescape' option%
|
|
||||||
\MessageBreak
|
|
||||||
in your document or the correct call of (pdf)latex%
|
|
||||||
\else
|
|
||||||
Remember to generate the [eps,pdf] files before compiling%
|
|
||||||
\MessageBreak
|
|
||||||
again. Use the file \abc@tempfile.sh for a list or as a script%
|
|
||||||
\fi}%
|
|
||||||
\fi\fi}
|
|
||||||
% \end{macrocode}
|
|
||||||
% \end{macro}
|
|
||||||
% \end{macro}
|
|
||||||
% Now we define the macro responsible for the massaging of the ABC
|
|
||||||
% files. This is a good moment for inizializing the writing of the
|
|
||||||
% shell script, when needed.
|
|
||||||
% \begin{macro}{\abc@process}
|
|
||||||
% \begin{macrocode}
|
|
||||||
\ifabc@shellescape
|
|
||||||
\let\abc@process\abc@doshellcommand
|
|
||||||
\else
|
|
||||||
\newwrite\abc@outsh
|
|
||||||
\immediate\openout\abc@outsh\abc@tempfile.sh
|
|
||||||
\AtEndDocument{\closeout\abc@outsh}
|
|
||||||
\let\abc@process\abc@nodoshellcommand
|
|
||||||
\fi
|
|
||||||
% \end{macrocode}
|
|
||||||
% \end{macro}
|
|
||||||
% \begin{macro}{\abc@start}
|
|
||||||
% \begin{macro}{\abc@finish}
|
|
||||||
% We now define how to start and finish; if no generation is required,
|
|
||||||
% the ABC lines are skipped like a comment (thanks again to the
|
|
||||||
% \textsf{verbatim} package).
|
|
||||||
% \begin{macrocode}
|
|
||||||
\ifabc@generate
|
|
||||||
\let\abc@start\abc@startgen
|
|
||||||
\let\abc@finish\abc@finishgen
|
|
||||||
\else
|
|
||||||
\let\abc@start\comment
|
|
||||||
\let\abc@finish\endcomment
|
|
||||||
\fi
|
|
||||||
% \end{macrocode}
|
|
||||||
% \end{macro}
|
|
||||||
% \end{macro}
|
|
||||||
% \begin{environment}{abc}
|
|
||||||
% \begin{macro}{\abcinput}
|
|
||||||
% Finally, we define the environment and the command. Some commands
|
|
||||||
% are initialized here; the name of the temporary file is, by default,
|
|
||||||
% ``out-abc'' which should not clobber any existing file.
|
|
||||||
% \begin{macrocode}
|
|
||||||
\def\abc{\@makeother\%\@ifnextchar[\abc@grab{\abc@grab[]}}
|
|
||||||
\define@key{abc}{name}[]{%
|
|
||||||
\if!#1!\stepcounter{abc@count}%
|
|
||||||
\edef\abc@tempfile{\normalabcoutputfile-\@arabic\c@abc@count}%
|
|
||||||
\else
|
|
||||||
\def\abc@tempfile{#1}%
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
\define@key{abc}{options}{\def\abc@opt{#1}}
|
|
||||||
\define@key{abc}{postoptions}{\def\abc@postopt{#1}}
|
|
||||||
\define@key{abc}{program}{\def\abc@cmd{#1}\let\abc@parm\@empty}
|
|
||||||
\define@key{abc}{width}{\def\abc@width{#1}}
|
|
||||||
\define@key{abc}{center}[true]{\csname abc@center#1\endcsname}
|
|
||||||
\define@key{abc}{extension}{\def\abc@ext{.#1}}
|
|
||||||
\def\abc@grab[#1]{\let\abc@width=\abcwidth
|
|
||||||
\ifabc@saveall
|
|
||||||
\setkeys{abc}{name,#1}%
|
|
||||||
\else
|
|
||||||
\setkeys{abc}{#1}%
|
|
||||||
\fi\abc@start}
|
|
||||||
% \end{macrocode}
|
|
||||||
% The final part of the environment; we do the processing, if
|
|
||||||
% required and then include the graphics file. If none is found, the
|
|
||||||
% simple name is used, to recall that some processing is to be done.
|
|
||||||
% \begin{macrocode}
|
|
||||||
\def\endabc{%
|
|
||||||
\abc@finish
|
|
||||||
\trivlist\item[]\ifabc@center\centering\fi
|
|
||||||
\IfFileExists{\abc@tempfile.\abc@finalext}
|
|
||||||
{\includegraphics[width=\abc@width]{\abc@tempfile.\abc@finalext}}%
|
|
||||||
{\global\abc@warningtrue\fbox{\abc@tempfile}%
|
|
||||||
\global\abc@unprocessedfilestrue}%
|
|
||||||
\endtrivlist
|
|
||||||
}
|
|
||||||
% \end{macrocode}
|
|
||||||
% The command version is similar. The only difference is that we
|
|
||||||
% issue a warning if the named file does not exist.
|
|
||||||
% \begin{macrocode}
|
|
||||||
\def\abcinput{\@ifnextchar[\abc@grabinput{\abc@grabinput[]}}
|
|
||||||
\def\abc@grabinput[#1]#2{\let\abc@width=\abcwidth\setkeys{abc}{#1}%
|
|
||||||
\begingroup\def\abc@tempfile{#2}%
|
|
||||||
\IfFileExists{\abc@tempfile\abc@ext}
|
|
||||||
{%
|
|
||||||
\abc@process
|
|
||||||
\begin{center}
|
|
||||||
\IfFileExists{\abc@tempfile.\abc@finalext}
|
|
||||||
{\includegraphics[width=\abc@width]{\abc@tempfile.\abc@finalext}}%
|
|
||||||
{\fbox{\abc@tempfile}}%
|
|
||||||
\end{center}%
|
|
||||||
\endgroup
|
|
||||||
}
|
|
||||||
{\PackageWarning{\abc@packagename}{No file \abc@tempfile\abc@ext\space found}}%
|
|
||||||
}
|
|
||||||
%</package>
|
|
||||||
% \end{macrocode}
|
|
||||||
% \end{macro}
|
|
||||||
% \end{environment}
|
|
||||||
% \begin{macrocode}
|
|
||||||
%<*package-mup>
|
|
||||||
\ProvidesPackage{mup}
|
|
||||||
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{abc}}
|
|
||||||
\ProcessOptions\relax
|
|
||||||
\RequirePackage[mup]{abc}
|
|
||||||
%</package-mup>
|
|
||||||
% \end{macrocode}
|
|
||||||
% \Finale
|
|
11
abc/abc.glo
11
abc/abc.glo
|
@ -1,11 +0,0 @@
|
||||||
\glossaryentry{v2.0b> =General:>Use shellesc}{1}
|
|
||||||
\glossaryentry{v2.0a> =General:>Fixed gobbling of leading lines that start with \%}{1}
|
|
||||||
\glossaryentry{v2.0> =General:>Many changes, in order to allow for Mup support; added saveall and nosaveall options}{1}
|
|
||||||
\glossaryentry{v1.1> =General:>Added \cs {endgroup} when the warning for a non existent file is issued}{1}
|
|
||||||
\glossaryentry{v1.0> =General:>After long delay decided to publish it}{1}
|
|
||||||
\glossaryentry{v0.7> =General:>Corrected some errors from previous version; changed `abcinput' to support keyword-value pairs like the environment; added the production of a batch file when the `noshellescape' option is active; improved the documentation}{1}
|
|
||||||
\glossaryentry{v0.7beta> =General:>Added the `postoptions' and `width' keywords}{1}
|
|
||||||
\glossaryentry{v0.6> =General:>Changed options: erased `nix' and `dos', added `ps2epsidos' to correct a mistake}{1}
|
|
||||||
\glossaryentry{v0.5> =General:>Added the interface to keyval}{1}
|
|
||||||
\glossaryentry{v0.4> =General:>Initial version; too many things changed}{1}
|
|
||||||
\glossaryentry{v.0.1-0.3> =General:>Very preliminar versions}{1}
|
|
63
abc/abc.ins
63
abc/abc.ins
|
@ -1,63 +0,0 @@
|
||||||
%%
|
|
||||||
%% abc.ins
|
|
||||||
%% Copyright 2006-2016 Enrico Gregorio
|
|
||||||
%%
|
|
||||||
%% This program is provided under the terms of the
|
|
||||||
%% LaTeX Project Public License distributed from CTAN
|
|
||||||
%% archives in directory macros/latex/base/lppl.txt.
|
|
||||||
%%
|
|
||||||
%% Author: Enrico Gregorio
|
|
||||||
%% Enrico dot Gregorio at univr dot it
|
|
||||||
%%
|
|
||||||
%% This work has the LPPL maintenance status "author-maintained".
|
|
||||||
%%
|
|
||||||
%% This file will generate fast loadable files and documentation
|
|
||||||
%% driver files from the doc files in this package when run through
|
|
||||||
%% LaTeX or TeX.
|
|
||||||
%%
|
|
||||||
%% --------------- start of docstrip commands ------------------
|
|
||||||
%%
|
|
||||||
\input docstrip
|
|
||||||
\preamble
|
|
||||||
|
|
||||||
Copyright 2006-2016 Enrico Gregorio
|
|
||||||
|
|
||||||
This program is provided under the terms of the
|
|
||||||
LaTeX Project Public License distributed from CTAN
|
|
||||||
archives in directory macros/latex/base/lppl.txt.
|
|
||||||
|
|
||||||
Author: Enrico Gregorio
|
|
||||||
Enrico dot Gregorio at univr dot it
|
|
||||||
|
|
||||||
This work has the LPPL maintenance status "author-maintained".
|
|
||||||
|
|
||||||
\endpreamble
|
|
||||||
|
|
||||||
\keepsilent
|
|
||||||
\askforoverwritefalse
|
|
||||||
|
|
||||||
\Msg{*** Generating the package files ***}
|
|
||||||
\generate{\file{abc.sty}{\from{abc.dtx}{package}}%
|
|
||||||
\file{example.tex}{\from{abc.dtx}{example}}%
|
|
||||||
\file{mup.sty}{\from{abc.dtx}{package-mup}}%
|
|
||||||
\file{mupexa.tex}{\from{abc.dtx}{example-mup}}%
|
|
||||||
\nopreamble\nopostamble
|
|
||||||
\file{poll.abc}{\from{abc.dtx}{abc}}%
|
|
||||||
\file{simple.mup}{\from{abc.dtx}{mup}}%
|
|
||||||
}
|
|
||||||
|
|
||||||
\Msg{***********************************************************}
|
|
||||||
\Msg{*}
|
|
||||||
\Msg{* To finish the installation you have to move the following}
|
|
||||||
\Msg{* files into a directory searched by TeX:}
|
|
||||||
\Msg{*}
|
|
||||||
\Msg{* \space\space abc.sty}
|
|
||||||
\Msg{*}
|
|
||||||
\Msg{*}
|
|
||||||
\Msg{* To produce the documentation on abc's code run the}
|
|
||||||
\Msg{* file ending with `.dtx' through (pdf)LaTeX.}
|
|
||||||
\Msg{*}
|
|
||||||
\Msg{* Happy TeXing}
|
|
||||||
\Msg{***********************************************************}
|
|
||||||
|
|
||||||
\endbatchfile
|
|
BIN
abc/abc.pdf
BIN
abc/abc.pdf
Binary file not shown.
226
abc/abc.sty
226
abc/abc.sty
|
@ -1,226 +0,0 @@
|
||||||
%%
|
|
||||||
%% This is file `abc.sty',
|
|
||||||
%% generated with the docstrip utility.
|
|
||||||
%%
|
|
||||||
%% The original source files were:
|
|
||||||
%%
|
|
||||||
%% abc.dtx (with options: `package')
|
|
||||||
%%
|
|
||||||
%% Copyright 2006-2016 Enrico Gregorio
|
|
||||||
%%
|
|
||||||
%% This program is provided under the terms of the
|
|
||||||
%% LaTeX Project Public License distributed from CTAN
|
|
||||||
%% archives in directory macros/latex/base/lppl.txt.
|
|
||||||
%%
|
|
||||||
%% Author: Enrico Gregorio
|
|
||||||
%% Enrico dot Gregorio at univr dot it
|
|
||||||
%%
|
|
||||||
%% This work has the LPPL maintenance status "author-maintained".
|
|
||||||
%%
|
|
||||||
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
|
|
||||||
\ProvidesPackage{abc}
|
|
||||||
[2016/05/15 v2.0b Enrico Gregorio]
|
|
||||||
|
|
||||||
\RequirePackage{ifluatex}
|
|
||||||
\newif\ifabc@shellescape
|
|
||||||
\newif\ifabc@generate
|
|
||||||
\newif\ifabc@warning
|
|
||||||
\newif\ifabc@saveall
|
|
||||||
\newif\ifabc@mup
|
|
||||||
\DeclareOption{mup}{\abc@muptrue}
|
|
||||||
\DeclareOption{noshellescape}{\abc@shellescapefalse\abc@warningtrue
|
|
||||||
\abc@savealltrue}
|
|
||||||
\DeclareOption{shellescape}{\abc@shellescapetrue}
|
|
||||||
\DeclareOption{nogenerate}{\abc@generatefalse}
|
|
||||||
\DeclareOption{generate}{\abc@generatetrue}
|
|
||||||
\DeclareOption{nosaveall}{\abc@saveallfalse}
|
|
||||||
\DeclareOption{saveall}{\abc@savealltrue}
|
|
||||||
\def\abc@epsext{eps}
|
|
||||||
\DeclareOption{ps2eps}{\def\abc@pscmd{ps2eps -f}}
|
|
||||||
\DeclareOption{ps2epsi}{\def\abc@pscmd{ps2epsi}\def\abc@epsext{epsi}}
|
|
||||||
\DeclareOption{ps2epsidos}{\def\abc@pscmd{ps2epsi}\def\abc@epsext{epi}}
|
|
||||||
\ExecuteOptions{generate,shellescape,nosaveall,ps2eps}
|
|
||||||
\ifluatex
|
|
||||||
\ExecuteOptions{saveall}
|
|
||||||
\fi
|
|
||||||
\ProcessOptions\relax
|
|
||||||
\RequirePackage{verbatim}
|
|
||||||
\RequirePackage{keyval}
|
|
||||||
\RequirePackage{graphicx}
|
|
||||||
\RequirePackage{ifpdf}
|
|
||||||
\newif\ifabc@unprocessedfiles
|
|
||||||
\newcounter{abc@count}
|
|
||||||
\ifabc@mup
|
|
||||||
\newcommand{\abc@cmd}{mup} % virtually no choice
|
|
||||||
\newcommand{\abc@parm}{-F} % -F MUST stay
|
|
||||||
\newcommand{\abc@epstopdfcmd}{epstopdf}
|
|
||||||
\newcommand{\abc@pdfext}{pdf}
|
|
||||||
\def\normalabcoutputfile{out-mup}
|
|
||||||
\def\normalmupoutputfile{\normalabcoutputfile}
|
|
||||||
\def\mup{\abc}
|
|
||||||
\def\endmup{\endabc}
|
|
||||||
\def\mupinput{\abcinput}
|
|
||||||
\def\abc@ext{.mup}
|
|
||||||
\def\abc@packagename{mup}
|
|
||||||
\else
|
|
||||||
\newcommand{\abc@cmd}{abcm2ps} % virtually no choice
|
|
||||||
\newcommand{\abc@parm}{-O= -c} % -O= MUST stay
|
|
||||||
\newcommand{\abc@epstopdfcmd}{epstopdf}
|
|
||||||
\newcommand{\abc@pdfext}{pdf}
|
|
||||||
\def\normalabcoutputfile{out-abc}
|
|
||||||
\def\abc@ext{.abc}
|
|
||||||
\def\abc@packagename{abc}
|
|
||||||
\fi
|
|
||||||
\def\abc@tempfile{\normalabcoutputfile}
|
|
||||||
\def\abc@opt{}
|
|
||||||
\let\abc@postopt\@empty
|
|
||||||
\ifpdf
|
|
||||||
\let\abc@finalext\abc@pdfext
|
|
||||||
\else
|
|
||||||
\let\abc@finalext\abc@epsext
|
|
||||||
\fi
|
|
||||||
\newif\ifabc@center
|
|
||||||
\abc@centertrue
|
|
||||||
\newcommand{\abcwidth}{\linewidth} % only fractions of \linewidth
|
|
||||||
\let\mupwidth\abcwidth
|
|
||||||
\newwrite\abc@out
|
|
||||||
\def\abc@startgen{%
|
|
||||||
\@bsphack
|
|
||||||
\immediate\openout\abc@out\abc@tempfile\abc@ext
|
|
||||||
\let\do\@makeother\dospecials
|
|
||||||
\catcode`\^^M\active \catcode`\^^I=12
|
|
||||||
\def\verbatim@processline{%
|
|
||||||
\immediate\write\abc@out
|
|
||||||
{\the\verbatim@line}}%
|
|
||||||
\verbatim@start}
|
|
||||||
\def\abc@finishgen{%
|
|
||||||
\immediate\closeout\abc@out
|
|
||||||
\@esphack
|
|
||||||
\abc@process
|
|
||||||
}
|
|
||||||
\ifluatex
|
|
||||||
\IfFileExists{shellesc.sty}
|
|
||||||
{\RequirePackage{shellesc}\let\abc@shell\ShellEscape}
|
|
||||||
{\def\abc@shell{\immediate\write18}}
|
|
||||||
\else
|
|
||||||
\def\abc@shell{\immediate\write18}
|
|
||||||
\fi
|
|
||||||
\def\abc@doshellcommand{%
|
|
||||||
\abc@shell{%
|
|
||||||
\ifabc@mup
|
|
||||||
\abc@cmd\space
|
|
||||||
\abc@opt\space
|
|
||||||
\abc@parm\space
|
|
||||||
\abc@tempfile\abc@ext\space
|
|
||||||
\else
|
|
||||||
\abc@cmd\space
|
|
||||||
\abc@parm\space
|
|
||||||
\abc@opt\space
|
|
||||||
\abc@tempfile\abc@ext\space
|
|
||||||
\fi
|
|
||||||
\ifx\abc@postopt\@empty
|
|
||||||
\else\space\abc@postopt\fi
|
|
||||||
}%
|
|
||||||
\abc@shell{%
|
|
||||||
\abc@pscmd\space\abc@tempfile.ps
|
|
||||||
}%
|
|
||||||
\ifpdf
|
|
||||||
\abc@shell{%
|
|
||||||
\abc@epstopdfcmd\space\abc@tempfile.\abc@epsext
|
|
||||||
}%
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
\def\abc@nodoshellcommand{%
|
|
||||||
\immediate\write\abc@outsh{%
|
|
||||||
\abc@cmd\space
|
|
||||||
\abc@parm\space
|
|
||||||
\abc@opt\space
|
|
||||||
\abc@tempfile\abc@ext\space
|
|
||||||
\ifx\abc@postopt\@empty
|
|
||||||
\else\space\abc@postopt\fi}%
|
|
||||||
\immediate\write\abc@outsh{%
|
|
||||||
\abc@pscmd\space\abc@tempfile.ps}%
|
|
||||||
\ifpdf
|
|
||||||
\immediate\write\abc@outsh{%
|
|
||||||
\abc@epstopdfcmd\space\abc@tempfile.\abc@epsext}%
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
\AtEndDocument{%
|
|
||||||
\ifabc@warning\ifabc@unprocessedfiles
|
|
||||||
\PackageWarningNoLine{\abc@packagename}{%
|
|
||||||
\ifabc@shellescape
|
|
||||||
You have set the `shellescape' option, but you ran%
|
|
||||||
\MessageBreak
|
|
||||||
(pdf)latex without the `-shell-escape' command line%
|
|
||||||
\MessageBreak
|
|
||||||
option. Fix it either with the `noshellescape' option%
|
|
||||||
\MessageBreak
|
|
||||||
in your document or the correct call of (pdf)latex%
|
|
||||||
\else
|
|
||||||
Remember to generate the [eps,pdf] files before compiling%
|
|
||||||
\MessageBreak
|
|
||||||
again. Use the file \abc@tempfile.sh for a list or as a script%
|
|
||||||
\fi}%
|
|
||||||
\fi\fi}
|
|
||||||
\ifabc@shellescape
|
|
||||||
\let\abc@process\abc@doshellcommand
|
|
||||||
\else
|
|
||||||
\newwrite\abc@outsh
|
|
||||||
\immediate\openout\abc@outsh\abc@tempfile.sh
|
|
||||||
\AtEndDocument{\closeout\abc@outsh}
|
|
||||||
\let\abc@process\abc@nodoshellcommand
|
|
||||||
\fi
|
|
||||||
\ifabc@generate
|
|
||||||
\let\abc@start\abc@startgen
|
|
||||||
\let\abc@finish\abc@finishgen
|
|
||||||
\else
|
|
||||||
\let\abc@start\comment
|
|
||||||
\let\abc@finish\endcomment
|
|
||||||
\fi
|
|
||||||
\def\abc{\@makeother\%\@ifnextchar[\abc@grab{\abc@grab[]}}
|
|
||||||
\define@key{abc}{name}[]{%
|
|
||||||
\if!#1!\stepcounter{abc@count}%
|
|
||||||
\edef\abc@tempfile{\normalabcoutputfile-\@arabic\c@abc@count}%
|
|
||||||
\else
|
|
||||||
\def\abc@tempfile{#1}%
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
\define@key{abc}{options}{\def\abc@opt{#1}}
|
|
||||||
\define@key{abc}{postoptions}{\def\abc@postopt{#1}}
|
|
||||||
\define@key{abc}{program}{\def\abc@cmd{#1}\let\abc@parm\@empty}
|
|
||||||
\define@key{abc}{width}{\def\abc@width{#1}}
|
|
||||||
\define@key{abc}{center}[true]{\csname abc@center#1\endcsname}
|
|
||||||
\define@key{abc}{extension}{\def\abc@ext{.#1}}
|
|
||||||
\def\abc@grab[#1]{\let\abc@width=\abcwidth
|
|
||||||
\ifabc@saveall
|
|
||||||
\setkeys{abc}{name,#1}%
|
|
||||||
\else
|
|
||||||
\setkeys{abc}{#1}%
|
|
||||||
\fi\abc@start}
|
|
||||||
\def\endabc{%
|
|
||||||
\abc@finish
|
|
||||||
\trivlist\item[]\ifabc@center\centering\fi
|
|
||||||
\IfFileExists{\abc@tempfile.\abc@finalext}
|
|
||||||
{\includegraphics[width=\abc@width]{\abc@tempfile.\abc@finalext}}%
|
|
||||||
{\global\abc@warningtrue\fbox{\abc@tempfile}%
|
|
||||||
\global\abc@unprocessedfilestrue}%
|
|
||||||
\endtrivlist
|
|
||||||
}
|
|
||||||
\def\abcinput{\@ifnextchar[\abc@grabinput{\abc@grabinput[]}}
|
|
||||||
\def\abc@grabinput[#1]#2{\let\abc@width=\abcwidth\setkeys{abc}{#1}%
|
|
||||||
\begingroup\def\abc@tempfile{#2}%
|
|
||||||
\IfFileExists{\abc@tempfile\abc@ext}
|
|
||||||
{%
|
|
||||||
\abc@process
|
|
||||||
\begin{center}
|
|
||||||
\IfFileExists{\abc@tempfile.\abc@finalext}
|
|
||||||
{\includegraphics[width=\abc@width]{\abc@tempfile.\abc@finalext}}%
|
|
||||||
{\fbox{\abc@tempfile}}%
|
|
||||||
\end{center}%
|
|
||||||
\endgroup
|
|
||||||
}
|
|
||||||
{\PackageWarning{\abc@packagename}{No file \abc@tempfile\abc@ext\space found}}%
|
|
||||||
}
|
|
||||||
\endinput
|
|
||||||
%%
|
|
||||||
%% End of file `abc.sty'.
|
|
Binary file not shown.
|
@ -1,81 +0,0 @@
|
||||||
%%
|
|
||||||
%% This is file `example.tex',
|
|
||||||
%% generated with the docstrip utility.
|
|
||||||
%%
|
|
||||||
%% The original source files were:
|
|
||||||
%%
|
|
||||||
%% abc.dtx (with options: `example')
|
|
||||||
%%
|
|
||||||
%% Copyright 2006-2016 Enrico Gregorio
|
|
||||||
%%
|
|
||||||
%% This program is provided under the terms of the
|
|
||||||
%% LaTeX Project Public License distributed from CTAN
|
|
||||||
%% archives in directory macros/latex/base/lppl.txt.
|
|
||||||
%%
|
|
||||||
%% Author: Enrico Gregorio
|
|
||||||
%% Enrico dot Gregorio at univr dot it
|
|
||||||
%%
|
|
||||||
%% This work has the LPPL maintenance status "author-maintained".
|
|
||||||
%%
|
|
||||||
\documentclass[a4paper,12pt]{article}
|
|
||||||
\usepackage[generate,ps2eps]{abc}
|
|
||||||
\usepackage{mathptmx}
|
|
||||||
|
|
||||||
\begin{document}
|
|
||||||
|
|
||||||
\title{Example of ABC Plus in \LaTeX{}}
|
|
||||||
\author{Guido Gonzato}
|
|
||||||
\date{}
|
|
||||||
\maketitle
|
|
||||||
|
|
||||||
This is a short piece.
|
|
||||||
|
|
||||||
\medskip
|
|
||||||
|
|
||||||
\begin{abc}
|
|
||||||
X:4
|
|
||||||
T:Cronin's Hornpipe
|
|
||||||
R:hornpipe
|
|
||||||
S:Keenan and Glackin
|
|
||||||
E:7
|
|
||||||
M:C|
|
|
||||||
L:1/8
|
|
||||||
K:G
|
|
||||||
BA|GABc dBde|gage dega|bage dBGB|cABG A2BA|!
|
|
||||||
GABc dBde|gage dega|bage dBAB|G2G2 G2:|!
|
|
||||||
fg|afd^c d2ga|bged e2ga|(3bag (3agf gedB|(3cBA AG AcBA|!
|
|
||||||
GABc dBde|~g3e dega|bage dBAB|G2G2 G2:|!
|
|
||||||
\end{abc}
|
|
||||||
|
|
||||||
\medskip
|
|
||||||
|
|
||||||
This is another short piece, but we would like to keep the
|
|
||||||
ABC source in our directory.
|
|
||||||
|
|
||||||
\begin{abc}[name=jacky]
|
|
||||||
X:9
|
|
||||||
T:Jacky Tar
|
|
||||||
R:hornpipe
|
|
||||||
M:4/4
|
|
||||||
L:1/8
|
|
||||||
K:Edor
|
|
||||||
(Bd) | "Em" e2 ed efge | "G" d2 B2 B2 (dB) | "D" ABde faef | d2 A2 A2 (Bd) |
|
|
||||||
"Em" e2 ef g2 fe | "G" dB GB d2 (cB) | "D" AGFE DEFA | "Em" G2 E2 E2 :|
|
|
||||||
(GA) | "Em" BGEG BGEG | BAGF E2 (FG) | "D" BGEG BGEG | AGFE D2 (EF) |
|
|
||||||
"G" GFGB g2 (fe) | dBGB d2 (cB) | "D" AGFE DEFA | "Em" G2 E2 E2 :|
|
|
||||||
\end{abc}
|
|
||||||
|
|
||||||
\clearpage
|
|
||||||
|
|
||||||
And, finally, we want to set also the last piece; its ABC code
|
|
||||||
is already in our directory.
|
|
||||||
|
|
||||||
\medskip
|
|
||||||
|
|
||||||
\abcinput{poll}
|
|
||||||
|
|
||||||
\end{document}
|
|
||||||
|
|
||||||
\endinput
|
|
||||||
%%
|
|
||||||
%% End of file `example.tex'.
|
|
27
abc/mup.sty
27
abc/mup.sty
|
@ -1,27 +0,0 @@
|
||||||
%%
|
|
||||||
%% This is file `mup.sty',
|
|
||||||
%% generated with the docstrip utility.
|
|
||||||
%%
|
|
||||||
%% The original source files were:
|
|
||||||
%%
|
|
||||||
%% abc.dtx (with options: `package-mup')
|
|
||||||
%%
|
|
||||||
%% Copyright 2006-2016 Enrico Gregorio
|
|
||||||
%%
|
|
||||||
%% This program is provided under the terms of the
|
|
||||||
%% LaTeX Project Public License distributed from CTAN
|
|
||||||
%% archives in directory macros/latex/base/lppl.txt.
|
|
||||||
%%
|
|
||||||
%% Author: Enrico Gregorio
|
|
||||||
%% Enrico dot Gregorio at univr dot it
|
|
||||||
%%
|
|
||||||
%% This work has the LPPL maintenance status "author-maintained".
|
|
||||||
%%
|
|
||||||
|
|
||||||
\ProvidesPackage{mup}
|
|
||||||
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{abc}}
|
|
||||||
\ProcessOptions\relax
|
|
||||||
\RequirePackage[mup]{abc}
|
|
||||||
\endinput
|
|
||||||
%%
|
|
||||||
%% End of file `mup.sty'.
|
|
|
@ -1,76 +0,0 @@
|
||||||
%%
|
|
||||||
%% This is file `mupexa.tex',
|
|
||||||
%% generated with the docstrip utility.
|
|
||||||
%%
|
|
||||||
%% The original source files were:
|
|
||||||
%%
|
|
||||||
%% abc.dtx (with options: `example-mup')
|
|
||||||
%%
|
|
||||||
%% Copyright 2006-2016 Enrico Gregorio
|
|
||||||
%%
|
|
||||||
%% This program is provided under the terms of the
|
|
||||||
%% LaTeX Project Public License distributed from CTAN
|
|
||||||
%% archives in directory macros/latex/base/lppl.txt.
|
|
||||||
%%
|
|
||||||
%% Author: Enrico Gregorio
|
|
||||||
%% Enrico dot Gregorio at univr dot it
|
|
||||||
%%
|
|
||||||
%% This work has the LPPL maintenance status "author-maintained".
|
|
||||||
%%
|
|
||||||
|
|
||||||
\documentclass[a4paper,12pt]{article}
|
|
||||||
\usepackage[generate,ps2eps]{mup}
|
|
||||||
\usepackage{mathptmx}
|
|
||||||
|
|
||||||
\begin{document}
|
|
||||||
|
|
||||||
\title{Example of MUP in \LaTeX{}}
|
|
||||||
\author{Martin Tarenskeen}
|
|
||||||
\date{}
|
|
||||||
\maketitle
|
|
||||||
|
|
||||||
This is a short piece.
|
|
||||||
|
|
||||||
\medskip
|
|
||||||
|
|
||||||
\begin{mup}
|
|
||||||
1: a-;b-;c;d;
|
|
||||||
bar
|
|
||||||
1: e;f;g;a;
|
|
||||||
endbar
|
|
||||||
\end{mup}
|
|
||||||
|
|
||||||
\medskip
|
|
||||||
|
|
||||||
This is another short piece, but we would like to keep the
|
|
||||||
MUP source in our directory.
|
|
||||||
|
|
||||||
\begin{mup}[name=mymup]
|
|
||||||
score
|
|
||||||
staffs=2
|
|
||||||
time=6/8
|
|
||||||
beamstyle=4.,4.
|
|
||||||
|
|
||||||
staff 2
|
|
||||||
clef=bass
|
|
||||||
|
|
||||||
music
|
|
||||||
1: 8c;d;e;f;g;a;
|
|
||||||
2: 4.ceg;cfa;
|
|
||||||
repeatend
|
|
||||||
|
|
||||||
\end{mup}
|
|
||||||
|
|
||||||
\clearpage
|
|
||||||
|
|
||||||
And finally, we want to set also the last piece; its MUP code
|
|
||||||
is already in our directory.
|
|
||||||
|
|
||||||
\medskip
|
|
||||||
|
|
||||||
\mupinput{simple}
|
|
||||||
|
|
||||||
\end{document}
|
|
||||||
\endinput
|
|
||||||
%%
|
|
||||||
%% End of file `mupexa.tex'.
|
|
16
abc/poll.abc
16
abc/poll.abc
|
@ -1,16 +0,0 @@
|
||||||
X:12
|
|
||||||
T:Poll Ha'penny
|
|
||||||
T:Garra\'i na bhF\'eile\'og
|
|
||||||
R:hornpipe
|
|
||||||
H:The Irish title means "The Garden of Honeysuckles"
|
|
||||||
D:Mary Bergin: Feadoga Stain
|
|
||||||
D:Noel Hill agus Tony McMahon: I gCnoc na Grai
|
|
||||||
Z:id:hn-hornpipe-26
|
|
||||||
M:C|
|
|
||||||
L:1/8
|
|
||||||
K:Amix
|
|
||||||
(3GAB | =cAAG A2 (3AB=c | (3d=cB (3AGF G2 (3B^cd | ed^cA d^cAG | ~A3 G A2 de |
|
|
||||||
~f3 d ~e3 c | d2 (3Bcd efge | aged (3=cBA GB | ~A3 G A2:|
|
|
||||||
|: ef | ~g3 f gfef | g2 ga gedg | eaag a3 g | eaag a2 ag |
|
|
||||||
~f3 d ~e3 c | d2 (3Bcd efge | aged (3=cBA GB | ~A3 G A2 :|
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
|
|
||||||
score
|
|
||||||
staffs=2
|
|
||||||
time=6/8
|
|
||||||
beamstyle=4.,4.
|
|
||||||
|
|
||||||
staff 2
|
|
||||||
clef=bass
|
|
||||||
|
|
||||||
music
|
|
||||||
1: 8c;d;e;f;g;a;
|
|
||||||
2: 4.ceg;cfa;
|
|
||||||
repeatend
|
|
BIN
aufgabe2.xopp
BIN
aufgabe2.xopp
Binary file not shown.
82
code/akkorde.py
Normal file
82
code/akkorde.py
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
import numpy as np
|
||||||
|
from matplotlib import pyplot as plt
|
||||||
|
from scipy.fft import fft, ifft
|
||||||
|
from IPython.display import Audio, display
|
||||||
|
from scipy.io import wavfile
|
||||||
|
from ipywidgets import widgets
|
||||||
|
from functools import partial
|
||||||
|
import pandas as pd
|
||||||
|
from fractions import Fraction
|
||||||
|
|
||||||
|
def create_signal(frequency, amplitude, delay, phase=0, sampling=44100, seconds=1.0):
|
||||||
|
timesteps = np.linspace(0,seconds, int(seconds * sampling))
|
||||||
|
# return np.sum(amplitude * np.sin(frequency * 2*np.pi * (timesteps[:, np.newaxis]-delay)*(timesteps[:, np.newaxis]-delay > 0)), axis=1), timesteps
|
||||||
|
return np.sum(amplitude * triangle(frequency, (timesteps[:, np.newaxis]-delay)*(timesteps[:, np.newaxis]-delay > 0)), axis=1), timesteps
|
||||||
|
|
||||||
|
def create_waves(frequency, amplitude, phase=0, sampling=44100, seconds=1.0):
|
||||||
|
timesteps = np.linspace(0,seconds, int(seconds * sampling))
|
||||||
|
# return amplitude * np.sin(frequency * 2*np.pi * timesteps[:, np.newaxis]), timesteps
|
||||||
|
return amplitude * triangle(frequency, timesteps[:, np.newaxis]), timesteps
|
||||||
|
|
||||||
|
def triangle(frequency, t):
|
||||||
|
phase = (t * frequency + 0.25) % 1 - 0.25
|
||||||
|
return (phase <= 0.25) * phase + (phase > 0.25) * (0.5 - phase)
|
||||||
|
|
||||||
|
def nonlinearity(x, param=1.0): # param for scaling of argument; higher values = more nonlinearity
|
||||||
|
#return np.exp(x*param)
|
||||||
|
return np.sign(x)*np.log(1+np.abs(x*param))
|
||||||
|
|
||||||
|
def myAudio(signal, rate=44100, autoplay=False, time_fade=0.2):
|
||||||
|
length = signal.shape[0]
|
||||||
|
print(length)
|
||||||
|
fade = np.minimum(np.ones(length),np.arange(length)/(time_fade * rate))
|
||||||
|
return Audio(signal * fade * fade[::-1],rate=rate,autoplay=autoplay)
|
||||||
|
|
||||||
|
#frequency = np.array([100., 200., 300, 400])
|
||||||
|
|
||||||
|
#frequency_edo12 = 220 * 2**(np.array([5,8,12,14])/12)
|
||||||
|
#frequency_edo53 = 220 * 2**(np.array([22,36,53,62])/53)
|
||||||
|
#frequency_edo53 = 220 * 2**(np.array([22,34,53,61])/53)
|
||||||
|
#frequency_rein1 = 220 * 4/3 * np.array([1, 7/6, 9/6, 10/6])
|
||||||
|
#frequency_rein2 = 220 * 4/3 * np.array([1, 12/10, 15/10, 17/10])
|
||||||
|
dursept_edo12 = 220 * 2**(np.array([5,9,12,15])/12) # Durseptakkord in EDO12
|
||||||
|
dursept_edo53 = 220 * 2**(np.array([22,39,53,65])/53) # Dursept in EDO53
|
||||||
|
dursept_rein = 220 * 4/3 * np.array([1, 5/4, 6/4, 7/4]) # Dursept rein
|
||||||
|
mollsept_edo12 = 220 * 2**(np.array([5,8,12,14])/12) # Mollseptakkord in EDO12
|
||||||
|
mollsept_edo53 = 220 * 2**(np.array([22,36,53,63])/53) # Mollseptakkord in EDO53
|
||||||
|
mollsept_rein = 220 * 4/3 * np.array([1, 12/10, 15/10, 17/10]) # Mollsept rein
|
||||||
|
doppeltritone_rein = 220 * 4/3 * np.array([1, 12/10, 14/10, 17/10]) # doppeltritone rein
|
||||||
|
doppeltritone_edo53 = 220 * 2**(np.array([22,36,48,63])/53) # doppeltritone in EDO53
|
||||||
|
|
||||||
|
amplitude = np.array([1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0])
|
||||||
|
delay = np.array([0.0,0.2,0.4,0.6,0.8,1.0,1.2])
|
||||||
|
|
||||||
|
# list of chords to display.
|
||||||
|
# chords = [dursept_edo12, dursept_edo53, dursept_rein, ]
|
||||||
|
# chords = [mollsept_edo12, mollsept_edo53, mollsept_rein, ]
|
||||||
|
chords = [doppeltritone_rein, doppeltritone_edo53, ]
|
||||||
|
|
||||||
|
to_display = []
|
||||||
|
for chord in chords:
|
||||||
|
notes = len(chord)
|
||||||
|
signal, timesteps = create_signal(frequency=chord, amplitude=amplitude[:notes], delay=delay[:notes], phase=0, sampling=44100, seconds=5.0)
|
||||||
|
to_display.append(signal)
|
||||||
|
|
||||||
|
max_play_time = 2.0
|
||||||
|
for signal in to_display:
|
||||||
|
display(myAudio(signal[timesteps < max_play_time],rate=44100, autoplay=False))
|
||||||
|
|
||||||
|
plot_time = 1.0
|
||||||
|
|
||||||
|
plt.figure(1, figsize=(20,6))
|
||||||
|
plt.xlabel("time [s]")
|
||||||
|
for signal in to_display:
|
||||||
|
plt.plot(timesteps[timesteps < plot_time], (1*signal[timesteps < plot_time]))
|
||||||
|
|
||||||
|
plt.figure(2, figsize=(40,6))
|
||||||
|
plt.subplot(111, xscale='log', yscale='log')
|
||||||
|
plt.xlabel("Frequenz [Hz]")
|
||||||
|
plt.xlim(200,5000)
|
||||||
|
plt.ylim(bottom=1e-1, top=1e4)
|
||||||
|
for signal in to_display:
|
||||||
|
plt.plot(np.abs(fft(nonlinearity(signal[timesteps > 1.0], 0.1))))
|
|
@ -72,7 +72,7 @@
|
||||||
TODO: Noten f c es?
|
TODO: Noten f c es?
|
||||||
|
|
||||||
|
|
||||||
$F_{3\!\!\!/}^7$
|
$F_{\cancel{3}}^7$
|
||||||
\end{example}
|
\end{example}
|
||||||
|
|
||||||
\begin{example}
|
\begin{example}
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
Der Akkord $5:6:7$ wird als \vocab{verminderter Akkord} bezeichnet.
|
Der Akkord $5:6:7$ wird als \vocab{verminderter Akkord} bezeichnet.
|
||||||
|
|
||||||
TODO: Noten a c es?
|
TODO: Noten a c es?
|
||||||
$F\!\!\!\!/^7$
|
$\cancel{F}^7$
|
||||||
|
|
||||||
\end{example}
|
\end{example}
|
||||||
|
|
||||||
|
@ -147,15 +147,15 @@
|
||||||
|
|
||||||
TODO: Noten e g h cis
|
TODO: Noten e g h cis
|
||||||
|
|
||||||
$C\!\!\!\!/\,\,\,^{\text{maj}7,>8}$
|
$\cancel{C}^{\text{maj}7,>8}$
|
||||||
|
|
||||||
$12 : 17$ ist ein Tritonus (etwas größer als $\sqrt{2} $).
|
$12 : 17$ ist ein Tritonus (etwas größer als $\sqrt{2} $).
|
||||||
|
|
||||||
|
|
||||||
Mit Oktavreduktion\footnote{Es handelt sich nicht wirklich um Oktavreduktion, das Verhältnis ändert sich. ($10 : 12 : 15 : 17 \neq 6: 7 : 9 : 10 (A\!\!\!/\,\,^{7,9}/E$)} lässt sich der Akkord umschreiben zu
|
Mit Oktavreduktion\footnote{Es handelt sich nicht wirklich um Oktavreduktion, das Verhältnis ändert sich. ($10 : 12 : 15 : 17 \neq 6: 7 : 9 : 10 (\cancel{A}^{7,9}/E$)} lässt sich der Akkord umschreiben zu
|
||||||
|
|
||||||
TODO: Noten cis e g h
|
TODO: Noten cis e g h
|
||||||
($5:6:7:9$, $A\!\!\!/^{7,9}$, kein Sixte ajout\'ee)
|
($5:6:7:9$, $\cancel{A}^{7,9}$, kein Sixte ajout\'ee)
|
||||||
|
|
||||||
|
|
||||||
\end{example}
|
\end{example}
|
||||||
|
@ -165,15 +165,13 @@
|
||||||
\end{question}
|
\end{question}
|
||||||
|
|
||||||
|
|
||||||
\todo{Jupyter Notebook (Appendix?)}
|
|
||||||
|
|
||||||
\paragraph{Exkurs: Kirchenglocken}
|
\paragraph{Exkurs: Kirchenglocken}
|
||||||
Es ist Sonntag, daher läuten gerade Kirchenglocken. Hier kann man den \vocab{Dopplereffekt} hören.
|
Es ist Sonntag, daher läuten gerade Kirchenglocken. Hier kann man den \vocab{Dopplereffekt} hören.
|
||||||
|
|
||||||
|
|
||||||
\begin{remark}
|
\begin{remark}
|
||||||
Diese Sichtweise ist stark geprägt von Akkorden. Wenn man Melodien intoniert, so kommt man teilweise zu gegensätzlichen Ergebnissen. Auf der Geige ist beispielsweise ein $g\sharp$ höher als $a\flat$.
|
Unsere Sichtweise ist stark geprägt von Akkorden. Wenn man Melodien intoniert, so kommt man teilweise zu gegensätzlichen Ergebnissen. Auf der Geige wird beispielsweise ein $g\sharp$ oft höher gespielt als ein $a\flat$.
|
||||||
|
|
||||||
Siehe auch ``How equal temperament ruined harmony'' S. 47 und 78.
|
Siehe auch ``How equal temperament ruined harmony'' S. 47 und 78.
|
||||||
\end{remark}
|
\end{remark}
|
||||||
|
|
||||||
|
@ -197,7 +195,7 @@ TODO: c-Dur Tonleiter mit reinen Dur-Akkorden
|
||||||
\label{cdurrein}
|
\label{cdurrein}
|
||||||
\end{table}
|
\end{table}
|
||||||
|
|
||||||
Bei Einteilung eines Ganztones ist großen und kleinen Halbton ergeben sich als Schritte $9+8+5+9+8+9+5= 53$.
|
Bei Einteilung eines Ganztons ist großen und kleinen Halbton ergeben sich als Schritte $9+8+5+9+8+9+5= 53$.
|
||||||
|
|
||||||
\todo{EDO12 Tonleiter vs Tonleiter mit reinen Akkorden ausprobieren}
|
\todo{EDO12 Tonleiter vs Tonleiter mit reinen Akkorden ausprobieren}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1 @@
|
||||||
\begin{listing}
|
\lstinputlisting[language=Python]{code/akkorde.py}
|
||||||
TODO: Code einfügen
|
|
||||||
\end{listing}
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
\begin{table} %[htpb]
|
\begin{table}[htpb]
|
||||||
\centering
|
\centering
|
||||||
\caption{Obertöne}
|
\caption{Obertöne}
|
||||||
\label{tab:obertoene}
|
\label{tab:obertoene}
|
||||||
|
@ -57,9 +57,9 @@
|
||||||
\begin{observe}
|
\begin{observe}
|
||||||
$\frac{9}{8} = \frac{10}{9}$ ???
|
$\frac{9}{8} = \frac{10}{9}$ ???
|
||||||
\end{observe}
|
\end{observe}
|
||||||
Es ergeben sich außerdem
|
Es ergeben sich außerdem:
|
||||||
|
|
||||||
\begin{table} %[htpb]
|
\begin{table}[htpb]
|
||||||
\centering
|
\centering
|
||||||
\caption{Intervalle}
|
\caption{Intervalle}
|
||||||
\label{tab:intervale}
|
\label{tab:intervale}
|
||||||
|
@ -107,7 +107,7 @@ Um kleinere Tonabstände beschreiben zu können definieren wir ferner:
|
||||||
\end{definition}
|
\end{definition}
|
||||||
|
|
||||||
\begin{remark}
|
\begin{remark}
|
||||||
Ein Unterschied von $10ct.$ ist hörbar, im direkten Vergelcih konnten wir im Kurs auch Unterschiede von $3ct.$ hören.
|
Ein Unterschied von $10ct.$ ist hörbar, im direkten Vergleich konnten wir im Kurs auch Unterschiede von $3ct.$ hören.
|
||||||
\url{https://sevish.com/scaleworkshop/}
|
\url{https://sevish.com/scaleworkshop/}
|
||||||
\end{remark}
|
\end{remark}
|
||||||
|
|
||||||
|
@ -116,24 +116,19 @@ Um kleinere Tonabstände beschreiben zu können definieren wir ferner:
|
||||||
|
|
||||||
|
|
||||||
\begin{definition}[Dur]
|
\begin{definition}[Dur]
|
||||||
\vocab{Dur} bezeichnet sowohl eine Tonart, als auch den Akkord, der sich aus den Tönen der 1., 3. und 5. Stufe dieser Tonart ergibt.
|
\vocab{Dur} bezeichnet sowohl eine Tonart, als auch den Akkord, der sich aus den Tönen der 1., 3.~und 5. Stufe dieser Tonart ergibt.
|
||||||
%\begin{abc}[name=c-dur]
|
|
||||||
% X: 1 % start of header
|
|
||||||
% K: C % scale: C major
|
|
||||||
% "Text"c2 G4 | (3FED c4 G2 |
|
|
||||||
%\end{abc}
|
|
||||||
|
|
||||||
|
|
||||||
[todo]: C-Dur-Tonleiter
|
TODO: C-Dur-Tonleiter
|
||||||
|
|
||||||
Ein Dur-Akkord besteht aus einer großen und einer kleinen Terz, d.h. die Töne haben Frequenzverhältnisse von $1, \frac{5}{4}, \frac{5}{4} \cdot \frac{6}{5} = \frac{6}{4}$.
|
Ein Dur-Akkord besteht aus einer großen und einer kleinen Terz, d.h.~die Töne haben Frequenzverhältnisse von $1, \frac{5}{4}, \frac{5}{4} \cdot \frac{6}{5} = \frac{6}{4}$.
|
||||||
\end{definition}
|
\end{definition}
|
||||||
|
|
||||||
\begin{definition}[Moll]
|
\begin{definition}[Moll]
|
||||||
|
|
||||||
[todo]: C-Moll-Tonleiter
|
TODO: C-Moll-Tonleiter
|
||||||
|
|
||||||
Ein Moll-Akkord besteht aus einer kleinen und einer großen Terz, d.h. die Töne haben Frequenzverhältnisse von $1, \frac{6}{5}, \frac{3}{2}$.
|
Ein Moll-Akkord besteht aus einer kleinen und einer großen Terz, d.h.~die Töne haben Frequenzverhältnisse von $1, \frac{6}{5}, \frac{3}{2}$.
|
||||||
\end{definition}
|
\end{definition}
|
||||||
|
|
||||||
\begin{definition}[Septakkord]
|
\begin{definition}[Septakkord]
|
||||||
|
@ -146,7 +141,7 @@ Ein Moll-Akkord besteht aus einer kleinen und einer großen Terz, d.h. die Töne
|
||||||
Wir suchen ein \vocab{equal temperament} / eine \vocab{gleichstufige Stimmung}, die die wichtigsten Intervalle möglichst gut approximiert.
|
Wir suchen ein \vocab{equal temperament} / eine \vocab{gleichstufige Stimmung}, die die wichtigsten Intervalle möglichst gut approximiert.
|
||||||
\end{problem}
|
\end{problem}
|
||||||
|
|
||||||
Die ``Wichtigkeit'' eines Intervalls definieren wir dabei über die Größe des Nenners, d.h. die Intervalle sind in absteigender Wichtigkeit: Oktave, Quinte, Quarte, gr. Terz, \dots
|
Die ``Wichtigkeit'' eines Intervalls definieren wir dabei über die Größe des Nenners, d.h.~die Intervalle sind in absteigender Wichtigkeit: Oktave, Quinte, Quarte, gr. Terz, \dots
|
||||||
|
|
||||||
Falls sowohl Oktaven als auch Quinten übereinstimmen sollen, bräuchten wir $a,b \in \N_{>0}$, so dass $2^a = \left( \frac{3}{2} \right)^b$. Solche existieren offenbar nicht.
|
Falls sowohl Oktaven als auch Quinten übereinstimmen sollen, bräuchten wir $a,b \in \N_{>0}$, so dass $2^a = \left( \frac{3}{2} \right)^b$. Solche existieren offenbar nicht.
|
||||||
|
|
||||||
|
@ -225,7 +220,7 @@ Das optimiert zunächst nur Oktaven und Quinten. Da Quarten der Rest einer Quint
|
||||||
|
|
||||||
Videos zu EDO53: \url{https://www.youtube.com/watch?v=ILcgB_kOWzM}, \url{https://www.youtube.com/watch?v=xVZy9GUeMqY}
|
Videos zu EDO53: \url{https://www.youtube.com/watch?v=ILcgB_kOWzM}, \url{https://www.youtube.com/watch?v=xVZy9GUeMqY}
|
||||||
|
|
||||||
Eine große Terz lässt sich durch Quinten erreichen, indem man 4 quinten nach oben und 2 Oktaven nach unten geht. Als Frequenzverhältnis ergibt sich dann $\left( \frac{3}{2} \right)^4 \cdot \frac{1}{2^2} = \frac{81}{64}$. Die Abweichung $\frac{81}{80}$ zum Frequenzverhältnis $\frac{5}{4}$ wird als \vocab{syntonisches Komma} bezeichnet ($21,5ct.$).
|
Eine große Terz lässt sich durch Quinten erreichen, indem man 4 Quinten nach oben und 2 Oktaven nach unten geht. Als Frequenzverhältnis ergibt sich dann $\left( \frac{3}{2} \right)^4 \cdot \frac{1}{2^2} = \frac{81}{64}$. Die Abweichung $\frac{81}{80}$ zum Frequenzverhältnis $\frac{5}{4}$ wird als \vocab{syntonisches Komma} bezeichnet ($21,5ct.$).
|
||||||
In EDO53 entspricht ein Tonschritt ($22,6ct.$ ) in etwa dem syntonischen Komma.
|
In EDO53 entspricht ein Tonschritt ($22,6ct.$ ) in etwa dem syntonischen Komma.
|
||||||
|
|
||||||
\begin{remark}[Bohlen-Pierce-Skala]
|
\begin{remark}[Bohlen-Pierce-Skala]
|
||||||
|
@ -283,11 +278,11 @@ In EDO53 entspricht ein Tonschritt ($22,6ct.$ ) in etwa dem syntonischen Komma.
|
||||||
\end{table}
|
\end{table}
|
||||||
|
|
||||||
\begin{observe}
|
\begin{observe}
|
||||||
Wenn zwei Töne aus einem Intervall mit rationalem Verhältnis zusamen klingen, fallen viele der Freqeunzen aus dem Obertonspektrum zusammen.
|
Wenn zwei Töne aus einem Intervall mit rationalem Verhältnis zusammen klingen, fallen viele der Frequenzen aus dem Obertonspektrum zusammen.
|
||||||
\end{observe}
|
\end{observe}
|
||||||
\todo{Bild dazu}
|
\todo{Bild dazu}
|
||||||
|
|
||||||
\paragraph{Erklärungsversuch} Bei Tönen, die nicht in einem rationalen Verhöltnis stehen, werden Schwebungen im Obertonspektrum wahrgenommen und sorgen dafür, dass diese Intervalle nicht gut klingen.
|
\paragraph{Erklärungsversuch} Bei Tönen, die nicht in einem rationalen Verhältnis stehen, werden Schwebungen im Obertonspektrum wahrgenommen und sorgen dafür, dass diese Intervalle nicht gut klingen.
|
||||||
Die Erklärung ist falsch: Auch bei reinen Sinustönen klingen rationale Intervalle besser als andere, jedoch haben diese kein Obertonspektrum. Ferner sind die Schwebungen vermutlich nicht wahrnehmbar.
|
Die Erklärung ist falsch: Auch bei reinen Sinustönen klingen rationale Intervalle besser als andere, jedoch haben diese kein Obertonspektrum. Ferner sind die Schwebungen vermutlich nicht wahrnehmbar.
|
||||||
|
|
||||||
\subsection{Nichtlineare Effekte}
|
\subsection{Nichtlineare Effekte}
|
||||||
|
@ -311,7 +306,7 @@ Welche nichtlinearen Effekte können auftreten?
|
||||||
\item Instabilität (1)
|
\item Instabilität (1)
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
Für die Erklärung der Wahrnehmung von rationalen Intervallen scheinen Däpfung und Instabilität nicht wichtig zu sein, denn die Intervalle klingen auch für reine Sinustöne gut.
|
Für die Erklärung der Wahrnehmung von rationalen Intervallen scheinen Dämpfung und Instabilität nicht wichtig zu sein, denn die Intervalle klingen auch für reine Sinustöne gut.
|
||||||
|
|
||||||
\subsubsection{Ohr}
|
\subsubsection{Ohr}
|
||||||
|
|
||||||
|
@ -329,7 +324,7 @@ Sei $g(x) = c_0 + c_1x+ c_2x^2 + \ldots$.
|
||||||
Es ergibt sich für den quadratischen Term:
|
Es ergibt sich für den quadratischen Term:
|
||||||
\begin{IEEEeqnarray*}{rCl}
|
\begin{IEEEeqnarray*}{rCl}
|
||||||
(\sin \alpha t + \sin \beta t)^2 &=& (\sin \alpha t)^2 + 2 \sin \alpha t \sin \beta t + (\sin \beta t)^2\\
|
(\sin \alpha t + \sin \beta t)^2 &=& (\sin \alpha t)^2 + 2 \sin \alpha t \sin \beta t + (\sin \beta t)^2\\
|
||||||
&\overset{?}{=}& \frac{1}{2} - \frac{1}{2} \cos 2 \alpha t + \cos(\alpha t - \beta t) \cos (\alpha t + \beta t)
|
&=& \frac{1}{2} - \frac{1}{2} \cos 2 \alpha t + \cos(\alpha t - \beta t) \cos (\alpha t + \beta t)
|
||||||
+ \frac{1}{2} - \frac{1}{2} \cos 2 \beta t\\
|
+ \frac{1}{2} - \frac{1}{2} \cos 2 \beta t\\
|
||||||
\end{IEEEeqnarray*}
|
\end{IEEEeqnarray*}
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,20 @@
|
||||||
\begin{definition}[Tonvorrat]
|
\section{Modulationen}
|
||||||
|
\begin{definition}[Tonvorrat]
|
||||||
Ein \vocab{Tonvorrat} ist eine Menge von $n$ Tönen pro Oktave, welche ungefähr gleichmäßig verteilt sind.
|
Ein \vocab{Tonvorrat} ist eine Menge von $n$ Tönen pro Oktave, welche ungefähr gleichmäßig verteilt sind.
|
||||||
\end{definition}
|
\end{definition}
|
||||||
|
|
||||||
\begin{definition}
|
\begin{definition}
|
||||||
Wir definieren eine Metrik auf der Menge der Tonvorräte, wobei $\text{dist}(T, T')$ die minimale Anzahl an Halbtonschritten sei, die geändert werden müssen, um von $T$ zu $T'$ zu gelangen.
|
Wir definieren eine Metrik auf der Menge der Tonvorräte, wobei $\text{dist}(T, T')$ die minimale Anzahl an Halbtonschritten sei, die geändert werden müssen, um von $T$ zu $T'$ zu gelangen.
|
||||||
\end{definition}
|
\end{definition}
|
||||||
|
|
||||||
|
|
||||||
\begin{definition}
|
\begin{definition}
|
||||||
Eine \vocab{Modulation} ist ein Wechsel c$\sharp$\footnote{Enharmonisch auch als $d\flat$ bekannt} Tonvorrates, der nicht auf komplett absurde Weise geschieht. (``lokal sinnvoll'', einzelne Töne werden minimal verändert)
|
Eine \vocab{Modulation} ist ein Wechsel c$\sharp$ %des
|
||||||
|
Tonvorrates, der nicht auf komplett absurde Weise geschieht. (``lokal sinnvoll'', einzelne Töne werden minimal verändert)
|
||||||
\end{definition}
|
\end{definition}
|
||||||
|
|
||||||
Tonvorräte:
|
Tonvorräte:
|
||||||
|
\todo{In Tabelle überführen}
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item $n=2$ :
|
\item $n=2$ :
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
|
@ -91,6 +94,7 @@
|
||||||
\end{definition}
|
\end{definition}
|
||||||
|
|
||||||
Leitton (Auflösung kl. Halbton nach oben)
|
Leitton (Auflösung kl. Halbton nach oben)
|
||||||
|
\todo{In Tabelle überführen}
|
||||||
|
|
||||||
|
|
||||||
c g b d $\frac{8}{3}, 4, 5, 6$ bzw. $8, 12, 15, 18$. Die Erinnerung an den Grundton $c$ macht den Akkord instabil.
|
c g b d $\frac{8}{3}, 4, 5, 6$ bzw. $8, 12, 15, 18$. Die Erinnerung an den Grundton $c$ macht den Akkord instabil.
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
& \text{Schall}\arrow{d}{} \\
|
& \text{Schall}\arrow{d}{} \\
|
||||||
\text{Empfindung} \arrow{uu}{\text{komponieren}} & \text{Ohr}\arrow{l}{}
|
\text{Empfindung} \arrow{uu}{\text{komponieren}} & \text{Ohr}\arrow{l}{}
|
||||||
\end{tikzcd}
|
\end{tikzcd}
|
||||||
|
\caption{Musik}
|
||||||
\label{musikkomdiag}
|
\label{musikkomdiag}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
|
@ -38,19 +39,18 @@
|
||||||
\item generiert falsifizierbare Hypothesen
|
\item generiert falsifizierbare Hypothesen
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
Mathematik:
|
In der Mathematik:
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item Axiome
|
\item Axiome
|
||||||
\item Folgerungen
|
\item Folgerungen
|
||||||
\item (Konventionen)
|
\item (Konventionen)
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
Naturwissenschaften:
|
In den Naturwissenschaften:
|
||||||
|
|
||||||
Eine Theorie sollte auf einfachen Annahmen beruhen und daraus Vorhersagen über die Realität ermöglichen.
|
Eine Theorie sollte auf einfachen Annahmen beruhen und daraus Vorhersagen über die Realität ermöglichen.
|
||||||
|
|
||||||
\paragraph{Musiktheorie}
|
\paragraph{Musiktheorie}
|
||||||
|
|
||||||
Wunsch
|
Wunsch
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item Allgemein gültige Theorie (erklärt alle Musikstücke)
|
\item Allgemein gültige Theorie (erklärt alle Musikstücke)
|
||||||
|
@ -133,12 +133,9 @@ Einige Aspekte werden in klassischer Musiktheorie nicht behandelt:
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
|
|
||||||
Wir wollen im Folgenden Musiktheorie aus Mathematik und möglichst einfachen Axiomen aufzubauen.
|
Wir wollen im Folgenden Musiktheorie aus Mathematik und möglichst einfachen Axiomen aufbauen.
|
||||||
|
|
||||||
|
|
||||||
\begin{notation}
|
\begin{notation}
|
||||||
$B\flat \coloneqq B$
|
Wir verwenden die angelsächsische Konvention, den Ton $H$ (Ganzton über $A$) als $B$ und den Ton $B$ (Halbton über $A$) als $B\flat$ zu bezeichnen.
|
||||||
|
|
||||||
$B \coloneqq H$
|
|
||||||
|
|
||||||
\end{notation}
|
\end{notation}
|
||||||
|
|
BIN
lilypond/cgc.pdf
BIN
lilypond/cgc.pdf
Binary file not shown.
BIN
musiktheorie.pdf
Normal file
BIN
musiktheorie.pdf
Normal file
Binary file not shown.
|
@ -11,3 +11,29 @@
|
||||||
\RequirePackage{todonotes}
|
\RequirePackage{todonotes}
|
||||||
\RequirePackage{listing}
|
\RequirePackage{listing}
|
||||||
\RequirePackage{wasysym}
|
\RequirePackage{wasysym}
|
||||||
|
\RequirePackage{cancel}
|
||||||
|
\RequirePackage{listings}
|
||||||
|
|
||||||
|
\definecolor{KeywordColor}{cmyk}{0.64,0,0.95,0.40} %TODO
|
||||||
|
\definecolor{mGray}{rgb}{0.5,0.5,0.5}
|
||||||
|
\definecolor{mOrange}{rgb}{0.9,0.53,0.35}
|
||||||
|
|
||||||
|
\lstset{
|
||||||
|
language=Python, % Code langugage
|
||||||
|
basicstyle=\ttfamily, % Code font, Examples: \footnotesize, \ttfamily
|
||||||
|
keywordstyle=\color{KeywordColor}, % Keywords font ('*' = uppercase)
|
||||||
|
commentstyle=\color{mGray}, % Comments font
|
||||||
|
numberstyle=\tiny\color{mGray},
|
||||||
|
stepnumber=1, % Step between two line-numbers
|
||||||
|
numbersep=5pt, % How far are line-numbers from code
|
||||||
|
frame=none, % A frame around the code
|
||||||
|
tabsize=2, % Default tab size
|
||||||
|
captionpos=b, % Caption-position = bottom
|
||||||
|
breaklines=true, % Automatic line breaking?
|
||||||
|
breakatwhitespace=false, % Automatic breaks only at whitespace?
|
||||||
|
showspaces=false, % Dont make spaces visible
|
||||||
|
showtabs=false, % Dont make tabls visible
|
||||||
|
columns=flexible, % Column format
|
||||||
|
stringstyle=\color{mOrange},
|
||||||
|
escapeinside={/*!}{!*/},
|
||||||
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
\input{inputs/modulation.tex}
|
\input{inputs/modulation.tex}
|
||||||
|
|
||||||
|
|
||||||
\section{Appendix}
|
\section*{Appendix}
|
||||||
\input{inputs/appendix.tex}
|
\input{inputs/appendix.tex}
|
||||||
|
|
||||||
\cleardoublepage
|
\cleardoublepage
|
||||||
|
|
BIN
xournal/aufgabe2.xopp
Normal file
BIN
xournal/aufgabe2.xopp
Normal file
Binary file not shown.
Loading…
Reference in a new issue