9. Testing
9.2 Parameter Evaluation – Beat Detection Algorithm
9.2.1 Size of Instant Energy
Varying the size of the instant energy buffer will affect the BPM result. A range of instant energy sizes were tested with six songs.
Table 7: Effect of instant energy size on beat detection Size of
An instant energy size of 512 samples consistently gives the closest BPM result, this size is used in the final implementation. However, for the Chakra song, an instant energy of 256 samples gave a closer result to the actual BPM value.
9.2.2 Size of Average Energy
The size of the average energy buffer corresponds to how much of the song we compare the instant energy to.
Table 8: Effect of average energy size on beat detection
Size of
44032 is chosen as the value for this parameter in the final implementation because
day to day use of the program. This corresponds to just less than one second of audio data. The size of 22016 samples does identify the BPM of the Chakra, Sasha and William Orbit songs more closely, but not by much.
9.2.3 Beat Interval
The beat interval is the minimum time that must elapse between adjacent beats. Without this interval, beats are detected far too frequently.
all of which are counted as separate beats if we do not separate The following diagrams illustrate the
Sweetness. The vertical green lines show where the beats are detected. The first is with the beat interval set at 50ms, you can see that beats are being detected too close to each other, especially at the beginning.
In the second waveform, with the beat interval set at 350ms, the beats are being detected at the correct onset of the beat and at regular intervals.
Table 9: Effect of beat interval size on beat detection
Beat
350ms is chosen as the most suitable beat interval for separating
small a leads to a very high BPM, whereas using a value that is too long begins to cancel out actual beats
Figure 33: Too many beats detected with 50ms beat interval
Figure 34: Beats being detected correctly with beat interval of 350ms
44032 is chosen as the value for this parameter in the final implementation because it performed . This corresponds to just less than one second of audio data. The size of 22016 samples does identify the BPM of the Chakra, Sasha and William Orbit songs more closely, but not
al is the minimum time that must elapse between adjacent beats. Without this interval, beats are detected far too frequently. This is because a beat may consist of many peaks in the waveform, all of which are counted as separate beats if we do not separate them up using a minimum gap value.
The following diagrams illustrate the problem; they are both waveform images of the start of Xstasia Sweetness. The vertical green lines show where the beats are detected. The first is with the beat interval
s, you can see that beats are being detected too close to each other, especially at the beginning.
In the second waveform, with the beat interval set at 350ms, the beats are being detected at the correct onset of the beat and at regular intervals.
: Effect of beat interval size on beat detection Chakra -
350ms is chosen as the most suitable beat interval for separating out adjacent beats. Using
small a leads to a very high BPM, whereas using a value that is too long begins to cancel out actual beats
: Too many beats detected with 50ms beat interval
Beats being detected correctly with beat interval of 350ms
it performed well in . This corresponds to just less than one second of audio data. The size of 22016 samples does identify the BPM of the Chakra, Sasha and William Orbit songs more closely, but not
al is the minimum time that must elapse between adjacent beats. Without this interval, This is because a beat may consist of many peaks in the waveform,
them up using a minimum gap value.
they are both waveform images of the start of Xstasia – Sweetness. The vertical green lines show where the beats are detected. The first is with the beat interval
s, you can see that beats are being detected too close to each other, especially at the beginning.
In the second waveform, with the beat interval set at 350ms, the beats are being detected at the correct
Orbit - small a leads to a very high BPM, whereas using a value that is too long begins to cancel out actual beats
9.2.4 Low Pass Filtering
The idea behind low pass filtering the signal is to remove high frequencies and focus on the low frequencies which we assume dictate the beat of a typical dance music track. This also should help to smooth the waveform so that extra peaks surrounding a beat are not detected as separate beats, as illustrated above.
Table 10: Effect of applying a low pass filter on beat detection
Low Pass
Applying the low pass filter did not affect the results that much. If anything it reduced the quality of the BPM estimate. In the final implementation I decided not to use a low pass filter.