Mercurial > hg > syncopation-dataset
changeset 61:bae079ff88e2
Merge
author | csong <csong@eecs.qmul.ac.uk> |
---|---|
date | Mon, 27 Apr 2015 13:10:10 +0100 |
parents | 1abc08dbde49 (current diff) 79ce0dd91946 (diff) |
children | e2b9ccb92973 61b15f32b470 |
files | |
diffstat | 3 files changed, 23 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/SMC2015latex/section/framework.tex Mon Apr 27 13:09:09 2015 +0100 +++ b/SMC2015latex/section/framework.tex Mon Apr 27 13:10:10 2015 +0100 @@ -6,7 +6,27 @@ \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. +The architecture of the toolkit (shown in Figure~\ref{fig:framework}) provides a simple interface to the user. 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. An example of usage in the Python interpreter is shown in Figure~\ref{ta:example}. + +\begin{figure} +\footnotesize{ +\begin{minted}[frame=single,framesep=10pt]{python} +>>>from synpy import * +>>>import synpy.PRS as model +>>>calculate_syncopation(model, "clave.rhy") +{'bars_with_valid_output': [0, 1], + 'mean_syncopation_per_bar': 8.625, + 'model_name': 'PRS', + 'number_of_bars': 2, + 'number_of_bars_not_measured': 0, + 'source': 'clave.rhy', + 'summed_syncopation': 17.25, + 'syncopation_by_bar': [8.625, 8.625]} +\end{minted} +} +\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()} then gives the syncopation results as shown. +\label{ta:example} } +\end{figure} \subsection{Music objects} \label{sec:musicobjects} @@ -37,25 +57,6 @@ \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} ->>>from synpy import * ->>>import synpy.PRS as model ->>>calculate_syncopation(model, "clave.rhy") -{'bars_with_valid_output': [0, 1], - 'mean_syncopation_per_bar': 8.625, - 'model_name': 'PRS', - 'number_of_bars': 2, - 'number_of_bars_not_measured': 0, - 'source': 'clave.rhy', - 'summed_syncopation': 17.25, - 'syncopation_by_bar': [8.625, 8.625]} -\end{minted} -} -\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}
--- a/SMC2015latex/section/introduction.tex Mon Apr 27 13:09:09 2015 +0100 +++ b/SMC2015latex/section/introduction.tex Mon Apr 27 13:10:10 2015 +0100 @@ -3,7 +3,7 @@ Syncopation is a fundamental feature of rhythm in music and a crucial aspect of musical character in many styles and cultures. Having comprehensive models to capture syncopation perception allows us to better understand the broad aspects of music perception. Over the last thirty years, several modelling approaches for syncopation have been developed and heavily used in studies in multiple disciplines~\cite{Fitch_Rosenfeld07, Smith_Honing07, Keller_Schubert11, Madison13, Witek14}. To date, formal investigations on the links between syncopation and music perception subjects such as meter induction, emotion and groove, have largely relied on quantitative measures of syncopation [cites?]. However, until now there has not been a comprehensive reference implementation of the different algorithms available to facilitate quantifying syncopation. -In~\cite{Song14thesis}, Song provides a consolidated mathematical framework and in-depth review of seven widely used syncopation models including: Longuet-Higgins and Lee’s model (LHL)~\cite{LHL84}, Pressing’s model (PRS)~\cite{Pressing97,Pressing93}, Toussaint’s Metric Complexity model (TMC)~\cite{Toussaint02Metrical}, Sioros and Guedes’s model (SG)~\cite{Sioros11,Sioros12}, Keith’s model (KTH)~\cite{Keith91}, Toussaint's off-beatness measure (TOB)~\cite{Toussaint05Offbeatness} and G\’omez et al.'s Weighted Note-to- Beat Distance (WNBD)~\cite{Gomez05}. +In~\cite{Song14thesis}, Song provides a consolidated mathematical framework and in-depth review of seven widely used syncopation models including: Longuet-Higgins and Lee's model (LHL)~\cite{LHL84}, Pressing's model (PRS)~\cite{Pressing97,Pressing93}, Toussaint's Metric Complexity model (TMC)~\cite{Toussaint02Metrical}, Sioros and Guedes's model (SG)~\cite{Sioros11,Sioros12}, Keith's model (KTH)~\cite{Keith91}, Toussaint's off-beatness measure (TOB)~\cite{Toussaint05Offbeatness} and G\'omez et al.'s Weighted Note-to- Beat Distance (WNBD)~\cite{Gomez05}. Based on this mathematical framework, the SynPy toolkit provides implementations of these syncopation models in the Python programming language. XXXXX Key features XXXXX. For ease of input, the SynPy toolkit is able to process standard MIDI files or text annotations of rhythm patterns in an intuitive, simple syntax. It is able to process multiple bars of music, reporting syncopation values bar by bar as well as various descriptive statistics across a whole piece. This toolkit also defines a common interface for syncopation models, which provides a simple plugin architecture for future extensibility.