% -----------------------------------------------
% Template for SMC 2012
% adapted from the template for SMC 2011, which was adapted from that of SMC 2010
% -----------------------------------------------

\documentclass{article}
\usepackage{smc2015}
\usepackage{times}
\usepackage{ifpdf}
\usepackage[english]{babel}
\usepackage{cite}
\usepackage{minted}

%%%%%%%%%%%%%%%%%%%%%%%% Some useful packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%% See related documentation %%%%%%%%%%%%%%%%%%%%%%%%%%
%\usepackage{amsmath} % popular packages from Am. Math. Soc. Please use the 
%\usepackage{amssymb} % related math environments (split, subequation, cases,
%\usepackage{amsfonts}% multline, etc.)
%\usepackage{bm}      % Bold Math package, defines the command \bf{}
%\usepackage{paralist}% extended list environments
%%subfig.sty is the modern replacement for subfigure.sty. However, subfig.sty 
%%requires and automatically loads caption.sty which overrides class handling 
%%of captions. To prevent this problem, preload caption.sty with caption=false 
%\usepackage[caption=false]{caption}
%\usepackage[font=footnotesize]{subfig}


%user defined variables
\def\papertitle{SYNPY: A PYTHON TOOLKIT FOR SYNCOPATION MODELLING}
\def\firstauthor{Chunyang Song}
\def\secondauthor{Marcus Pearce}
\def\thirdauthor{Christopher Harte}

% adds the automatic
% Saves a lot of ouptut space in PDF... after conversion with the distiller
% Delete if you cannot get PS fonts working on your system.

% pdf-tex settings: detect automatically if run by latex or pdflatex
\newif\ifpdf
\ifx\pdfoutput\relax
\else
   \ifcase\pdfoutput
      \pdffalse
   \else
      \pdftrue
\fi

\ifpdf % compiling with pdflatex
  \usepackage[pdftex,
    pdftitle={\papertitle},
    pdfauthor={\firstauthor, \secondauthor, \thirdauthor},
    bookmarksnumbered, % use section numbers with bookmarks
    pdfstartview=XYZ % start with zoom=100% instead of full screen; 
                     % especially useful if working with a big screen :-)
   ]{hyperref}
  %\pdfcompresslevel=9

  \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/}}
  \DeclareGraphicsExtensions{.pdf,.jpeg,.png}

  \usepackage[figure,table]{hypcap}

\else % compiling with latex
  \usepackage[dvips,
    bookmarksnumbered, % use section numbers with bookmarks
    pdfstartview=XYZ % start with zoom=100% instead of full screen
  ]{hyperref}  % hyperrefs are active in the pdf file after conversion

  \usepackage[dvips]{epsfig,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/}}
  \DeclareGraphicsExtensions{.eps}

  \usepackage[figure,table]{hypcap}
\fi

%setup the hyperref package - make the links black without a surrounding frame
\hypersetup{
    colorlinks,%
    citecolor=black,%
    filecolor=black,%
    linkcolor=black,%
    urlcolor=black
}


% Title.
% ------
\title{\papertitle}

% Authors
% Please note that submissions are NOT anonymous, therefore 
% authors' names have to be VISIBLE in your manuscript. 
%
% Single address
% To use with only one author or several with the same address
% ---------------
%\oneauthor
%   {\firstauthor} {Affiliation1 \\ %
%     {\tt \href{mailto:author1@smcnetwork.org}{author1@smcnetwork.org}}}

% Two addresses
% --------------
\threeauthors
  {\firstauthor} {Queen Mary, University of London \\ %
    {\tt \href{mailto:dr.chunyang.song@gmail.com}{dr.chunyang.song@gmail.com}}}
    {\secondauthor} {Queen Mary, University of London \\ %
    {\tt \href{mailto:marcus.pearce@qmul.ac.uk}{marcus.pearce@qmul.ac.uk}}}
  {\thirdauthor} {University of York \\ %
    {\tt \href{mailto:christopher.harte@york.ac.uk}{christopher.harte@york.ac.uk}}}

% Three addresses
% --------------
 % \threeauthors
 %   {\firstauthor} {Affiliation1 \\ %
 %     {\tt \href{mailto:author1@smcnetwork.org}{author1@smcnetwork.org}}}
 %   {\secondauthor} {Affiliation2 \\ %
 %     {\tt \href{mailto:author2@smcnetwork.org}{author2@smcnetwork.org}}}
 %   {\thirdauthor} { Affiliation3 \\ %
 %     {\tt \href{mailto:author3@smcnetwork.org}{author3@smcnetwork.org}}}


