*ASIO Audio Test signal generator specifications

*ASIO is a trademark of Steinberg Media Technologies GmbH



The goal was to produce a generator of audio frequency sine wave signals of the highest possible quality that may be used as a frequency standard for testing all components in the path of the signal. A very thorough specification follows, with the aim to increase the usefulness of the signal generator for sound engineers.




The sine wave generator

In the quest to create "the perfect wave", I went a bit overboard. The floating point calculations that produce the sine wave employ 80 bits of internal precision. Each signal generated is a perfectly symmetrical series of whole waves so as to end up with a negligible DC component. Whatever DC remains is removed, so that for any given frequency of 10 seconds duration or less, the DC level is guaranteed to be 0. The actual DC level before correction is pre-calculated on a sample by sample basis, so a slight delay may be noticed when generating signals approaching 10 seconds in duration. Since DC correction is not applied to signals of a duration greater than 10 seconds, no delay is entailed in this case.



The sweep wave generator

The sweep generator employs a swept sine wave function and does not include DC correction. It can sweep up or down. The samples are generated in real time - as in the case with the sine wave generator - directly into the the sound card's buffers with no pre-buffering. The minimum and maximum frequencies and attenuation values allowed are the same as for the sine wave generator. The minimum sweep duration is 0.1 seconds and the maximum is 60 seconds. Duration is rounded up to the nearest multiple of sound buffer's sample size. A linear taper is applied to the end of the signal, of a duration equal to the sound card's buffer sample size. During taper down, the frequency is held at the ending frequency requested.

The pink noise generator

The pink noise generator employs an algorithm by Andrew Simper of Vellocet, a C++ implementation derived from the code provided by the following people mainly from the music-dsp mailing list: Allan Herriman, James McCartney, Phil Burk and Paul Kellet and the web page by Robin Whittle: http://www.firstpr.com.au/dsp/pink-noise/

From Wikipedia: "Pink noise, also known as 1/f noise, is a signal or process with a frequency spectrum such that the power spectral density is proportional to the reciprocal of the frequency. There is equal energy in all octaves (or similar log bundles). In terms of power at a constant bandwidth, 1/f noise falls off at 3 dB per octave. At high enough frequencies 1/f noise is never dominant. (White noise is equal energy per hertz.) 1/f noise occurs in many physical, biological and economic systems. Below are images showing spectral views of the signals produced by the Audio Test Signal Generator









Note to programmers

The basic algorithm for generating a sine wave couldn't be simpler: sample = amplitude * sin(phaseAngle), but I managed to make it so complicated in the search for perfection that it took several weeks to develop this! Try it yourself - to create a sine wave generator that behaves as this - and you will see what I mean. The difficulties sprang from the desire to generate signals in real time without pre-buffering, and ensuring that the tapers begin and end exactly at the zero crossing. It is not always easy to predict where to find the zero crossing with a broad range of frequencies and durations. With a real time signal, we need to know in advance at what sample number in which buffer load of data it is to be found. DC correction in real time also added to the challenges. I don't think I will ever spend such a ridiculous amount of time developing algorithms for such a trivial application again. I hope this signal generator is really useful to somebody in the end!