Benchmarking AudioCheck's Online Tone Generators

Our waveform, sweep and IMD tone generators rely on wavTones technology. We'd like to thank wavTones for granting us the permission to use their code.

Introduction

Generating waveforms properly is not as easy as it seems. Any periodic signal with a discontinuity in its waveform (such as a square or a sawtooth) or a discontinuity in its waveform slope (such as the triangle wave) will be characterized by an infinite spectrum. Simple methods of digitally generating these waveforms will perform poorly, as frequencies higher than half the sampling rate will inevitably fold back into the audible spectrum. This phenomenon is known as aliasing.

Down to the trivial case

Aliasing occurs even in the simplest of cases. Let's consider a 100 Hz square wave sampled at 44100 Hz. The sampling rate and waveform frequency are multiple of each other and it takes exactly 441 samples for the square waveform to jump from one level to the other. Can't be easier, right?

Square wave in Audition
The figure on the left shows what happens when the Digital-to-Analog (DA) converter receives a basic sequence such as a square waveform. The samples are perfectly aligned and the transition is sample-sharp. However, the reconstructed waveform is not what it seems. Among the various interconnecting possibilities for our samples, the DA converter will only reconstruct a waveform whose spectrum is limited to half the sample rate. Because the analog square waveform has frequencies extending to infinity, it cannot be a reconstructed waveform. The reconstructed waveform doesn't look square and its frequency content doesn't sound "square" either. The upper frequencies are missing and - even worse - new frequencies have been added! These frequencies arise from the particular shape and slope of the vertical transition, which depend on the actual sample rate.

Square Wave at AudioCheck.net
The algorithms we use have been designed to minimize those unwanted frequencies. So, when we generate a square tone, we synthesize a waveform that has been designed to sound as close as the square tone, not the square waveform itself. Our samples are no more aligned and the transition will be smoothed as to not introduce additional frequencies. The result of this process is illustrated in the figure shown on the right-hand side. Our waveform may look worse, but it actually sounds better!

Compared to...

     
100Hz SQR
AudioCheck
(free)
100Hz SQR
Adobe
(commercial)
100Hz SQR
NCH
(commercial)
We compared the output of our tone generator with Adobe Audition's build-in Tone Generator (the most popular audio editing software) and NCH Tone Generator Software (the most popular search result on the Internet). We first started with the trivial 100Hz Square wave case (the difficult case will come next). As we didn't hear any obvious difference, we took a look at the frequency display.

A perfect square waveform is defined by a spectrum made of odd harmonics only. The only frequencies that are supposed to appear in the image are 100 Hz, 300 Hz, 500 Hz, 700 Hz, etc.

Square Wave from AudioCheck.net
AudioCheck's Square Tone @ 100 Hz

This is the case with AudioCheck's square output: from 100Hz up to 21900Hz, the very last harmonic before reaching half the sampling rate!

Square Wave from Adobe Audition
Adobe Audition's Square Tone @ 100 Hz

With all the even frequencies now appearing in the picture, Adobe's Audition clearly suffers from aliasing. The end of the spectrum really looks scary, with aliased frequencies being as strong as the genuine harmonics!

Square Wave from NCH Software
NCH's Square Tone @ 100 Hz

NCH Tone Generator's output doesn't perform much better than Adobe Audition.

The (more) complex case

We have only been dealing with the trivial case, so far. Things are getting even worse when the waveform is no longer a sub-multiple of the sample rate. A new problem occurs as we now have to round off the discontinuity time to the nearest available sampling instant.

     
1000Hz SQR
AudioCheck
(free)
1000Hz SQR
Adobe
(commercial)
1000Hz SQR
NCH
(commercial)
This time, the algorithms we use make a solid difference. Take a listen to the same comparison, now carried at 1000Hz.

AudioCheck's output still suffers from aliasing though. Generating aliasing-free waveforms is possible, but computationally expensive. When we put our generator online, we had to compromise speed and tone quality. In practice, aliasing-free waveforms are generated when the chosen frequency is a sub-multiple of the sampling range. In all other cases, aliasing is kept to a minimum and remains lower than other waveform generators on the market.

External Links

© 2007-2013 AudioCheck.net

AudioCheck Random Image
Pure Noise, for everyday use. 100% Calibrated.
Sponsor Logo
Sponsor Logo
49 users online
-
3112 users today