5.2.3. Drum ID files

In order that the specific type of each drum is known during the training sessions, an identification file (.drm file) is needed for every .rcy file in the training set. These files are created before training commences, by a process of listening to each of the sampled breaks and aurally identifying each drum hit. The data is then manually entered into a simple piece of file creation code. When the drum ID file is read for a particular break, the global function setTargets() is called, in order to set the target vector for each drum. These vectors are stored in the TrainingVects struct for that break.

5.3. Neural networks

5.3.1. The Multi-Layer Perceptron code

A representation of the Node class and the MLP class can be seen in appendix B.

5.3.1.1.  Network creation and initialisation

The desired neural network is created by linking many Node objects together using objects of the Link class. This takes place in the MLP member functions createNet() and makeLink(). The structure of the network is defined by MLP member variables holding the number of required nodes in each layer. If the second hidden layer or neither of the hidden layers are required, the corresponding variables are set to zero. Each link object holds the value of the connection weight (set to a small random value when instantiated) and the value of the last weight change. All node objects are held in a global array, n.


5.3.1.2.  Forward pass

This takes place in the MLP: :forwardPass() function. An input vector is passed to the function and the values of this vector placed at the outputs of the input nodes. These values are then propagated to the next layer by calling the Node: :forwardProp() function for each input node. The function Node: : calcSigmoid() is called for each node in the subsequent layer before forwardProp() can be called for each of these nodes.