|
5.2.2.5. Noise reduction
Once the frequency magnitude vector has been calculated for each drum hit, noise reduction, if specified, can be performed. This is achieved by multiplying the noise frequency magnitude vector obtained from the last drum by an amount inversely proportional to the relative amplitude of the current drum, and subtracting the noise vector from the current drum vector (see section 3.2.3).
5.2.2.6. Quantisation
This procedure is carried out for each drum, after any noise reduction. It involves the root mean square summation of all frequency magnitudes within each quantisation range. Each value within the frequency magnitude vector is squared and summed into the net input vector for that drum, depending on the frequency range it falls within. The square root of each value within the net input vector is then calculated.
5.2.2.7. Normalisation
The net input vector for each drum is normalised to a maximum value of 1 (by dividing by the peak value), then subtracted by its mean value. All net input vectors should now be of similar magnitude balanced around zero.
5.2.2.8. Flow of control
The pre-processing flow diagram can be seen in figure 8. Some of the process have been decomposed into more detailed charts.
Firstly the quantisation frequency ranges are set. This is dependent on the number of neural net input nodes specified in the header file. Training data that has already been fully processed and quantised, can then be read (if required) to add to the new .rcy files that are about to be read.
Immediately a .rcy file is opened, all relevant fields of the .rcy header are read, giving the length of the following sample data in bytes. This value is used to move the file pointer to the end block (immediately following the sample data) where all edit point data together with the file's sensitivity value is read. This gives the starting position of each drum hit within the file, in order that the sample data can be located and read. The FFT function is then passed the sample data (stored in the array RealIn) and the results used to calculate the frequency magnitude vector (the array freqMag). This process is then repeated for the end portion of the drum in order to obtain the noise frequency magnitude vector (noiseFreqMag), which will be subtracted from the vector of the next drum. Frequency quantisation and normalisation of each drum can now take place.
When the above processes have been carried out for all drum hits in every .rcy file, the complete training or test data will be stored in an array of TrainingVects structs.
An MLP or SOM object is then created, to which this array is passed.
|
|