## 5 Beating Analysis
### Results (Beating Analysis)  
An example of the plots generated can be seen in Figure 4. Each column refers to a single partial. The top graphs show the time domain signal, the middle graphs are the envelope functions that have been processed. Finally, the bottom graphs show the spectrum of the envelope, which reveals the beat frequencies. The plots are made for two methods of processing the envelope: subtracting the decay function and dividing the decay function. In the example in Figure 4, it can be seen that the envelope function post processing gives a good impression of the amplitude modulation in the original signal. Although the spectrum of this envelope does not have sharp peaks, the beating value can still be found as the global maxima in the plotted frequency range. For the first set of matching partials, it is about six beats per second, and for the second set it is about three beats per second. The third set of matching partials has a very noisy signal with no obvious beating rate. Thus the frequency spectrum is more or less flat. These results correspond to the quality of tuning, with smaller values for number of beats being the goal. One slight problem with this approach is that the ideal envelope function is not a sine wave but a rectified sine wave. This is one reason why the peaks in the magnitude spectrum are not very sharp. Other windows were also tried, but it seems that rectangular window are the most appropriate for our requirements as they have the narrowest main lobe (sharpest spectrum), despite having relatively high amplitudes for the side lobes. Figure 4: Plots obtained for analysis of beats for the tones Bb6 (being tuned) and Bb5 showing for each matching partial (top row) the bandpassed signal in time domain, (middle) the processed envelope function by subtracting the exponential decay function and by dividing by the exponential function, and (bottom row) the magnitude spectrum of the envelope (processed both ways), from which the frequency of beating can be found by finding the peak. Another interesting result that was noticed was that, in general, the beat frequency increased linearly with the partial number of the higher tone being matched. This can be seen clearly in Figure 5. This result is expected as the frequency of the partial increases as the inharmonicity causes the partials to get farther apart. Despite this being the case, it is also seen that due to the increasing inharmonicity with key number, it is sometimes possible to match both the first and second set of partials almost exactly, which is in line with previous studies [13]. Although the beats were plotted for three sets of matching partials, this can be extended to include as many partials as required. It was noticed that for high tones, the beating of the third set of matching partials is very insignificant compared to the previous two. In a lot of cases, the amplitude of the signal corresponding to the third set of matching partials was so low that the ambient noise in the recording, which is actually very low, becomes significant in comparison. In these cases it is very difficult to plot the beating rate. However, it is also unnecessary because when the amplitude is so low, then the beating could not be heard either. Thus, analysis using the first two sets of matching partials is actually enough. Although the results seem very promising, they are not perfect. In some cases, there are two peaks of almost the same height and so both must be considered. Secondly, the reason that the spectrum is plotted for the signal processed in two different ways is that in a few cases, one method seemed to provide better results, while in some others, the other method appeared to be better. However, both methods seem to provide the same maxima for most tones. Overall, dividing the envelope with the exponential function gives a better result. However, sometimes the amplitude of the envelope seems to grow with time as the exponential function does not fit perfectly. This creates an unrealistic result for the beating rate.