summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-08-11 20:37:58 +0000
committerKarl Berry <karl@freefriends.org>2019-08-11 20:37:58 +0000
commit84ff1351b3ee00a1859a4057fc82b1e822cd148d (patch)
treea66e3731ede2e04e84b4b6f539ffcf7ce1bcdb57 /Master
parentd4357105653679c4365755388472445d885414f1 (diff)
ddphonism (11aug19)
git-svn-id: svn://tug.org/texlive/trunk@51864 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/ddphonism/README.md28
-rw-r--r--Master/texmf-dist/doc/latex/ddphonism/ddphonism.pdfbin0 -> 81693 bytes
-rw-r--r--Master/texmf-dist/doc/latex/ddphonism/ddphonism.tex106
-rw-r--r--Master/texmf-dist/tex/latex/ddphonism/ddphonism.sty206
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check4
-rw-r--r--Master/tlpkg/tlpsrc/collection-music.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/ddphonism.tlpsrc0
7 files changed, 344 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/ddphonism/README.md b/Master/texmf-dist/doc/latex/ddphonism/README.md
new file mode 100644
index 00000000000..127068572ba
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/ddphonism/README.md
@@ -0,0 +1,28 @@
+The ddphonism package
+Celia Rubio Madrigal
+2019/08/10
+
+__________________
+Overview
+
+This is a music-related package which is focused on notation from the Twelve-Tone System, also called Dodecaphonism. It provides LaTeX algorithms that produce typical T.T.S. notation based off a musical series, or row sequence, of variable length.
+
+__________________
+Change history
+
+Version 0.1 (2019/08/10)
+- Initial public release
+
+__________________
+License
+
+Copyright (C) 2019 by Celia Rubio Madrigal <celrubio@ucm.es>
+
+Permission is granted to distribute and/or modify this work under the
+terms of the LaTeX Project Public License (LPPL), version 1.3c or
+later.
+
+The LPPL maintenance status of this work is "maintained".
+
+This work consists of the files ddphonism.sty, ddphonism.pdf and README
+and the derived file ddphonism.tex.
diff --git a/Master/texmf-dist/doc/latex/ddphonism/ddphonism.pdf b/Master/texmf-dist/doc/latex/ddphonism/ddphonism.pdf
new file mode 100644
index 00000000000..4f7b0a17fb3
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/ddphonism/ddphonism.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/ddphonism/ddphonism.tex b/Master/texmf-dist/doc/latex/ddphonism/ddphonism.tex
new file mode 100644
index 00000000000..a5f53c7b65f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/ddphonism/ddphonism.tex
@@ -0,0 +1,106 @@
+\documentclass{article}
+
+\usepackage{hyperref}
+\usepackage{multicol}
+\usepackage{listings}
+
+\usepackage{ddphonism}
+
+\title{The \textsf{ddphonism} package\footnote{This
+ document corresponds to \textsf{ddphonism} v0.1, dated 2019/08/10.}}
+\author{Celia Rubio Madrigal\footnote{Email: \href{mailto:celrubio@ucm.es}{\texttt{celrubio@ucm.es}}}}
+\date{August 10, 2019}
+
+
+\begin{document}
+
+ \maketitle
+
+ \begin{abstract}
+ This is a music-related package which is focused on notation from the Twelve-Tone System, also called Dodecaphonism. It provides \LaTeX{} algorithms that produce typical T.T.S. notation based off a musical series, or row sequence, of variable length.
+
+ \begin{center}
+ \textbf{Keywords}
+ \end{center}
+
+ \textit{twelve tone system, dodecaphonism, music, mathematics, matrix, row, series, diagram, clock diagram, notation, algorithm, schoenberg, contemporary music, 20th century}
+ \end{abstract}
+
+ \tableofcontents
+
+ \section{Introduction}
+ There are hundreds of music tools and software online which are able to produce different music notations. However, I have never seen a \LaTeX{} tool that can do the same. This package is not only about notation, but it also calculates mathematically how this notation should work.
+
+ It is said that a twelve-tone matrix is the only thing a twelve-tone composer should need, because it provides the whole serial spectrum with which they may work. I wanted \LaTeX{} users to be able to generate them automatically.
+
+ But I also think that a twelve-tone matrix is not enough, that there exist several other notations with which they may understand their series and its potential. These are the diagrams that can be obtained with this package.
+
+ \begin{multicols}{2}
+ \dmatrix{0,1,2,3,4}
+
+ \tikz{\ddihedral{4,5,7,1,6,3,8,2,11,0,9,10}}
+
+ \ddiagram{4,5,7,1,6,3,8,2,11,0,9,10}{}
+
+ \tikz{\darrows{4,5,7,1,6,3,8,2,11,0,9,10}}
+
+ \bigskip
+ \drow{4,3,2,1,0}
+ \end{multicols}
+
+ \section{Using the \textsf{ddphonism} package}
+ These are the commands provided by \textsf{ddphonism}:
+
+ \newcommand{\I}[1]{\item[\texttt{$\backslash$#1}]\quad}
+ \begin{itemize}
+ \I{dmatrix} produces a twelve-tone matrix of arbitrary length, as shown in \href{https:matrices.netlify.com}{this website}. Its parameter is the row sequence. For example, \verb|\dmatrix{0,2,1,4,3,6,5}| produces the matrix \dmatrix{0,2,1,4,3,6,5}
+
+ The command automatically reduces the input and output modulus the length of the input series. Thus, the input \verb|\dmatrix{7,9,8,11,10,13,12}| produces the same output as before.
+
+ \I{ddiagram} produces a twelve tone clock diagram of arbitrary length, as shown in \href{https:diagramas.netlify.com}{this website}. Its parameters are the row sequence and its name. An additional optional parameter tells which number must be up north. The default value is the first number. For example, \verb|\ddiagram{0,2,1,4,3,6,5}{P}| produces the diagram \ddiagram{0,2,1,4,3,6,5}{P}
+
+ and \verb|\ddiagram[3]{0,1,2,3,4}{P}| produces the diagram \ddiagram[3]{0,2,1,4,3,6,5}{P}
+
+ The command also reduces the input and output modulus the length of the input series.
+
+ \I{ddihedral} produces a dihedral representation of a series of arbitrary length. Its parameters are the original row sequence and, optionally, the transformations it undergoes: \texttt{t,s,c,v} applied in that order. For example,\\ \verb|\tikz{\ddihedral[t=2,v=1]{0,2,1,4,3,6,5}}| produces the diagram\\ \tikz{\ddihedral[t=2,v=1]{0,2,1,4,3,6,5}}
+
+ It needs to be inside a \texttt{tikz} environment, as opposed to the previous ones, which are separate \texttt{tikz} environments on their own. This is because rotation or translation lines are sometimes included in this diagram, and sometimes it needs scalings.
+
+ The command also reduces the input and output modulus the length of the input series.
+
+ \I{darrows} produces the arrows from the \verb|\ddihedral| diagram. For example,
+ \verb|\tikz{\darrows{0,2,1,4,3,6,5}}| produces the arrows\\
+ \tikz{\darrows{0,2,1,4,3,6,5}}
+
+ \I{drow} produces a twelve-tone row sequence as a permutation in its matrix form. For example, \verb|\drow{0,2,1,4,3,6,5}| produces the row
+
+ \drow{0,2,1,4,3,6,5}
+
+ \end{itemize}
+
+ \section{The package code}
+ \lstset{
+% frame=lines,
+ %
+ language=[Latex]Tex,
+ %
+ basicstyle=\footnotesize\sffamily,
+ keywordstyle=\footnotesize\sffamily,
+ identifierstyle=\footnotesize\sffamily,
+ commentstyle=\footnotesize\sffamily,
+ stringstyle=\footnotesize\sffamily,
+ escapechar=¬,
+ %
+ numberstyle=\footnotesize\sffamily,%\ttfamily\tiny\color[gray]{0.3},
+ numbers=left,
+ stepnumber=2,
+ numbersep=15pt,
+ %
+ columns=flexible,
+ showstringspaces=false,
+ tabsize=4,
+ }
+ \lstinputlisting{ddphonism.sty}
+
+\end{document}
diff --git a/Master/texmf-dist/tex/latex/ddphonism/ddphonism.sty b/Master/texmf-dist/tex/latex/ddphonism/ddphonism.sty
new file mode 100644
index 00000000000..76f3e028ce8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ddphonism/ddphonism.sty
@@ -0,0 +1,206 @@
+% ddphonism
+%
+% (c) Celia Rubio Madrigal
+%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN archives
+%% in directory macros/latex/base/lppl.txt.
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{ddphonism}
+[2019/08/10 v0.1 LaTeX package for twelve-tone matrices, clock diagrams et al.]
+
+\RequirePackage{ifthen}
+\RequirePackage{xparse}
+\RequirePackage{tikz}
+\RequirePackage{xstring}
+\RequirePackage{pgfkeys}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Matrices
+
+\usetikzlibrary{matrix}
+
+\ExplSyntaxOn
+\DeclareExpandableDocumentCommand{\Evaluation}{m}{\int_eval:n {#1}}
+\ExplSyntaxOff
+
+\newcounter{Dfirst}
+\newcounter{Dsize}
+
+\newcommand{\DsizeHead}[1]{
+ \setcounter{Dsize}{0}
+ \setcounter{Dfirst}{-1}
+
+ \foreach \n in {#1}{
+ \ifnum\theDfirst=-1
+ \setcounter{Dfirst}{\n}
+ \fi
+ \stepcounter{Dsize}
+ }
+}
+
+\newcommand{\Modulo}[1]{
+ \ifnum#1>\Evaluation{\theDsize-1}
+ \Evaluation{#1-\theDsize}
+ \else\ifnum#1<0
+ \Evaluation{#1+\theDsize}
+ \else #1
+ \fi\fi
+}
+
+\newcommand{\dmatrix}[1]{
+ \DsizeHead{#1}
+ \begin{tikzpicture}
+ \foreach [count=\nj] \j in {#1} {
+ \foreach [count=\ni] \i in {#1} {
+ \draw node at (\ni-0.5,-\nj/2+0.25) {
+ \Modulo{\Evaluation{\i-\j+\theDfirst}}
+ };
+ }
+ }
+ \end{tikzpicture}
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Diagrams
+
+\usetikzlibrary{shapes,arrows,decorations.markings,shapes.misc}
+
+\tikzstyle ddiagramArrow=[decoration=
+ {markings,mark=at position 0.25 with
+ {\arrow[scale=1.25,>=triangle 45]{>}}},
+ postaction={decorate}]
+
+\newcounter{anterior}
+\newcounter{var}
+\newcommand{\ddiagram}[3][-1]{
+ \DsizeHead{#2}
+ \def\theDDfirst{\Evaluation{\Modulo{\theDfirst}}}
+
+ \ifnum #1=-1
+ \setcounter{var}{\theDDfirst}
+ \else
+ \setcounter{var}{#1}
+ \fi
+
+ \begin{tikzpicture}[rotate=360*\thevar/\theDsize,
+ minimum height=0pt,inner sep=0pt,outer sep=0pt,scale=0.65]
+ \foreach \x in {0,...,\Evaluation{\theDsize-1}} {
+ \node at (90-360*\x/\theDsize:2) {\x};
+ \node (\x) at (90-360*\x/\theDsize:1.6) {};
+ };
+
+ \setcounter{anterior}{-1}
+ \foreach \xD in {#2}{
+ \def\x{\Evaluation{\Modulo{\xD}}}
+ \ifnum \theanterior=\theDDfirst
+ \draw [style=ddiagramArrow] (\theanterior) -- (\x);
+ \else \ifnum \theanterior=-1
+ \else
+ \draw (\theanterior) -- (\x);
+ \fi\fi
+ \setcounter{anterior}{\x}
+ };
+ \draw (\theanterior) -- (\theDDfirst);
+
+ \node at (0,0) [circle,fill=white] {#3};
+ \end{tikzpicture}
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Dihedral diagrams
+
+\tikzstyle ddihedralArrow=[decoration=
+ {markings,mark=at position 1 with {\arrow[scale=1.5,>=angle 60]{>}}},
+ postaction={decorate}]
+
+\pgfkeys{
+ /ddihedral/.is family, /ddihedral,
+ default/.style = {t = 0, c = 0, s = 0, v = 0},
+ t/.estore in = \ddihedralT,
+ c/.estore in = \ddihedralC,
+ s/.estore in = \ddihedralS,
+ v/.estore in = \ddihedralV,
+}
+
+\newcommand{\darrows}[1]{
+ \DsizeHead{#1}
+ \draw foreach \x in {0,...,\Evaluation{\theDsize-1}} {
+ (90-360*\x/\theDsize:2.5) node[circle] (\x) {}
+ };
+ \foreach \xD [count=\y] in {#1} {
+ \def\x{\Evaluation{\Modulo{\xD}}}
+ \draw [style=ddihedralArrow] (90-360*\Evaluation{\y-1}/\theDsize:1.25) -- (\x);
+ };
+}
+
+\newcommand\ddihedral[2][]{
+ \pgfkeys{/ddihedral, default, #1}
+
+ \tikzset{inner sep=0,minimum height=18pt}
+
+ \DsizeHead{#2}
+
+ \draw foreach \x in {0,...,\Evaluation{\theDsize-1}} {
+ (\Evaluation{(90+\ddihedralT*360/\theDsize)+(2*\ddihedralS-1)*\x*360/\theDsize}:2.5)
+ node[very thin,circle,draw] (\x) {\x}
+ };
+
+ \draw foreach \x in {0,...,\Evaluation{\theDsize-1}} {
+ (\Evaluation{(90-\ddihedralC*360/\theDsize)+(2*\ddihedralV-1)*\x*360/\theDsize}:1.25)
+ node[very thin,circle,draw] {\x}
+ };
+
+ \darrows{#2}
+
+ \node at (0,0) [very thin,draw,circle, fill=white] {\
+ \ifnum\ddihedralV=0
+ \ifnum\ddihedralC=0
+ \ifnum\ddihedralS=0
+ \ifnum\ddihedralT=0
+ P
+ \fi\fi\fi
+ \else V \fi
+ \ifnum\ddihedralC=0
+ \else C$^{\ddihedralC}$ \fi
+ \ifnum\ddihedralS=0
+ \else S \fi
+ \ifnum\ddihedralT=0
+ \else T$^{\ddihedralT}$ \fi
+ \ };
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Rows
+
+\newcount\fooo
+\long\def\addto#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}
+\newcounter{myDDcntr}
+
+\newcommand{\drow}[1]{
+ \DsizeHead{#1}
+ \def\tabledata{} \fooo=\theDsize
+ \setcounter{myDDcntr}{0}
+ \loop
+ \addto\tabledata{\themyDDcntr\stepcounter{myDDcntr} &}
+ \advance \fooo -1
+ \ifnum \fooo>1
+ \repeat
+ \addto\tabledata{\themyDDcntr \\}
+ \ensuremath{
+ \left(\begin{array}{*{\theDsize}c}
+ \tabledata
+ \StrSubstitute{#1}{,}{&}\\
+ \end{array}\right)
+ }
+}
+
+\endinput
+
+
+%% End of file `ddphonism.sty'. \ No newline at end of file
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 04831c2e422..8ac478745fe 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -222,7 +222,9 @@ my @TLP_working = qw(
datetime2-serbian datetime2-slovak datetime2-slovene
datetime2-spanish datetime2-swedish datetime2-turkish datetime2-ukrainian
datetime2-usorbian datetime2-welsh
- dblfloatfix dccpaper dcpic de-macro decimal decorule dehyph dehyph-exptl
+ dblfloatfix dccpaper dcpic
+ ddphonism
+ de-macro decimal decorule dehyph dehyph-exptl
dejavu dejavu-otf
delim delimseasy delimset delimtxt denisbdoc derivative dhua
diadia diagbox diagmac2 dialogl diagnose dice dichokey
diff --git a/Master/tlpkg/tlpsrc/collection-music.tlpsrc b/Master/tlpkg/tlpsrc/collection-music.tlpsrc
index 1969dd0bee8..9a6d9aab434 100644
--- a/Master/tlpkg/tlpsrc/collection-music.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-music.tlpsrc
@@ -9,6 +9,7 @@ depend autosp
depend bagpipe
depend chordbars
depend chordbox
+depend ddphonism
depend figbas
depend gchords
depend gregoriotex
diff --git a/Master/tlpkg/tlpsrc/ddphonism.tlpsrc b/Master/tlpkg/tlpsrc/ddphonism.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/ddphonism.tlpsrc