diff options
author | André Nusser <andre.nusser@googlemail.com> | 2020-02-03 09:35:08 +0100 |
---|---|---|
committer | André Nusser <andre.nusser@googlemail.com> | 2020-02-03 09:35:08 +0100 |
commit | cb4f358ffaf86759b788db07a4d56e5d965b0aa1 (patch) | |
tree | 17e0a2ba38b7bcbf15ac7413964242bffd2d3907 | |
parent | 3ef15a3cc62d7f4c361d04d15c5b97be030f7581 (diff) |
Clarify setting.
-rw-r--r-- | sampling_alg_lac2020/LAC-20.tex | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sampling_alg_lac2020/LAC-20.tex b/sampling_alg_lac2020/LAC-20.tex index 7ee146d..8a56d1f 100644 --- a/sampling_alg_lac2020/LAC-20.tex +++ b/sampling_alg_lac2020/LAC-20.tex @@ -335,7 +335,16 @@ To the best of our knowledge, this is the first academic article that deals with \todobent{Talk about how the drum kit samples are usually created; very briefly.} \todobent{Talk about loudness computation of samples.} \todo{Mathematical basics (if there are any important ones).} + \todo{Formalize the setting, i.e.\ what is the input/output of our algorithm?} +\subsection{Setting} +We now describe the setting in which we want to choose the samples. We are given: +\begin{itemize} + \item a drum kit consisting of a set of instruments $I$ + \item for each instrument $i \in I$, we are given an input sample set $S_i$ + \item each sample $s \in S_i$ is already labeled with a power value $p_s \in \mathbb{R}^+$ +\end{itemize} +After reading the drum kit, requests of the form $(i, p) \in I \times \mathbb{R}^+$ arrive. We want to answer these requests by choosing the best sample from $S_i$ for the power value $p$. % \todoandre{Make terminology and notation clear and check for consistency in the document.} \subsection{Notation and Terminology} @@ -398,11 +407,11 @@ just adds some noise to the process to make it non-deterministic and thus avoid We already explained the core part of the sample selection algorithm. The remainder is now straight-forward. We simply evaluate the objective function for each sample and then pick the one with the smallest value. For completeness, Algorithm \ref{alg:sampling} shows the pseudo code for the sample selection algorithm. \begin{algorithm} \begin{algorithmic} - \Require Requested power $p$, Instrument $I$, current time step $t$, parameters $\alpha, \beta, \gamma$, and array $\mathit{last}$ with the time points a sample has been played last + \Require Requested power $p$, Instrument $i$, current time step $t$, parameters $\alpha, \beta, \gamma$, and array $\mathit{last}$ with the time points a sample has been played last \Ensure Sample $s$ \State $s = \text{undefined}$ \State $f_{\min} = \infty$ - \For{$s' \in \{ s'' \mid s'' \text{ is sample of instrument }I\}$} + \For{$s' \in S_i$} \State $v \gets \alpha \cdot \left( \frac{p-p_{s'}}{p_{\max} - p_{\min}}\right)^2 + \beta \cdot \left( 1 + \frac{t - \mathit{last}[s']}{S}\right)^{-1} + \gamma \cdot r(s',t)$ \If{$v < f_{\min}$} \State $f_{\min} \gets v$ |