Transforms the channels of the selected Sound linearly to make them white, i.e. the new channels will be uncorrelated and their variances equal unity.
We start by determining the covariance of the selected sound. Next a principal component analysis determines the eigenvalues and eigenvectors of the covariance matrix. The settings of the variance fraction to keep determines how many eigenvalues and eigenvectors we use for the whitening. This number, p, will also be equal to the number of channels of the resulting whitened sound.
In mathematical terms. For an n-channel sound, if E is the matrix with the eigenvectors and D=diag (d1, d2,..., dn) is the diagonal matrix with the eigenvalues of the covariance matrix, then the whitening matrix is W = ED-1/2E′, where D-1/2=diag (d1-1/2, ..., dp-1/2, 0, ..., 0). Only the p most important eigenvalues have been retained, where p was determined as the smallest integer for which (d1+d2+...dp)/(d1+d2+ ... + dn) >= varianceFractionToKeep.
The resulting sound samples of the whitened sound, wij, are then calculated from the samples of the original sound, skj, as wij = Σk Wik skj, where 1 ≤ i ≤ p, 1 ≤ j ≤ numberOfSamples and 1 ≤ k ≤ n.
© djmw 20120303