# Populating the Mix Space: Parametric Methods for Generating Multitrack Audio Mixtures
## 2 Theoretical Framework
### Track Gains
This surface is represented in Figure 2b, which shows the portion of a unit-sphere in positively-unbounded \(\mathbb{R}^{3}\), upon which exist all possible mixes of three tracks. While both the 2-content of \(\mathbb{S}^{2}\) (surface area) and the 3-content of the enclosing \(\mathbb{R}^{3}\), (volume) both, strictly, contain an infinite amount of points, the reduced dimensionality of \(\mathbb{S}^{2}\) makes it a more attractive content to use in optimisation, as \(\mathbb{S}^{2}\) is a subset of \(\mathbb{R}^{3}\) (in this context, _content_ can be considered as \"hypervolume\". See [[http://mathworld.wolfram.com/Content.html](http://mathworld.wolfram.com/Content.html)]([http://mathworld.wolfram.com/Content.html](http://mathworld.wolfram.com/Content.html))). As a consequence, the _mix-space_, \(\phi\), is a more compact representation of audio mixes than the gain-space, \(g\). While the examples so far have used polar and spherical coordinates, for \(n=2\) and \(n=3\) respectively, to extend the concept to any \(n\) dimensions, hyperspherical coordinates are used. The conversion from Cartesian to hyperspherical coordinates is given below in Equation (5). The inverse operation, from hyperspherical to Cartesian, is provided in Equation (6), based on [11]. Here, \(g_{j}\) is the gain of the \(j\)th track out of a total of \(n\) tracks. The angles are represented by \(\phi_{i}\). By convention, \(\phi_{n-1}\) is the equatorial angle, over the range \([0,2\pi)\) radians, while all other angles range over \([0,\pi]\) radians. Figure 2: Graphical representation of three mixes in mix-space. While shown for three tracks, this is generalisable to any number of tracks \(n\), using hyperspherical coordinates. (a) Mix at a point in 3-track gain space. Note that the audio output at points \(p\) and \(p^{\prime}\) is the same ‘mix’, despite the vectors having different lengths in this space; (b) For a 3-track mixture, while the cube (\(\mathbb{R}^{3}\)) represents all outputs of a summing mixer, the surface of the sphere (\(\mathbb{S}^{2}\)) represents all possible mixes. \[r= \sqrt{g_{n}^{2}+g_{n-1}{}^{2}+\cdots+g_{2}{}^{2}+g_{1}{}^{2}}\] \[\phi_{i}= \arccos\frac{g_{i}}{\sqrt{g_{n}{}^{2}+g_{n-1}{}^{2}+\cdots+g_{i}{}^ {2}}}\quad,\text{ where }i=[1,2,\ldots,n-3],i\in\mathbb{Z}\] \[\vdots\] \[\phi_{n-2}= \arccos\frac{g_{n-2}}{\sqrt{g_{n}{}^{2}+g_{n-1}{}^{2}+g_{n-2}{}^ {2}}} \tag{5}\] \[\phi_{n-1}= \begin{cases}\arccos\frac{g_{n-1}}{\sqrt{g_{n}{}^{2}+g_{n-1}{}^{2} }}&g_{n}\geq 0\\ 2\pi-\arccos\frac{g_{n-1}}{\sqrt{g_{n}^{2}+g_{n-1}{}^{2}}}&g_{n}<0\end{cases} \]  
\[g_{1}= r\cos\phi_{1}\] \[g_{j}= r\cos\phi_{j}\prod_{i=1}^{j-1}\sin\phi_{i}\;,\text{ where }j=[2,3,\ldots n-2],j\in\mathbb{Z} \tag{6}\] \[g_{n}= r\prod_{i=1}^{n-1}\sin\phi_{i}\]  
Figure 3 represents a comparable 4-track mixing exercise, as described in [7]. The four audio sources were specifically chosen for this example (vocals, guitar, bass and drums) and assigned to \(g_{1}\), \(g_{2}\), \(g_{3}\) and \(g_{4}\) respectively. Consequently, the set of mixes is represented by a 3-sphere of radius \(r\). Due to the deliberate assignment of tracks in this example, the parameters \(\phi_{1}\), \(\phi_{2}\) and \(\phi_{3}\) represent a set of inter-channel balances which, due to the specific relationships of instruments, have importance to musicians and audio engineers: \(\phi_{3}\) determines the balance of bass to drums, the rhythm section in this case; \(\phi_{2}\) describes the projection of this balance onto the \(g_{2}\) axis, i.e., the blend of guitar to rhythm section, and finally, \(\phi_{1}\) describes the balance of the vocal to this backing track. From here, the parameter space comprising the \(n-1\) angular components of the hyperspherical coordinates of a (\(n-1\))-sphere in a \(n\)-dimensional gain-space, is referred to as a (\(n-1\))-dimensional mix-space. More simply, this can be stated by saying the mix-space is the surface of a hypersphere in gain-space. In the case of music mixing, only the positive values of \(g\) are of interest.