## 3 GP Sound Synthesis
### Generating Waveatables with GPs  
In wavetable synthesis [3], a single period of a sound is stored in memory. In order to synthesize the sound at a certain pitch, the wavetable is cyclically read out at the corresponding rate. Here, the wavetable is generated by sampling equidistantly from a GP in the interval \([0,2\pi]\) at \(N\) points \(\frac{P}{N}2\pi\) for \(p=0\ldots N-1\). Often, but not always, there is a distinct jump between the last (\(p=N-1\)) and the first sample point (\(p=0\)). This is also visible in Figure 1, where most graphs end at a different value than they started. A wavetable with such a sudden jump produces a sound with a considerable amount of energy throughout all harmonics. By chance, a few of the graphs in Figure 1 are continuous at the boundary: i.e., the last and the first point are close. For such wavetables, the spectrum of the sound contains considerably less energy in the higher harmonics. The energy in  
Figure 3: Five samples drawn from the posterior, conditioned on a noise-free observation at x = 5, y = 0 (squared exponential kernel, length-scale \(\ell=1\)). Note that all samples pass through that point. the harmonics thus depends on the actual shape of the graph at the boundary. This is not controllable by choosing the kernel and its parameters. To overcome this problem, GP regression is used to ensure that the graph passes through \((0,0)\) and \((2\pi,0)\). As mentioned above, N points \(p=0\ldots N-1\) are used to construct the wavetable. We add another point and use it to ensure that the graph passes through \((2\pi,0)\). This last point is discarded in the wavetable, where only the points \(p=0\ldots N-1\) are used. Figure 4 illustrates the effect of this approach. Another way to address the continuity at the boundary is to use periodic kernels. An example is the standard periodic kernel [13]  
\[k(x_{1},x_{2})=\theta_{1}\exp\left[-\frac{1}{2}\left(\frac{\sin(\frac{\pi}{ \lambda}(x_{1}-x_{2}))}{l}\right)^{2}\right]\]  
with periodicity parameter \(\lambda\) and length-scale parameter \(\ell\). By choosing \(\lambda\) appropriately, it is ensured that the generated graph has a period of \(2\pi\) so that the wavetable is continuous at the boundary as required. In this case, it is not necessary to resort to GP regression. Other options are the periodic kernels of the Matern class [14]. Ultimately, we used the kernels listed in Table 1 for sound synthesis. The spectrum of the sound generated with the aforementioned wavetables shows variation. Some kernels generate smoother functions than others: compare, for example, the curves generated from the squared exponential kernel (a kernel that is differentiable infinitely many times) with the ones created with the 1-exponential in Figure 1. The spectrum differs accordingly, with markedly more energy in the higher frequencies for the wavetables created with the 1-exponential as long as the length-scales are similar. As the length-scale controls how rapidly the graph fluctuates, lower length-scales produce wavetables with higher spectral content (see also Figure 4, right). As described in Section 2, new kernels can be created from existing kernels, for example, by adding or multiplying two existing kernels. This adds further variety to the generated sounds. It is a well-known fact from psychoacoustics that the human perception of loudness depends on the spectral content of the sound [15] (ch. 8). Therefore, the loudness was calculated according to db(B) weighting for a synthesized middle C note. The sound was then normalized to a fixed reference loudness. After normalizing, it can occur that some sample points in the wavetable exceed  
Figure 4: Spectrograms of GP wavetable synthesis with a squared exponential kernel. The length-scale is increased 10 times. (**left**) Without GP regression, there is usually more energy in the higher harmonics at smaller length-scales.