% ***************************************** the document starts here ***************
\begin{document}
%
\capstartfalse
\maketitle
\capstarttrue
%
\begin{abstract}

talk about a syncopation toolkit

\end{abstract}
%

\section{Introduction}\label{sec:introduction}

% \url{http://www.maynoothuniversity.ie/smc15}.

\input{sections/backgroundLP}


\section{MIDI Input}\label{sec:midi}

\cite{Taylor89MusicTheory}

\section{Text Input}\label{sec:textinput}

\begin{table*}
\small{
\begin{minted}[frame=single,framesep=10pt]{console}
<piece>             ::=  [<comment-lines>] <timesig> <line> | <piece> <line>

<comment-lines>     ::= <comment> "\n" | <comment-lines> <comment> "\n"

<line>              ::= [<barlist>] [<comment>] "\n"

<comment>           ::= "#" <comment-text>

<barlist>           ::= <time-info> | [<time-info>] <bar> | <barlist> <bar>

<time-info>         ::= [<timesig>] [<ticks-per-quarter>] [<tempo>] 

<tempo>             ::= "QPM{" <digits> "}"

<ticks-per-quarter> ::= "TPQ{" <digits> "}"

<timesig>           ::= "T{" <digit> "/" <digit> "}"

<bar>               ::= "V{" <velocity-sequence> "}" | "Y{" <note-sequence> "}"

<note-sequence>     ::= <note> | <note-sequence> "," <note>

<note>              ::= "(" <digits> "," <digits> "," <digits> ")"

<velocity-sequence> ::= <decimal> | <velocity-sequence> "," <decimal>

<decimal>           ::= "0" | "1" | "0." <digits>

<digits>            ::= <digit> | <digits> <digit>

<digit>             ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
\end{minted}
}
\caption{Syntax of rhythm text format Backus-Naur Form}
\label{ta:BNF} 
\end{table*}


\begin{table}
\footnotesize{
\begin{minted}[frame=single,framesep=10pt]{python}
T{4/4} # time signature
TPQ{4} # ticks per quarternote
# Bar 1
Y{(0,3,2),(3,1,1),(6,2,2),(10,2,1),(12,4,1)}
# Bar 2
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 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.}
\label{ta:clave} 
\end{table}


\begin{table}
\footnotesize{
\begin{minted}[frame=single,framesep=10pt]{python}
>>>from syncopation import *
>>>import 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{Syntax of rhythm text format Backus-Naur Form}
\label{ta:clave} 
\end{table}





% \section{Page size and format}\label{sec:page_size}

% \begin{equation}
% E=mc^{2+\delta}.
% \label{eq:Emc2}
% \end{equation}
% Refer to equations like so:
% As (\ref{eq:Emc2}) shows, 
% I do not completely trust Special Relativity.

% \subsection{Figures, Tables and Captions}
% \begin{table}[t]
%  \begin{center}
%  \begin{tabular}{|l|l|}
%   \hline
%   String value & Numeric value \\
%   \hline
%   Hej SMC  & 2015 \\
%   \hline
%  \end{tabular}
% \end{center}
%  \caption{Table captions should be placed below the table, exactly like this,
%  but using words different from these.}
%  \label{tab:example}
% \end{table}



% Always refer to tables and figures in the main text, for example:
% see Fig. \ref{fig:example} and \tabref{tab:example}.
% Figures and tables may extend across both columns to a maximum width of 17.2cm.



% \begin{figure}[t]
% \centering
% \includegraphics[width=0.6\columnwidth]{figure}
% \caption{Figure captions should be placed below the figure, 
% exactly like this.
% When you come to SMC2015, you will 
% understand why there is a large hand
% planted atop Copenhagen.\label{fig:example}}
% \end{figure}







\section{Conclusions}

some conclusions

%
\begin{acknowledgments}
You may acknowledge people, projects, 
funding agencies, etc. 
which can be included after the second-level heading
``Acknowledgments'' (with no numbering).
\end{acknowledgments} 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%bibliography here
\bibliography{csong.bib}

\end{document}
