A A A Volume : 43 Part : 2 Proceedings of the Institute of Acoustics SINE-SWEEP MEASUREMENT SOFTWARE FOR ANDROID AND IOS APPS ECOSYSTEMS Dominic Griffiths, Portsmouth University Ludovico Ausiello, Portsmouth University 1. ABSTRACT The estimation and retrieval of impulse responses is of paramount importance in audio engineering, with applications ranging from loudspeakers R&D and quality control, to the study of acoustic musical instruments. The Sine-Sweep technique presented by Farina in 2000 is an established standard. The equipment necessary to perform it is still expensive, consisting of many components, including at least; a computer, an audio interface, and one or more microphones and actuators. To make such method more appealing to professionals and learners, a logical step is to make an equivalent ISO compliant sine-sweep measurement software available on portable devices. Recent advancements of smartphones show they provide high computational power and enhanced capabilities in terms of RAM and storage, meaning they can easily replace a computer for running applications. Depending on the amount of acoustic power required, a portable device can be connected to an external amplifier to drive a large actuator, or can directly feed a small actuator, which could be the case when testing guitar soundboards with a small exciter. 2. INTRODUCTION The acoustic frequency response and impulse response of loudspeakers can be measured using a variety of commercially available applications; in the field of musical instrument measurements there is not as wide variety of choices to use. Therefore, this poses an opportunity to produce an application and user interface for smartphones/portable devices that will implement techniques, such as the sine- sweep method (Farina, 2007), to accurately measure the frequency response and impulse response of a musical instrument. To ensure accuracy within the testing, an external actuator and sensor will be connected to the device, while the impulse response and corresponding frequency response can be measured and displayed within the app environment. This set up it will allow users to benefit from a cheap and simple measurement system offering some of the features of more expensive equipment. The objectives of this project include building the application and user interface that will allow the user to enter variables to control aspects of the sine sweep. These variables include but are not limited to the start frequency of the sine-sweep, the end frequency of the sine-sweep and duration of the sine- sweep. Once the variables of the sine-sweep (or other testing methods within the application) have been set, the test-stimulus will be played through an exciter coil attached to the soundboard/bridge. The application will record the acoustic output of the Device Under Test (DUT) using a strategically located external microphone (Ausiello, 2018). Once this signal is recorded, the application will display information graphically, and will have the option to export data to be used in another contexts, such as a Digital Audio Workstation, for further analysis. The exciter will either be a commercially available one or, ideally, a new design tailored to perform the required measurements (for example one with a very low mass to minimise the impact on the resonances of the soundboard) on a musical instrument. The application will offer users multiple options of measurements (for example, sine-sweep, pink noise and impulse response) and also provide the capability to compare previous tests that have been stored within the application. The ability to save data will have two options. Option 1, store internally within the application and Option 2, exporting the data to an external database. The ability to export the collected data in multiple formats will allow for the contribution to an online database of guitar impulse responses. Vol.43.Pt.2. 2021 Proceedings of the Institute of Acoustics In section 2 we will begin by discussing how the impulse response will be gathered and then discuss how such method could be implemented in musical instrument measurements in section 3. Once we have established how we propose to set up the testing methods, in section 4 we will explore the layout of the application and show where all the functions are found within it. With the application layout established, in section 5 we will then discuss the validation phase of the application and comment upon the results. 3. IMPULSE RESPONSE The sine sweep method, as depicted by Farina (Farina, 2000), is crucial in the testing element of this application. The exponential sine sweep (ESS) is a stimulus of constant amplitude used to excite the DUT, coupled with a convolution process. While the stimulus is injected into the DUT, its corresponding output (in the case of a musical instrument, an acoustic signal in the form of sound pressure) is simultaneously recorded. To obtain the impulse response of the DUT, we must implement an inverse filter that must be convolved with the output signal of the DUT (Farina, 2000). Despite the fact that the ESS has a constant amplitude, since it spends a greater duration of time at lower frequencies, it has a sloped spectrum. Accordingly, when implementing the reverse filter, we must counter-balance this effect. The inverse filter spends more time at the higher frequency’s compared to the lower part of the audio spectrum (Farina, 2000). The convolution process is shortly recapped here in equation (1), where i(t) is the desired impulse response of the DUT, a(t) is the recorded output from it, and b(t) is the generated inverse filter: 4. MUSICAL INSTRUMENTS MEASUREMENTS APPROACH Our portable software application was developed with a special scenario in mind, in which the DUT is an acoustic guitar; much like the case depicted by Farina (Angelo Farina, 1995), there is a soundboard, a neck, and a bridge where the strings are attached at a fixed point. This specific system must be excited by applying a known force (F) on the bridge. One way to implement this is by positioning the exciter exactly on the bridge (Ausiello, 2018). Indeed, the simplest way to test impulse response is by using Farina’s direct method (Angelo Farina, 1995). This demonstrates that impulse response can be obtained if excitation occurs on the bridge of the DUT with a known force, F, also, measurements of impulse response taken as sound pressure (p). Shown in equation 2. The use of the direct method because provides a better signal to noise ratio compared to other methods such as the reciprocity technique mentioned in the 1995 paper (Angelo Farina, 1995), and it also offers a wider bandwidth of coherence between stimulus and output (Ausiello, 2018). Furthermore, we can say that using an exciter attached to the bridge and soundboard could offer the possibility to test the DUT also with other signals, such as white or pink noise. Vol.43.Pt.2. 2021 Proceedings of the Institute of Acoustics Figure 1, Block diagram of system set up used for the direct method (Angelo Farina, 1995) . Rosatle PC win MLSSA AID = |useracet | 4 tie Sata ied apateet Figure 2, Proposed set up for testing. The testing setup proposed in figure 2 is essentially the one used by Ausiello (Ausiello, 2018) depicted above. The ESS will be played through the exciter coil into the DUT, with the response being captured by the strategically placed external microphone which then feeds the recorded audio back into the application where an inverse filter of the recorded audio will be constructed and convolved with the recorded audio to produce the impulse response of the DUT. To improve the accuracy of the results, the presented application can synthetize up to three consecutive repetitions of the ESS stimulus, with a desired period of silence between each one. Vol.43.Pt.2. 2021 Proceedings of the Institute of Acoustics 5. APPLICATION USER INTERFACE Figure 3, Application user interface. In figure 3, we can see the user interface for the application as built in MATLAB. Here the user can input all the variables (i.e; start and end frequencies and length of ESS). The layout allows users to have all options available in a single screen, eliminating the need for additional tabs, thus making navigation simple. The frequency response, Impulse response and inverse filter can all be viewed simultaneously with the ability to export these using the export data button to move the results onto another platform if required. 6. VALIDATION OF THE PORTABLE APP To validate the application, we need to prove that we achieve the same results of the traditional system implemented by the Aurora plugins. To do so, we setup up an experiment in which both the application and Aurora will generate a sine sweep from 50Hz to 15kHz. This would be an ideal frequency range for an acoustic guitar. In fact, the tests were done using a loudspeaker, but this does not impair our procedure. To improve the accuracy of the results, the generated ESS (with a duration of 10s) will be played twice in both cases, with 5 seconds of silence between the sweeps. Figure 4 displays the Aurora generated signals and inverse filter from the variables discussed above (using Audacity to run the plugins). Vol.43.Pt.2. 2021 Proceedings of the Institute of Acoustics Figure 4, Aurora generated audio files. The DUT used was, as mentioned above, a Yamaha HS7 loudspeaker. The control signal from Aurora will be produced according to the following flow diagram in figure 5: Figure 5, flow diagram for Aurora’s test signal. The measurement microphone was positioned on axis to the tweeter at a distance of 20cm, as visible in figure 6. ‘Audio captured by ‘measurement ‘microphone Audio recorded into Logie Pro X ‘Aurora generated signal Signal imported Signal played out of >| into Logic Pro X| ‘a loudspeaker y ¥ Figure 6, Application testing on an iPad Air. To compare the results, the audio recorded by the app (by using an iPad Air) was then exported into a .WAV file so that the data could be compared using MATLAB, where all the algorithms of the apps are. Vol.43.Pt.2. 2021 Proceedings of the Institute of Acoustics 7. RESULTS ANALYSIS Impulse response Both the Aurora impulse response and the Applications impulse response were imported into MATLAB using the ‘audioread’ function and renamed respectively as Application and Aurora . By using the Signal Analyser tool, the two audio files were plotted into different graphs: the first one (figure 7) shows the two impulse responses superimposed onto each other, while the second one (figure 8) depict their power spectrum. Figure 7, Impulse response of Application (Blue) Vs Aurora (Red). As we can see above in figure 7, the impulse responses of both signals are close to identical in frequency and time. Differences can be attributed to the fact that the two measurements were done in sequence and not simultaneously, and from the fact that the stimulus signal had slightly different amplitude, producing a subtle difference in the normalised IRs. A. Frequency Response of the generated ESS signals. Vol.43.Pt.2. 2021 mhwora mw Aopbcabnt1) Proceedings of the Institute of Acoustics Figure 8, Frequency response from generated ESS of Application (blue) Vs Aurora (red). Figure 8 above displays the frequency responses of the generated ESS ion Aurora (red) and the application (blue). We can see that both signals follow the same pattern (with a slight variation in amplitude) however, the Aurora signal begins to roll off around 12kHz which is due to the roll off set within the initial start menu. The application can be improved by allowing the user this functionality. B. Frequency Response of the recorded ESS. Vol.43.Pt.2. 2021 eeee te tt es tg it Proceedings of the Institute of Acoustics Figure 9, Frequency response of the recorded audio from the Application (Red) Vs Aurora (Blue) recorded output. The plot shown within figure 9 displays the frequency responses of the recorded output of the generated ESS played out of the HS7 speaker. The frequency response of the application follows that of Aurora although the amplitude of the spectrum is lower at higher frequencies. This should be explained by the difference in convolution algorithm used by the Aurora plugins and Matlab, which is the platform where the portable app was developed. Despite the subtle amplitude discrepancies at high frequencies, the spectrum follows the same pattern throughout the entire frequency range tested validating that the application’s able to produce results accurately much like Aurora. 8. CONCLUSIONS: The fundamental task set out in this project was to create a smartphone application that measures the acoustical response of a DUT. Comparisons have been drawn between both the created application and Aurora and have been validated through multiple testing stages, and it has revealed a substantial agreement in the results, which requires further study to be made negligible. The comparison with a fully developed program such as Aurora, indicated that the basic concepts of this application created were correct, but left room for further developments in the application and its user interface. For example, future features of the app will allow users to create a fade in and fade out to match the corresponding feature found in Aurora, and allow also to tailor the amplitude of the generated ESS in finer steps. These features will only improve on the results taken as all the variables can therefore be matched, thus an identical signal should, in theory, be created. Bibliography Angelo Farina, A. L. L. T., 1995. Realisation of “virtual” musical instruments: measurements of the Impulse Response of Violins using MLS technique, s.l.: s.n. Ausiello, L., 2018. GUITAR SOUNDBOARD MEASUREMENTS FOR REPEATABLE ACOUSTIC PERFORMANCE MANUFACTURING, s.l.: s.n. Ausiello, L., 2020. Advances in acoustic instrument measurements and system design , s.l.: s.n. Farina, A., 2000. Simultaneous measurement of impulse response and distortion with a swept-sine technique. AES 108, Volume 5093. Farina, A., 2007. Advancements in impulse response measurements by sine sweeps: Presented at the 122nd Convention 2007 May 5–8 Vienna, Austria , Vienna, Austria : Audio Engineering Society. Vol.43.Pt.2. 2021 Previous Paper 3 of 8 Next