## 2 Background  
A Gaussian Process (GP) [12] is a set of random variables \((Z_{x}:x\in S)\) such that for all \(n\in\mathbb{N}\) and for all \(x_{1},\ldots,x_{n}\in S\), the vector \((Z_{x_{1}},\ldots,Z_{x_{n}})\) forms a multivariate Gaussian. GPs are usually constructed by defining a mean function \(\mu\) such that \(\mathbb{E}[Z_{x}]=\mu(x)\) and a covariance function \(k\) such that \(Cov(Z_{x_{1}},Z_{x_{2}})=k(x_{1},x_{2})\). It is sufficient to define the pairwise covariances since this yields the full covariance matrix:  
\[\Sigma=\quad \begin{pmatrix}k(x_{1},x_{1})&\ldots&k(x_{1},x_{n})\\ \vdots&\ddots&\vdots\\ k(x_{n},x_{1})&\ldots&k(x_{n},x_{n})\end{pmatrix} \]  
The mean and covariance function defines a multivariate Gaussian on every finite subset of n points. Given a mean and a covariance function (which is commonly called a kernel), it is possible to sample from the Gaussian process. First, one chooses for which points of the set \(S\) to sample. For example, if \(S=[0,1]\), then one could sample 100 equidistant points: 0, 0.01, 0.02..., 0.99. Then, the covariance matrix is constructed by evaluating the kernel for each pair. In our example, the covariance matrix would be  
\[\Sigma=\quad \begin{pmatrix}k(0,0)&k(0,0.01)&\ldots&k(0,0.99)\\ \vdots&\vdots&\ddots&\vdots\\ k(0.99,0)&k(0.99,0.01)&\ldots&k(0.99,0.99)\end{pmatrix} \]A mean function also has to be defined. In practice, one often just uses a zero mean. A zero mean function is also used in GP sound synthesis (see Section 3). With a given mean vector \(\mu\) and the covariance matrix \(\Sigma\), it is possible to sample from a multivariate Gaussian \(\mathcal{N}(\mu,\Sigma)\) with the following procedure:  
1. Compute the Cholesky decomposition of \(\Sigma=AA^{T}\). This takes \(O(n^{3})\) of computation, where n is the size of the square matrix \(\Sigma\). 2. Create a vector \(z=(z_{1},z_{2},\dots,z_{n})\), where the \(z_{i}\) values are drawn independently from a standard normal distribution. This takes \(O(n)\) of computation. 3. Compute the sample \(s=\mu+Az\). This takes \(O(n^{2})\) of computation because of the matrix-vector multiplication. Note that step 1 is the most expensive step. When drawing multiple samples from the same multivariate Gaussian distribution, it is possible to reduce computational complexity considerably by computing the matrix \(A\) only once and reusing it. The remaining steps have a total computational complexity of only \(O(n^{2})\). In GP sound synthesis, this optimization allows for more quickly generating multiple samples from the same GP. In order to be a valid kernel, the function \(k\) has to be positive semidefinite. This means that for all \(x_{1},\dots x_{n}\in S\), the matrix \(\Sigma\) has to be symmetric and positive semidefinite (\(u^{T}\Sigma u\geq 0\), for all vectors \(u\in\mathbb{R}^{n}\)). Some commonly used kernels are [12] (ch. 4)  
* The squared exponential: \(k(r)=exp(-\frac{r}{2\ell^{2}})\), with length-scale parameter \(\ell>0\). \(r=|x_{1}-x_{2}|\) is the distance between \(x_{1}\) and \(x_{2}\). * The Matern: \(k(r)=\frac{2^{1-v}}{\Gamma(v)}(\frac{\sqrt{2v}r}{\ell})^{v}K_{v}(\frac{\sqrt{ 2v}}{\ell})\), with parameter \(v\). \(K_{v}\) is a modified Bessel function. \(\Gamma(v)\) is the gamma function. The expression simplifies for \(v=\
icefrac{{1}}{{2}},\
icefrac{{3}}{{2}}\) and \(\
icefrac{{5}}{{2}}\). * The Ornstein-Uhlenbeck process, which is a special case of the Matern class, with \(v=\
icefrac{{1}}{{2}}\). * The gamma-exponential: \(k(r)=exp(-(r/\ell)^{\gamma})\), for \(0<\gamma\leq 2\). * The rational quadratic: \(k(r)=(1+\frac{r^{2}}{2\alpha\ell^{2}})^{-\alpha}\), with parameter \(\alpha>0\). * The polynomial: \(k(x_{1},x_{2})=(x_{1}x_{2}^{T}+\sigma)^{p}\), with parameters \(\sigma\geq 0\) and \(p\). The kernels that we used for sound synthesis (see Section 3) are listed in Table 1. Figure 1 shows samples from GPs defined with different kernel functions. Many kernels have length-scale parameter \(\ell\), as introduced above in the formulas of the kernel functions.