From 6be6f40b0eb5ce03aea60e2015e308457f78636e Mon Sep 17 00:00:00 2001
From: Bent Bisballe Nyeng <deva@aasimon.org>
Date: Sun, 2 Feb 2020 20:30:47 +0100
Subject: Initial thoughts on previous algorithms.

---
 sampling_alg_lac2020/LAC-20.tex | 47 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

(limited to 'sampling_alg_lac2020/LAC-20.tex')

diff --git a/sampling_alg_lac2020/LAC-20.tex b/sampling_alg_lac2020/LAC-20.tex
index 1042e66..9757e7a 100644
--- a/sampling_alg_lac2020/LAC-20.tex
+++ b/sampling_alg_lac2020/LAC-20.tex
@@ -277,8 +277,55 @@
 
 \subsection{Related Work}
 \todo{I don't really know what to write, except about round robin. Is there any other common method or any academic literature? Are there other methods in open source programs?}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
 \todobent{Discuss DGs old sampling algorithm briefly.}
 
+The evolution of the DrumGizmo sample selection engine:
+
+ * Velocity groups with probabilities for randomization.
+
+The early versions of drumgizmo used a sample selection algorithm
+based on grouping of samples, each with a corresponding velocity
+range, with a number of audio files, each with a probability of being
+played in the group:
+\begin{verbatim}
+                   ________________                _________________
+                  /                \              / uniformly random \
+-- input note --> | group selector | -- group --> | sample selector  | -- sample -->
+     [0; 1]       \________________/              \__________________/
+\end{verbatim}
+
+\todobent{Write this algorithm in psudocode syntax.}
+
+ * StdDev/Mean based using measured power values of each sample
+
+Later a new algorithm was created using a normal distributed random
+number for the sample selection with the mean controlled by the input
+velocity and the stddev calculated on the number of samples in the
+instrument as well as their power span.
+\begin{verbatim}
+           stddev
+                 \ ________                _________________
+                  /        \              /  nearest power  \
+-- input note --> | random | -- power --> | sample selector | -- sample -->
+     [0; 1]       \________/              \_________________/
+\end{verbatim}
+In order to make this new algorithm the power of each note must be
+specified in the instrument data.
+
+\todobent{Again, write this algorithm in psudocode syntax.}
+
+
+In both algorithms, to prevent the same sample to be selected twice in a row, a
+re-selection is being performed whenever the selected sample is the
+same as the last one selected up to a maximum number of times.
+This is being stored per instrument.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
 \subsection{Our Contribution}
 To the best of our knowledge, this is the first academic article that deals with the issue of selecting samples from a set of samples with \enquote{continuous power values}. To this end, we first identify important aspects that sampling algorithms in this setting have to fulfill. After we formulate those requirements and formalize them to some degree, we present our algorithm based on those requirements, which is based on computation of a multi-criteria objective function. Consequently, we give an overview over an implementation of this approach and then conduct experiments to evaluate the actual quality. As reference implementation, we use the old method by DrumGizmo -- an open source drum machine.
 
-- 
cgit v1.2.3

