5.3.4. Weight (.wgt) files

The weights of each network type can be saved or loaded via files of type .wgt. These files are created and read by the functions loadWeights() and saveWeights(), defined within both the MLP and SOM classes. The exact structure of each  network type is also contained within these files. If a network tries to read a .wgt file of conflicting structure, an error message is indicated and the program exits. 

5.4. Post classification

Post classification takes place after drum identification and is carried out on a break as a whole. It performs three tasks, namely:-

  • In the case of the MLP networks, making sense of unlikely multiple classifications

  • Deciding which of the drum hits within the break are 'soft' hits

  • Placing the drum types conga and tom into pitch groups

  • Numbering each drum as a specific type in order to place into the universal drum map (see section 1.5.2)


5.4.1. Dealing with multi-classifications from the MLP networks

The MLPs used in this project have an output node representing each of the five major drum types, and in as much it is possible that an input pattern may give rise to any or all of these nodes being high at the same time. These combinations (referred to here as multi-classifications), would represent a combination of drum types within one hit. Thus the following scenarios may occur: a) the network could correctly classify one hit as a combination of different drum types or b) the network could misclassify a single drum as a drum combination. In the case of a), if the correctly classified combination is not one of the officially recognised types (see section 3.6.1
) then a mostly likely classification type must be decided. In the case of b) where the occurrence of many drum types in one hit is unlikely, the output node of highest value is used to decide the type.
The decision tree is shown in figure 10a


5.4.2. Identifying soft hits

The identification of soft hits (see section 3.6.1
) is implemented in the global function placePitchAndAmplitude(). The loudest instance of each of the kick, snare and hat types are found within the break in question. All instances of each of these types are passed through again and if the amplitude of the drum hit is under a certain threshold, the hit is defined as a soft hit. The threshold for each drum type is calculated as the loudest instance of that drum type multiplied by the soft hit threshold (a value nominally set to 0.6). The type of the drum as classified by the neural network is changed to its corresponding soft hit type (see section 3.6.2).