-
Notifications
You must be signed in to change notification settings - Fork 0
/
mdgBookSVG2v1.tex
252 lines (207 loc) · 16.3 KB
/
mdgBookSVG2v1.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
% arara: pdflatex
%Began 30 May 2021 ---
\documentclass[a4paper,x11names,svgnames,10pt]{article}
\usepackage{amsmath}
\usepackage{hyperref}
% the \hypersetup{keyvals} commented out below is stored in an external hyperref.cfg file
% to enable the pagebackref=true option
%\hypersetup{%dvips, % not needed for pdflatex
% pagebackref=true,
% pdfauthor={Iam The Author},
% hyperfigures,
% bookmarks=true,
% bookmarksnumbered=true,
% bookmarksopen=true,
% colorlinks=true, %if true, link borders absent
% pdfborder={1 1 1},
% citecolor=blue,
% linkcolor=blue,
% urlcolor=blue,
%}
\usepackage{url}
\usepackage{svg}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{float}
\usepackage{natbib}
\topmargin -0.50in
\oddsidemargin 0.0in
\textwidth 6.27in
\textheight 9.75in
%%%-----------------------------------------------------
%%% TO BE EDITED FOR EACH NEW SERIES or VOLUME GENERATED
%%%-----------------------------------------------------
\def\authorName{I Am The Author}
\def\authorFirstMidNameInit{I.\ T.\ }
\def\authorLastName{Author}
\def\dateGenerated{\today}
\def\volNumber{I}
\def\mdgBookTitle{Musical Dice Game - \\[0.15cm] Double Counterpoints \volNumber}
\def\mdgBookSubTitle{{\small based on}\\ Einfall, einen doppelten Contrapunct in der Octave von sechs Tacten zu machen, ohne die Regeln davon zu wissen (1758) \\[0.15cm] by Carl Philipp Emanuel Bach}
\def\theBookSeries{Wonders of the Musical World Series 2}
\def\theBookPublisher{Libre Edition Press}
\def\theBookPublisherLogo{../images/1ed.png}
\def\theBookFrontCover{../images/FrontCover.pdf}
%%%-----------------------------------------------------
%%%
\def\uline{\underline}
%\definecolor{orange}{rgb}{1,0.5,0} % RGB
%\definecolor{light-gray}{gray}{0.95} % shades
%\definecolor{orange}{cmyk}{0,0.5,1,0} % CMYK
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\setlength{\parindent}{0pt}
\DeclareGraphicsExtensions{.pdf,.png}
\setcitestyle{authoryear,round,comma,aysep={,},yysep={,},notesep={, }}
\title{\textsc{\mdgBookTitle}}
\author{\textsc{\authorFirstMidNameInit \authorLastName}}
\date{\textsc{\dateGenerated}}
% ---
\begin{document}
% Book Cover
\input{mdgBookSVG2v1-cover}
\newpage
% Title Page
{
${}_{}$\\
\vspace{1.00in}
\thispagestyle{empty}
\begin{center}
\HRule \\[0.4cm]
{\huge \bfseries \mdgBookTitle} \\[0.2cm]
{\large{\em \mdgBookSubTitle} }\\[0.2cm]
\HRule \\[1.5cm]
% Author and supervisor
\begin{minipage}{0.4\textwidth}
\begin{flushleft} \large
\emph{Author:}\\
\authorFirstMidNameInit \textsc{\authorLastName}
\end{flushleft}
\end{minipage}
\begin{minipage}{0.4\textwidth}
\begin{flushright} \large
\emph{Supervisor:} \\
Dr. Communio \textsc{Sanctorum}
\end{flushright}
\end{minipage}
\vfill
% Bottom of the page
{\textsc{\Large \theBookSeries}} \\[0.2cm]
\includegraphics*[width=0.15\linewidth]{\theBookPublisherLogo}\\
{\large \theBookPublisher \\
\dateGenerated }\\
\vspace{2.50in}
\end{center}
\newpage
%\maketitle % uncomment if no Front Cover
\tableofcontents\label{tabofcon}
%\extrafloats{182}
\baselineskip 14pt
\newpage
\section[Introduction]{Introduction\footnote{The information contained in the introduction were culled from the following online resources:
\citet{wiki_mw2017},
\url{https://opus-infinity.org/}, and
\href{https://www.sciencenews.org/article/mozarts-melody-machine-0}{Mozart's Melody Machine} \citep*{peterson2001}
}
}
\begin{center}
\begin{minipage}{0.4\textwidth}
\begin{flushleft}
\begin{center}
``\small Einfall, einen doppelten Contrapunct in \\
der Octave von sechs Tacten zu machen, \\
ohne die Regeln davon zu wissen"
\end{center}
\end{flushleft}
\end{minipage}
\begin{minipage}{0.4\textwidth}
\begin{flushright}
\begin{center}
``\small An invention by which Six Measures of \\
Double Counterpoint can be written \\
without a Knowledge of the Rules"
\end{center}
\end{flushright}
\end{minipage}
\end{center}
Thus run the German title (and its English translation) of the article that described the Musical Dice Game (MDG) invented by Carl Philipp Emanuel Bach (or C.P.E. Bach). Rightly and interestingly so, as the Rules provided in the published work allow a non-professional musician to generate (``compose") nearly 31.4 trillions of unique MDG double counterpoints of six measures (DCSMs). More precisely, the rules of the {\it Einfall}, as we would refer to this MDG from here onward, yields $9^6 \times 9^5 \times 1 = 31,\!381,\!059,\!609$ unique DCSMs (see explanation in Subsection~\ref{tabMeas}).\\ % Total: (9^6)^2 = 282,429,536,481
A {\it Musikalisches W\"{u}rfelspiel} (German for ``musical dice game" or MDG) is a system for randomly ``generating" (e.g., by using a die or two dice) musical compositions from precomposed options and was quite popular throughout Western Europe in the 18th century. The earliest known MDG is Johann Philipp Kirnberger's {\em Der allezeit fertige Polonoisen- und Menuettencomponist (1st ed.\ 1757; rev.\ 2nd ed.\ 1783)} (translated from German as ``The Ever-Ready Minuet and Polonaise Composer"). Another example is {\em Table pour composer des minuets et des Trios \`{a} la infinie; avec deux dez \`{a} jouer (1780)} (translated from French as ``A table for composing minuets and trios to infinity, by playing with two dice") that was composed by Abb\'{e} Maximillian Stadler (but is also attributed to Franz Joseph Haydn). \\
Probably the most famous of MDGs is {\it Musikalisches W\"{u}rfelspiel K. 516f (1787)}. This MDG was first published by J.J. Hummel in 1793 in Berlin and was republished in 1796 by Nikolaus Simrock in Bonn (as K. 294d or K. Anh. C 30.01). Simrock attributed this work to Wolfgang Amadeus Mozart. It is also known under the title of {\em Anleitung zum Componieren von Walzern so viele man will vermittelst zweier W\"{u}rfel, ohne etwas von der Musik oder Composition zu verstehen} (German for ``Instructions for the composition of as many waltzes as one desires with two dice, without understanding anything about music or composition") and may have been based on Mozart's manuscript {\em K.\ 516f}, written in 1787, consisting of numerous two-bar fragments of music, that appear to be some kind of game or system for constructing music out of two-bar fragments, but contains no instructions nor hints as to the use of dice. An \href{(http://www.asahi-net.or.jp/\~rb5h-ngc/e/k516f.htm}{online article} by Hideo Noguchi offers a possible explanation for this attribution. \\
This book is a collection of 150 MDG DCSMs generated according to the rules given in the {\it Einfall}. The scores of the generated DCSMs, that were initially written using the \texttt{abc} environment of Chris Walshaw, were converted to Scalar Vector Graphics (SVG) images (with corresponding MIDIs) using {\tt abcm2ps} and {\tt abcmidi}, and were then pre-processed with Inkscape to be included in \LaTeX\ to produce this book.
\section{\em Einfall}
\subsection{Rules}
The Rules provided in {\em Einfall} generate DCSMs consisting of six (6) bars/measures. The six bars are played with a repeat, yielding a total of 12 played bars. \\
The following Rules may be followed for generating each DCSM (not exactly the same as given in the {\it Einfall}):
\begin{enumerate}
\item [1.] For each bar from the first to the sixth, toss a nine-sided die twice then obtain the numbers on the face that comes up on each toss. Hence, six two nine-sided one-die tosses (with possible outcomes from the set \{1, 2, 3, 4, 5, 6, 7, 8, 9\} for each toss) are needed to generate a DCSM. (Two five-sided dice may also be used; just subtract 1 from the sum of the upturned faces in each toss.)
\item [2.] For each bar (1 to 6), the outcome of the first die toss from Step 1.\ is then used to determine which bar (numbered from 1 to 9 under each column) from the Table of Treble-Clef Measures (Figure~\ref{fig:meas1}) is to be used for obtaining the G-clef notes for the particular bar of the DCSM-to-be-created corresponding to the outcome of the toss. Similarly, the outcome of the second die toss is used to determine the F-clef notes from the Table of Bass-Clef Measures (Figures~\ref{fig:meas2}). \\
The possible outcomes of a nine-sided die toss (1 to 9) are given on the left-hand side (stub items) of Figure~\ref{fig:meas1}, while the bar numbers (1 to 6) of the DCSM-to-be-generated are given on the top of that table (captions or column headings).
\item [3.] For example, suppose for bar 2, the outcome of the two nine-sided die tosses are 5 for the first toss and 9 for the second toss. If we now look for measure number 2 at the top of Figure~\ref{fig:meas1} and for the outcome 5 on the left-hand side of that table, we obtain the notes of the 5th bar under the 2nd column of the Table of Treble-Clef Measures (Figure~\ref{fig:meas1}) for the G-clef of bar 2 for the DCSM-to-be-generated. Similarly, we take the notes of the 9th bar under the 2nd column of the Table of Bass-Clef Measures (Figures~\ref{fig:meas2}) for the F-clef notes of bar 2 for the DCSM-to-be-generated.
\end{enumerate}
\subsection{Table of Measures}\label{tabMeas}
\addcontentsline{toc}{subsection}{\hspace*{0.25in} {\em Einfall} Table of G-Clef Measures}
\begin{figure}[H]
\centering
\def\svgwidth{0.975\columnwidth}
\input{cpeBach-gclef001.pdf_tex}
\caption{Table of Treble-Clef Measures (Part I)}
\label{fig:meas1}
\end{figure}
Note that for each of the first five of the six bars of any {\it Einfall} DCSM, there are $9\times 9 = 81$ possible combinations of G- and F-clefs since there are nine choices for each of the G- and F-clefs. However, for the sixth bar (final bar) of each {\it Einfall } DCSM, although there are nine choices for the bars for the G-clef, there is only one choice of a bar for the F-clef, that choice being a middle C of four counts (C4). Thus, there are only nine combinations of G- and F-clefs for the sixth bar (see Figure~\ref{fig:meas2}). All told, these imply that the total number of unique {\it Einfall} DCSMs is $(9^2)^5 \times (9\times 1) = 81\times 81 \times 81 \times 81 \times 81\times 81 \times 9$ = $31,\!381,\!059,\!609$. (Note that this total number may be doubled by switching the roles of the G- and F-clefs as the DCSMs are invertible at the octave.)
${}_{}$\\
\vspace{0.10in}
\addcontentsline{toc}{subsection}{\hspace*{0.25in} {\em Einfall} Table of F-Clef Measures}
\begin{figure}[H]
\centering
\def\svgwidth{0.975\columnwidth}
\input{cpeBach-fclef001.pdf_tex}
\caption{Table of Bass-Clef Measures (Part II)}
\label{fig:meas2}
\end{figure}
%\newpage
%${}_{}$\\
%\vspace{0.10in}
%\addcontentsline{toc}{subsection}{\hspace*{0.25in} K516f page 3 of measures}
%\begin{figure}[H]
% \centering
% \def\svgwidth{0.975\columnwidth}
% \input{abcmdg-k516f003.pdf_tex}
% \caption{Table of Measures (Part III)}
% \label{fig:meas3}
%\end{figure}
%\newpage
%${}_{}$\\
%\vspace{0.10in}
%\addcontentsline{toc}{subsection}{\hspace*{0.25in} K516f page 4 of measures}
%\begin{figure}[H]
% \centering
% \def\svgwidth{0.975\columnwidth}
% \input{abcmdg-k516f004.pdf_tex}
%% \label{fig:meas4}
%\end{figure}
\newpage
\section{Related Links}
The following are very interesting sites in that they allow the online rendering of MDGs:
\begin{itemize}
\item \href{https://opus-infinity.org}{Opus Infinity} - Collaborative work of Robbert Harms, Hein Moors, and Suus van Petegem whose goal is to unravel the mystery behind the tables used for generating MDGs. Site visitors can generate MDGs based on works of Kirnberger, Mozart, Stadler/Haydn, Bach, and Gerlach. Corresponding audio files ({\tt mid, ogg,} and/or {\tt mp3}) and image files ({\tt pdf} or {\tt png}) are also made available for listening, viewing, or downloading.
\item \href{http://sunsite.univie.ac.at/Mozart/dice/}{Mozart} - A site maintained by John Chuang that allows the site visitor to generate MDGs based on the work of Stadler/Haydn.
\item \href{https://marian-aldenhoevel.de/mozart/}{Mozart} - A site maintained by Marian Aldenh\"{o}vel allows the visitor to generate a MDG (user-specified or randomly-generated) and the corresponding audio ({\tt midi, wav}) and image files ({\tt pdf, png}) based on {\em Musikalisches W\"{u}rferspiel, K.\ 516f}.
\item \href{https://www.amaranthpublishing.com/mozart.zip}{\tt mozart.zip} - This is a Windows software ({\small\textcopyright} 1995 VisionSoft) by John Chuang and Stephen Goodwin that generates MDG based on input from user and is available for {\it free} from \href{http://www.amaranthpublishing.com/MozartDiceGame.htm}{Amaranth Publishing}.
\item \href{(http://www.asahi-net.or.jp/\~rb5h-ngc/e/k516f.htm}{``Mozart - Musical Game in C K. 516f,"} Mozart Studies Online - The site of Hideo Noguchi that offers an explanation linking {\em Musikalisches W\"{u}rferspiel, K.\ 516f}, and {\em K.\ 294d (K.\ Anh.\ C 30.01)}.
\end{itemize}
\section{Acknowledgments}
My sincerest gratitude to E. Eugene Helm for the translation of \href{https://www.jstor.org/stable/843301}{\it Einfall}; Chris Walshaw et al. for the \href{http://www.abcnotation.com/}{ABC music notation}; Jean-Francois Moine for \href{http://moinejf.free.fr/}{\tt abcm2ps} and the accompanying examples, templates, and pointers for the appropriate use of these resources; Guido Gonzato for the \href{http://abcplus.sourceforge.net/}{ABC Plus Project} and the \href{http://abcplus.sourceforge.net/#abcMIDI}{{\tt abcmidi} resources} available there, more especially for the ABC resource book {\em Making Music with ABC 2}; James R. Allwright and Seymour Shlien for \href{http://abc.sourceforge.net/abcMIDI}{\tt abcmidi} source and binaries; \href{https://artifex.com/}{Artifex, Inc.} for Ghostscript v.10.00.0 (includes the {\tt ps2pdf} converter); \href{https://www.inkscape.org/}{Inkscape v.1.2.2} for the tool for converting SVGs to PDFs for inclusion into \LaTeX\ documents; William Schelter for \href{https://maxima.sourceforge.io}{Maxima v.5.47.0}---used for computing the permutation number; Colomban Wendling et.\ al for \href{https://www.geany.org}{Geany 2.0 IDE}; and \href{https://tex.stackexchange.com/users/632/martin-h}{\tt User:Martin H} for his \href{https://tex.stackexchange.com/questions/2099/how-to-include-svg-diagrams-in-latex}{reply} to a \TeX\ / \LaTeX\ Stack Exchange question on including SVGs into \LaTeX\ documents. Special thanks also to \href{https://opus-infinity.org}{Opus Infinity} and \href{https://www.jstor.org/stable/843301}{JSTOR} (in collaboration with Duke University Press and Yale University) for making available the score for \href{https://opus-infinity.org/dice_games/cpebach_counterpoint/measures/
}{\em Einfall}, \href{https://imslp.org}{International Music Score Library Project} for \href{https://imslp.org/wiki/Historisch-Kritische\_Beytr\%C3\%A4ge\_zur\_Aufnahme\_der\_Musik\_(Marpurg,\_Friedrich\_Wilhelm)}{\it Historisch-Kritische Beyträge zur Aufnahme der Musik Bd.3}, and \href{http://www.amaranthpublishing.com/MozartDiceGame.htm}{Amaranth Publishing} for a copy of {\tt mozart.zip}. Ditto to Machtelt Garrels for the book \href{http://tldp.org/LDP/Bash-Beginners-Guide/html/Bash-Beginners-Guide.html}{Bash Guide for Beginners}, Vivek Gite for the book \href{http://www.freeos.com/guides/lsst/}{Linux Script Shell Tutorial}, and Steve Parker for the \href{http://steve-parker.org/sh/cheatsheet.pdf}{Unix/Linux Shell Cheatsheet}. John Fogarty's GitHub Site: \href{https://github.com/jfogarty/latex-createspace-bookcover}{Latex CreateSpace BookCover} and Peter Wilson's reply in \TeX\ / \LaTeX\ Stack Exchange on \href{https://tex.stackexchange.com/questions/17579/how-can-i-design-a-book-cover}{designing a book cover}, were sources of ideas, information, and materials for creating the book cover and title page, thanks to both of them; \href{http://www.libreoffice.org/}{LibreOffice Calc} for its use in the image creation of the book cover. Many thanks, too, to the \href{https://www.debian.org}{Debian Project} for the Debian 12 (Bookworm) GNU/Linux OS, \href{http://www.tug.org/texlive/}{TeXLive} for providing the \TeX\ distribution, and \href{https://github.com}{GitHub} for its generosity in providing space for \href{https://github.com/justineuro/mdgBookSVG2Kit}{the project}.
\newpage
\section{Selected Waltzes}
\vspace{-0.20in}
{
\topmargin -1.00in
\textheight 10.25in
\input{svgList}
}
\newpage
\section{License}
This work by I Am The Author, based on work of J.L.A. Uro at \url{https://github.com/justineuro/mdgBookSVG2Kit}, is licensed under a Creative Commons Public Domain International License.
\bibliographystyle{plainnat}
\bibliography{mdg4}
\end{document}