# HG changeset patch # User christopherh # Date 1430130052 -3600 # Node ID 0dd1b89b5943db57895bfe9f8a1e52b50d501c93 # Parent 101e930b4cd345108081a657c6a81ef6f0b7d605 updating images and framework tex diff -r 101e930b4cd3 -r 0dd1b89b5943 SMC2015latex/definitions.tex --- a/SMC2015latex/definitions.tex Mon Apr 27 10:00:26 2015 +0100 +++ b/SMC2015latex/definitions.tex Mon Apr 27 11:20:52 2015 +0100 @@ -1,6 +1,6 @@ %\usepackage{algorithmic} %\usepackage{algpseudocode} -\usepackage{epsfig} % This package allows encapsulated postscript +%\usepackage{epsfig} % This package allows encapsulated postscript %\usepackage{subfigure} % This package allows subfigures \usepackage{amsmath} \usepackage{amssymb} diff -r 101e930b4cd3 -r 0dd1b89b5943 SMC2015latex/images/general3.pdf Binary file SMC2015latex/images/general3.pdf has changed diff -r 101e930b4cd3 -r 0dd1b89b5943 SMC2015latex/images/general3.svg --- a/SMC2015latex/images/general3.svg Mon Apr 27 10:00:26 2015 +0100 +++ b/SMC2015latex/images/general3.svg Mon Apr 27 11:20:52 2015 +0100 @@ -22,16 +22,16 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="1.4142136" - inkscape:cx="358.17918" - inkscape:cy="453.39826" + inkscape:zoom="2.8284272" + inkscape:cx="318.15763" + inkscape:cy="399.10381" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" inkscape:window-width="1440" - inkscape:window-height="770" + inkscape:window-height="776" inkscape:window-x="0" - inkscape:window-y="22" + inkscape:window-y="0" inkscape:window-maximized="1" showguides="true" inkscape:guide-bbox="true" /> @@ -446,14 +446,15 @@ image/svg+xml - + + id="layer2" + inkscape:label="Layer" + sodipodi:insensitive="true"> + + s + style="font-size:6px;font-style:normal;fill:#800000;fill-opacity:1;font-family:Times New Roman;-inkscape-font-specification:Times New Roman">s + d + t + style="fill:#000080" + transform="matrix(1.9916472,0,0,1.9916472,-186.14365,-656.1151)" + id="g5300"> d + id="tspan5304" + x="235.44333" + y="640.53943" + style="font-style:normal;fill:#000080;font-family:cmmi10;-inkscape-font-specification:cmmi10">y + + + + 0 t - - + + s + t + + y + + + + 1 + + + d + t + + y - y + - - - + + + 0 - 1 + - - - - s - t - - y - - - - 1 - - - - - d - t - - y - - - - 1 - - + id="tspan4393" + sodipodi:role="line" /> image/svg+xml - + @@ -185,70 +185,40 @@ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" id="rect15063" width="319.28561" - height="429.492" + height="289.48486" x="91.247124" y="89.348839" /> - - - - - root - - - root strong weak weak strong weak strong weak weak strong - root (b) (c) (b) 0 1 2 - 0 2 - - - - - - - - - - root weak weak + transform="matrix(1.3564067,0,0,1.3564067,-43.9196,228.51627)" /> + transform="matrix(1.3564067,0,0,1.3564067,81.467663,267.98056)" /> + transform="matrix(1.3564067,0,0,1.3564067,-43.704594,267.98056)" /> + transform="matrix(1.3564067,0,0,1.3564067,39.74357,267.98056)" /> strong weak 2 w 0 w 0 w 0 w 1 w 1 w 2 w 1 w 2 w 2 w 1 w 0 0 w 2 w 1 w 2 Metrical Level L Metrical Level L 0 = 1 1 = 3 2 = 2 1 = 2 - - - @@ -2227,11 +1488,11 @@ sodipodi:nodetypes="cccczcszzzsaszzcc" inkscape:connector-curvature="0" id="path4403" - d="m 382.45746,432.89506 -2.99916,3.45606 c -0.52942,0.57787 -1.11744,-0.19265 -0.65856,-0.62672 l 3.47033,-3.33306 c 0,0 -1.14423,-2.83845 -1.42878,-3.52603 -0.28454,-0.68759 -0.70548,-0.65868 -0.73045,-0.66806 -0.20508,-0.005 -0.29398,-0.34729 0.0248,-0.33938 0.32302,0.008 0.46199,0.009 0.78209,0.0371 0.32011,0.0286 0.6918,0.22107 0.90727,0.66958 0.21547,0.44851 2.66523,6.84548 2.76388,7.10091 0.0987,0.25544 0.16441,0.43642 0.26794,0.60065 0.0385,0.0611 0.11037,0.11164 0.0963,0.17887 -0.01,0.0447 -0.0374,0.0763 -0.1052,0.0782 -0.2128,0.006 -0.54898,0.004 -0.67981,0.004 -0.13081,5e-5 -0.36885,-0.15342 -0.47413,-0.38014 -0.10528,-0.22673 -1.23662,-3.25179 -1.23662,-3.25179 z" + d="m 382.45746,287.23107 -2.99916,3.45606 c -0.52942,0.57787 -1.11744,-0.19265 -0.65856,-0.62672 l 3.47033,-3.33306 c 0,0 -1.14423,-2.83845 -1.42878,-3.52603 -0.28454,-0.68759 -0.70548,-0.65868 -0.73045,-0.66806 -0.20508,-0.005 -0.29398,-0.34729 0.0248,-0.33938 0.32302,0.008 0.46199,0.009 0.78209,0.0371 0.32011,0.0286 0.6918,0.22107 0.90727,0.66958 0.21547,0.44851 2.66523,6.84548 2.76388,7.10091 0.0987,0.25544 0.16441,0.43642 0.26794,0.60065 0.0385,0.0611 0.11037,0.11164 0.0963,0.17887 -0.01,0.0447 -0.0374,0.0763 -0.1052,0.0782 -0.2128,0.006 -0.54898,0.004 -0.67981,0.004 -0.13081,5e-5 -0.36885,-0.15342 -0.47413,-0.38014 -0.10528,-0.22673 -1.23662,-3.25179 -1.23662,-3.25179 z" style="fill:#000000;stroke:none" /> diff -r 101e930b4cd3 -r 0dd1b89b5943 SMC2015latex/section/framework.tex --- a/SMC2015latex/section/framework.tex Mon Apr 27 10:00:26 2015 +0100 +++ b/SMC2015latex/section/framework.tex Mon Apr 27 11:20:52 2015 +0100 @@ -6,6 +6,16 @@ \caption{Module hierarchy in the synpy toolkit: The top-level module provides a simple interface for the user to test different syncopation models. Musical constructs such as bars, velocity and note sequences, notes and time signatures are defined in the `music objects' module while support for common procedures such as sequence concatenation and subdivision is provided in `basic functions'. Models and file reading components can be interchanged as required by the user.\label{fig:framework}} \end{figure} +The architecture of the toolkit is relatively simple (see Figure~\ref{fig:framework}). At the top level, syncopation values can be calculated for each bar in a given source of rhythm data; the user specifies which model to use and supplies any special parameters that are required. Sources of rhythm data can be a bar object or a list of bars (detailed below in section\ref{sec:musicobjects}) or, alternatively, the name of a file containing music data. Where a model is unable to calculate a value for a given rhythm pattern, a “None” value is recorded for that bar and the indices of unmeasured bars reported in the output. Output can optionally be saved directly to XML or JSON files. + +\subsection{Music objects} +\label{sec:musicobjects} +The `music objects' module provides classes to represent musical constructs such as bars, velocity and note sequences, time signatures, and individual notes. A \code{Bar} object holds the rhythm information for a single bar of music along with its associated time signature and optional tempo and ticks-per-quarternote values. \code{Bar} objects may be initialised with either a note sequence or velocity sequence and can be chained together in the form of a doubly-linked \code{BarList} allowing syncopation models to access next and previous bars where appropriate\footnote{Several models \cite{LHL84,Keith91,Pressing97,Gomez05} implemented in the toolkit require knowledge of the contents of previous and/or next bars in order to calculate the syncopation of the current bar.}. The note sequence and velocity sequence classes are direct implementations of the sequences described in section~\ref{sec:background}. Common low-level procedures such as sequence concatenation and subdivision are provided in `basic functions'. + +\subsection{File Input} +\label{sec:fileinput} +Two file reader modules are currently provided: one for for reading plain text rhythm annotation (\code{.rhy}) files and one for reading standard MIDI files (\code{.mid}). These modules open their respective file types and return a \code{BarList} object ready for processing. + \begin{figure} \footnotesize{ \begin{minted}[frame=single,framesep=10pt]{python} @@ -17,9 +27,14 @@ V{1,0,0,0.5,0,0,1,0,0,0,0.5,0,0.5,0,0,0} \end{minted} } -\caption{Example rhythm annotation \code{.rhy} file containing two bars of the Son Clave rhythm. The first is expressed as a note sequence with resolution of four ticks per quarternote; the second is the same rhythm expressed as a velocity sequence (see section~\ref{sec:background}.} +\caption{Example rhythm annotation \code{.rhy} file containing two bars of the Son Clave rhythm. The first is expressed as a note sequence with resolution of four ticks per quarternote; the second is the same rhythm expressed as a velocity sequence (see section~\ref{sec:background}).} \label{ta:clave} \end{figure} +Our \code{.rhy} annotation format is a light text syntax for descibing rhtyhm patterns directly in terms of note and velocity sequences (see Figure~\ref{ta:clave}). + +\subsection{Plugin architecture} +The system architecture has been designed to allow new models to be added easily. Models have a common interface, exposing a single function that will return the syncopation value for a bar of music. Optional parameters may be supplied as a Python dictionary if the user wishes to specify settings different from the those given in the literature for a specific model. + \begin{figure} \footnotesize{ \begin{minted}[frame=single,framesep=10pt]{python} @@ -36,15 +51,12 @@ 'syncopation_by_bar': [8.625, 8.625]} \end{minted} } -\caption{To use the library, the top level \code{synpy} module is imported along with a model (in this example Pressing \cite{pressing}); calling \code{calculate\_syncopation()} gives the syncopation results as shown. +\caption{To use the toolkit, the top level \code{synpy} module is imported along with a model (in this example Pressing \cite{Pressing97}); calling \code{calculate\_syncopation()} gives the syncopation results as shown. \label{ta:example} } \end{figure} -The architecture of the toolkit is relatively simple (see Figure~\ref{fig:framework}); syncopation values are calculated for each bar in a given source of rhythm data with the user specifying which model to use and supplying any special parameters that are required. Output can optionally be saved directly to XML or JSON files. Sources of rhythm data can be the name of a file containing rhythm data or a bar or list of bar objects as defined in section~\ref{sec:?}. Where a model is unable to calculate a value for a given rhythm pattern, a “None” value is recorded for that bar and the indices of unmeasured bars reported in the output. -Musical constructs such as bars, velocity and note sequences, notes and time signatures are defined in the `music objects' module with support for common procedures such as sequence concatenation and subdivision being provided in `basic functions'. Two file reader modules are currently provided; one for reading standard MIDI files and one for reading plain text rhythm annotation \code{.rhy} files. These modules open their respective file types and return a list of bar objects that the syncopation models can process. -The system architecture has been designed to allow new models to be added easily. Models have a common interface, exposing a single function that will return the syncopation value for a bar of music. Optional parameters may be supplied as a Python dictionary if the user wishes to specify settings different from the those given in the literature for a specific model. diff -r 101e930b4cd3 -r 0dd1b89b5943 SMC2015latex/syncopation_toolkit.tex --- a/SMC2015latex/syncopation_toolkit.tex Mon Apr 27 10:00:26 2015 +0100 +++ b/SMC2015latex/syncopation_toolkit.tex Mon Apr 27 11:20:52 2015 +0100 @@ -13,6 +13,8 @@ \newcommand{\code}[1]{{\small\texttt{#1}}} +\input{definitions} + %%%%%%%%%%%%%%%%%%%%%%%% Some useful packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%% See related documentation %%%%%%%%%%%%%%%%%%%%%%%%%% %\usepackage{amsmath} % popular packages from Am. Math. Soc. Please use the @@ -60,7 +62,7 @@ \usepackage[pdftex]{graphicx} % declare the path(s) where your graphic files are and their extensions so %you won't have to specify these with every instance of \includegraphics - \graphicspath{{./figures/}} + %\graphicspath{{./figures/}} \DeclareGraphicsExtensions{.pdf,.jpeg,.png} \usepackage[figure,table]{hypcap} @@ -135,14 +137,15 @@ % \begin{abstract} -talk about a syncopation toolkit +SynPy is an open-source software toolkit for quantifying syncopation. It provides reference implementations for seven widely known syncopation models; and to achieve an easy and fast platform to measure syncopation for a piece of monophonic music. + \end{abstract} % -\input{section/introduction} +%\input{section/introduction} -\input{section/background} +%\input{section/background} \input{section/framework}