summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2018-08-20 23:23:06 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2018-08-20 23:23:06 +0200
commit8fee5f04deedfb90e68195e90d23c66a2a56433a (patch)
tree4945d59aa777fb90832a25bb1bdd5f96c02b6cd8
Some initial work in progress version.
-rw-r--r--.gitignore5
-rw-r--r--Makefile2
-rw-r--r--sampling_alg.bib5
-rw-r--r--sampling_alg.tex132
4 files changed, 144 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e4bcb8a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+sampling_alg.aux
+sampling_alg.bbl
+sampling_alg.blg
+sampling_alg.log
+sampling_alg.pdf
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..81205dc
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,2 @@
+all:
+ bibtex sampling_alg || pdflatex sampling_alg.tex
diff --git a/sampling_alg.bib b/sampling_alg.bib
new file mode 100644
index 0000000..9247ddb
--- /dev/null
+++ b/sampling_alg.bib
@@ -0,0 +1,5 @@
+@inproceedings{Guy:17,
+ author = {One Guy},
+ TITLE = {Fancy Title},
+ year = {2017},
+}
diff --git a/sampling_alg.tex b/sampling_alg.tex
new file mode 100644
index 0000000..0fe08df
--- /dev/null
+++ b/sampling_alg.tex
@@ -0,0 +1,132 @@
+\documentclass[12pt]{article}
+% For utf8 encoding
+\usepackage[utf8]{inputenc}
+
+% Use for automatic line breaks in tabular (column type X)
+\usepackage{tabularx}
+% For abbreviations using \newcommand
+\usepackage{xspace}
+% For the >{...} in tabular
+\usepackage{array}
+% For t o d o notes. Make the background white to make them not that distracting.
+\usepackage[textwidth=3.5cm,color=white]{todonotes}
+% For better cite commands
+\usepackage[numbers]{natbib}
+% math stuff
+\usepackage{amsmath,amsthm,amssymb}
+\usepackage{mathtools}
+\usepackage{nicefrac}
+\usepackage{csquotes}
+% Comment in the next line to draw frames around all the layout boxes for checking where they are violated.
+%\usepackage{showframe}
+
+% nice theorem and proof environments. taken from Ema's template
+\theoremstyle{plain}
+\newtheorem{theorem}{Theorem}
+\newtheorem{proposition}{Proposition}
+\newtheorem{lemma}{Lemma}
+\newtheorem{corollary}{Corollary}
+\newtheorem{claim}{Claim}
+\newtheorem{fact}{Fact}
+
+\theoremstyle{definition}
+\newtheorem{definition}{Definition}
+\newtheorem{example}{Example}
+
+\theoremstyle{remark}
+\newtheorem{remark}{Remark}
+\newtheorem{observation}{Observation}
+\newtheorem{conjecture}{Conjecture}
+
+% Handy abbreviations
+\newcommand{\whp}[0]{w.h.p.\xspace}
+\newcommand{\ie}[0]{i.e.\xspace}
+\newcommand{\wrt}[0]{w.r.t.\xspace}
+
+% \abs and \norm hacks
+\DeclarePairedDelimiter\abs{\lvert}{\rvert}
+\makeatletter
+\let\oldabs\abs
+\def\abs{\@ifstar{\oldabs}{\oldabs*}}
+\let\oldnorm\norm
+\def\norm{\@ifstar{\oldnorm}{\oldnorm*}}
+\makeatother
+
+%%%%%%%%%%%%%%%%%%%%%
+% End of the header %
+%%%%%%%%%%%%%%%%%%%%%
+
+\title{Sampling Algorithms for DrumGizmo}
+\author{
+ André Nusser
+ \and
+ Bent Bisballe Nyeng
+}
+\date{\today}
+
+\begin{document}
+\maketitle
+
+\begin{abstract}
+\noindent
+This paper suggests new sampling algorithms for DrumGizmo. First the requirements and certain problematic special cases are formulated and then several approaches are explored and turned into sample selection algorithms.
+\end{abstract}
+
+\section{Introduction}
+Introduce DrumGizmo. Sample selection is one of the core parts of DrumGizmo as it heavily influences how \enquote{robotic} DrumGizmo sounds. What is sample selection (only consider it for one instrument)?
+
+\subsection{Terminology}
+\begin{description}
+\item[Sample:] One hit on the instrument.
+\item[Power:] Every sample has a certain power which is given by its audio \todo{how exactly is it currently measured?}.
+\end{description}
+
+\subsection{Sample Distribution in our Drum Kits}
+
+\subsection{Current Algorithm of DrumGizmo}
+The current sample selection algorithm of DrumGizmo works as follows. The engine gets a value $l \in [0,1]$ which gives the strength of the sample to be triggered. The power values of a drum kit are floating point numbers without any restriction\todo{do they have to be positive?}. Then the value $l$ is mapped using the canonical bijections between $[0,1]$ and $[p_{\min}, p_{max}]$ and afterwards shifted\todo{by which amount?}. We call this new value $p$.
+
+Now the real sample selection algorithm starts. We select a value $p'$ drawn uniformly at random from $\mathcal{N}(p', \sigma^2)$, where $\sigma$ is a parameter specified by the user. Now we simply find the sample $s$ with the power $q$ which is closest to $p'$ -- ties are broken such that the first minimal value is chosen (which is problematic as explained below). In case $s$ is equal to the last sample that we played we repeat this process, otherwise we return $s$. If we did not find another sample than the last played after $4$ iterations, we just return the last played sample.
+
+\subsection{Drawbacks}
+I will list a number of drawbacks of this algorithm in the following. These will be an inspiration for the requirements that are formulated later.
+
+\paragraph{Equal Powers.} In case certain samples have the same power value. Always the first of them in the list of samples is chosen because of the way we break ties. This is obviously wrong and samples should instead be chosen either in a random way or, probably better, in a round robin way.
+
+\paragraph{Middle Samples.} Consider the case where there are 3 samples which almost have the same power value, and especially consider the sample which has the power value in the middle. This sample has a very low probability of being chosen by the current algorithm as it always chooses the closest sample. However, the range for which this sample is the closest sample is very small. Thus, an improved algorithm has to be robust to such small perturbations of power values.
+
+\paragraph{Unequal Probabilities.} More generally, we want that samples which are close, should have a similar probability of being chosen by the sampling algorithm (summed over all possible values of $l$).
+
+\paragraph{History of Size One.} Currently, we only remember the last sample that was played. This seriously limits us to select samples well. Imagine that there are several samples of similar power. We currently rely on the normal distribution solving this, even though using round robin like sampling would result in more diverse samples being chosen while not deviating significantly more from $l$.
+
+\subsection{Related Work}
+Velocity Layers. Round Robin and Random Selection.\todo{Is there actually any academic related work? What is actually the mathematical problem that we are trying to solve?}
+
+\section{Requirements}
+\subsection{Pseudo Normal Distribution}
+\subsection{Round Robin for Specific Cases}
+\subsection{Modification to Round Robin}
+If all powers are the same we probably still want some randomness to avoid getting patterns of the length of the round robin cycle.
+\subsection{No Staircase Effect}
+\subsection{Equal Probability}
+This means that all samples have almost equal probability of being played as their neighboring samples.
+% \section{Problematic Special Cases}
+% \subsection{Same Power Values}
+% \subsection{Middle Samples}
+% \subsection{I'm sure there are more\dots}
+
+\section{Suggested Algorithms}
+\subsection{Resampling}
+\subsection{Objective Function}
+
+\section{Experiments}
+\subsection{Methods of Evaluation}
+\subsection{Experimental Evaluation}
+
+\section{Conclusion}
+What is the best algorithm and why?
+
+% \bibliographystyle{abbrvnat}
+% \bibliography{\jobname}
+
+\end{document}