TESTERS WANTED for my new suite of loudspeaker measurement and data processing tools

I just spent the last 10 days in a fever dream doing coding in python and C++ while I repeatedly goosed AI for help, and now…

I NEED TO TEST THE SOFTWARE AND NEED YOUR HELP

So, what does it do? In the past I used ARTA to obtain measurements on my loudspeakers. ARTA was not really designed for loudspeaker measurements per se but it does a very good job at making them. Unfortunately it is no longer supported. I recently needed to make multiple repeated measurement runs in a large space, and found that the room echo/reverberation was not easy to circumvent using ARTA. I started to think about writing my own code, and then a fantastic opportunity arose: my wife left on a 1-week vacation! So I brewed a lot of coffee, spun up some AI models and started to chat with them. Now I have some cool tools that I am starting to test, and need a few good men to help me with this effort. This is and will always be open source freeware, so the feedback you can give me now will make these tools better for everyone.

OVERVIEW:

There are three main tools: A MEASUREMENT tool for playing and recording repeated chirp type signals from a computer and audio interface in 2-channel mode, an IMPULSE RESPONSE tool that takes the raw measurement data collected from the first tool and converts that into the system impulse response, and an IMPULSE TO FREQUENCY conversion tool, where you window the impulse and generate the SPL and phase frequency responses from that. This tool spits out FRD files that you can use in the usual way. The data generated by the first two tools is saved as WAV files. This makes is possible to import the data into other programs like ARTA or REW if you prefer to process them there. I also created a plotting tool for WAV files so that you can check them for problems, e.g. after the measurement run has completed.

WHAT YOU NEED: The tools are designed ONLY for 2-channel measurements where one channel is a loopback or is measuring the loudspeaker (post amplifier) drive voltage directly. You cannot use a USB microphone or single-channel measurments, and no one should be using those for serious loudspeaker measurements anyway… The programs will run under Windows and Linux, and some are run with Python. Python and the necessary modules can be installed easily under both OSes. I have been testing in Ubuntu Linux, Windows 11, and also in WSL2 under Windows 11. If you have a computer (a laptop is great) and a USB audio interface with two or more input, and two or more output channels, you are ready to go.

The full project is hosted on GitHub. If you want to participate I will send you the info so you can download the software.

This is my personal effort to try and improve my own loudspeaker measurements, and get control over all of the important parameters for measurements and post-processing into an FRD file. I am happy that I can share this with the community, and I hope you will consider taking part in this effort.

Drop me a PM here, via my Facebook page, or at DIYaudio anytime.

4 Likes

Here are a couple of examples of the programs. The attached text file is the output from the measurement program as it ran multiple sweeps with a pause in between each one. The chirp signal is plotted in another attachment. The third attachment is the window from the impulse to frequency response program.

example_progam_output.txt (4.0 KB)

4 Likes

What is the benefit over just measuring in REW?

1 Like

Good question. I don’t know exactly because I don’t use REW. I took a quick look at the online docs for REW and it probably has about the same capabilities, and maybe even more. I don’t know how it aligns data for multiple measurements, or if it can reject a contaminated measurement from a repeated series. There is no “magic” in what I am doing, I just wanted to have knowledge of and control over what is going on so I wrote the code myself.

4 Likes

Hat’s off to you for tackling something this complex and time consuming.

I do wish I could help and wold love to contribute, but work and recent events are taking most of my “geek time” right now.

1 Like

Charlie, sent you a PM.

Hi Charlie,

Long time REW user here (~15 years). Short term ARTA/STEPS user.

Some time ago I compared the two in regards to calculation of harmonic distortion, so I’ve broken both more than once.

In short, yes.

ARTA allows for averaging- using multiple sweeps to bump up your SNR; each doubling increases SNR ~3dB, so 2 repetitions: +3dB, 4 repetitions: +6dB, 8 repetitions: +9dB)

ie.

REW also uses averaging- but it’s called Repetitions, and found in the Measurement window (Ctrl-M), and the maximum is 8.

The main advantage of REW if that it allows much longer sweeps - from 64K to 4M…

But be careful; even at a sample rate of 96KHz, a sweep of 1M at a sample rate of 96KHz, repeated 8 times, takes 87.4 seconds.. there are downsides to this…

***

REW also has a Stepped Sine function, which is the functional equivalent of STEPS.

This is accessible in the RTA window (Ctrl-Shift-T).

For other readers I’ll add that the signal is just a pure sine, but measurements aren’t taken by sweeping from a low frequency to a high frequency. It’s taken at intervals such as each octave, or 1/3th, 1/12th, 1/24th of an octave, i.e. interval steps of an octave.

But when you jump a sine wave from one discrete frequency to the next, the frequency changes abruptly. So we have to discard the transient for each step. This makes it very inefficient (read: slow) way of calculating amplitude response and harmonics.

But it IS more precise.

On the other hand, Farina’s sweep uses a continuous sine sweep, which is a lot faster (seconds not minutes). And whilst it is better than the Maximum Length Sequence which what was used last century, it’s still an approximation. The biggest drawback of the sweep is that the separation into harmonics is not as precise as the stepped sine. Reverberations affect low frequencies. Transient noise completely messes up the harmonics.

***

REW also can measure using music with the Fast Sub-band Adaptive Filtering

Hope that saves you some headache.

2 Likes

Hi tk,

Thanks for the detailed info on ARTA and REW. I’m planning to stick with the swept sinusoid (chirp) signal. The measurement program I have coded can do arbitrarily long sweeps. You control that with a “sweep rate” parameter. You can also repeat the sweep N times, with an arbitrary pause in between. Both a slower sweep rate and doubling the number of reps will improve the S/N.

I have been asking AI a lot of questions. I find that for this sort of topic, where actual information and scientific publications (e.g. on Farina’s method) are available, you can get some decent non-hallucinated answers to questions. One thing I recently learned is related to the sweep and measurement duration. Multiple fast sweeps are very much not ideal. Fewer, longer sweeps are better. Also, the data collection should ALWAYS continue until the room reverberation has decayed down to the noise background. So there is the chirp stimulus, then that ends, and then you must continue to record data for another few seconds. Indoors in a smaller space this might require only another 1.5 seconds. In a larger space, maybe 3 seconds. I measure in a large gymnasium and so I need to keep recording for around 6-10 seconds after the chirp ends. This is important for the post-processing of the measurement, to keep the impulse tail from wrapping around in the FFT and contaminating the beginning of the impulse response. In ARTA I did not have very good control over how long to record. You just pick some number of data points and press go. In my code I have added an RT60 parameter to represent the time that the room or hall reverberation takes to die down, and that number of seconds add to the end of the recording time.

5 Likes

Quick update. I finally emerged from the coding tunnel and took a much needed shower. I now have an app to do Farina’s method coded up in Python. It’s working and not too shabby. This took about 10x the effort and 10x the time compared to the H1 estimator based response generator app that I wrote a short time ago. Along the way I also improved the data measurement program, and that is working very nicely. My next goal will be to try an embed some custom chunk data in the WAV files that store the mic data and the Farina inverse filter, so that you cannot screw up and enter the wrong key parameters at the end. But first, it’s Miller time.

6 Likes

Here’s ma new bay-bee!

It’s launched from the terminal (Windows or Linux) and prints out these sorts of messages there:

C:\Users\charl\Desktop\python_playground>py Time2Freq.py -m mic_data.wav -f farina_filter.wav --start_f 10 -s 10 -v 2.5 -d 0.3
Computing full impulse response via convolution…
Sample Rate: 48000 Hz | Total Duration: 15003.35 ms
Step 1/2: Click the time plot where the signal leaves the baseline (Start taper end).
Start taper end placed at: 6798.42 ms. Now click the Window End (Reflection limit).
Window Updated!

  • Taper starts at: 6797.98 ms
  • Taper ends (Signal Onset): 6798.42 ms
  • Window ends: 6807.23 ms
    Computing Farina Method response up to HD 3…
    Analysis complete! Resolution: 108 Hz
    Lower plot cleared. All calculated data cleared.
    HD MAX updated to: 5
    Computing Farina Method response up to HD 5…
    Analysis complete! Resolution: 108 Hz
3 Likes

WooHoo, another day another useful piece of software written. Today’s effort is an FRD file plotter, again via python. When you call the program via the command line, you specify N FRD filenames. These are plotted to the same plot. The user can change the plot and axis titles, as well as the legend text and color for each line/data set. There are zoom/pan tools built into python that are very handy for getting just the right view that you would like. Then you can save the plot (without the buttons!) to a png file at 600dpi. This makes a nice companion for

my multi-WAV-file plotting program…

4 Likes

Another artist coming into his prime . . . . Fantastic!