Release: 0.1.1

Parameters How it works File formats Download History Todo BuildThis program noise generates cyclic noise patterns with adjustable properties, like energy distribution and relatively prime frequencies. The cyclic nature of the patterns makes the spectrum discrete which is ideal for FFT analysis without the need of a window function.

The program does not handle the platform dependent output of the
data to an DAC like a sound device. This is up to your environment. In
general you should pipe the output to some device or application that
can play PCM data.

Reference signal for measurements of impedance or transfer functions.

The program writes

16-Bit PCM encoded audio data with two channelstoor a destination file in RIFF wave format.stdout

cycle lengthbnsamples -

- This is the number of samples in one period of the signal. This should be the same as the FFT length used for analysis. So powers of 2 should be preferred.
andfminfreqfrequency rangefmaxfreq -

- Minimum and maximum frequency where the output contains energy.
fincandchannelsflogincrementlinear and logarithmic increment for used frequencies-

- This is creates a discrete energy distribution. Subsequent used frequencies have at least the distance
f·_{n+1}= f_{n}rounded to the closest multiple of the cycle frequency. All frequencies in between have no intensity.channels+increment

This could be used to create support points in an approximately logarithmic frequency axis.

fsampsampling frequencyfreq -

- 48000 Hz by default.
harmuse harmonicsn -

- With this option the first
harmonics of any used frequency are reserved and do not contain energy. Instead the next free frequency will be used. This could be used to do very fast measurements of harmonics of loudspeakers. See dealing with harmonics.nlnnumber of cyclescount -- Number of cycles to generate until the program completes. The loop count only applies to PCM output. 1 by default.
loop -infinite output- Switches the program to continuous mode. It can only be terminated by either sending a interrupt signal or when the output stream gets closed. You should not use this mode with file output, because it will not terminate until the disk is full.
mst -two channel mode- In two channel mode the used frequencies are alternately used for as channel 1 and channel 2.
scalenoise typepower -- Exponent of the energy distribution. 0 := white noise, -1 := pink noise. 0 by default.
wdwrite design datafile -- Writes the design coefficients into a text file. See @@@@@

wrwrite reference signalfile -- Writes one cycle of the reference signal to a text file. For each sample exactly one line is written.
wwwrite PCM datafile -- Writes the binary data as RIFF wave format. If
fileis -, the output is written tostdout. The Output is always normalized to 0 dB FSR. You could use a transient stream like a character device or a pipe (fifo) as destination too.

noise bn65536 fmin20 fmax20000 ln100 wwnoise.wav- Creates a file
noise.wavwith 100 cycles of a 65536 samples white noise pattern with 48 kHz sampling rate (about 2½ minutes). Frequencies below 20 Hz and above 20 kHz are suppressed.noise bn65536 fmin50 fmax20000 loop scale-.5 |some output device- This creates an infinite repetition of 65536 samples noise, weighted with
f^{-}^{0,5}at 48 kHz sampling rate. Frequencies below 50 Hz and above 20 kHz are suppressed. The output is written to stdout where a appropriate program or device handles the DAC output.

The program creates the noise reference by inverse Discrete Fourier Transform. The

amplitudesof the Fourier coefficients are calculated by:

r=_{i}f_{i}^{κ}The

phase anglesare chosen randomly.The exponent κ controls the

energy distribution. An homogeneous distribution (κ = 0) represents white noise. Positive values prefer high frequencies, negative values prefer low frequencies. κ = -1 creates pink noise.All coefficients, outside the

frequency range [, are zeroed. This is particularly required when κ < 0, because otherwise the amplitude of the DC component gets singular.f,_{min}f]_{max}

After the inverse Fourier Transform the wave form is normalized to

0dB FSR.

The harmonics option excludes frequencies from the resulting spectrum if

- the current frequency is a harmonic of another used frequency or

- one of the first
nharmonics of the current frequency is a harmonic of another used frequency.Because of the second condition it is strongly recommended to set the minimum frequency at least higher than the

nth harmonic of the ground frequency of the generated pattern. Otherwise a large gap would occur after the first used frequency.

The graph shows an example of the generated frequencies for a 64 sample noise pattern with 3 harmonics and a minimum frequency of 4:

noise fsamp64 fmin3 fmax32 harm3 wdnoise.datComments

In effect the noise pattern contains only energy at the frequencies with red circles. While all the frequencies with red

- Frequency 4 is the first after fmin. This is always used.
- Frequency 6 has a collision at its 2nd harmonic with the 3rd harmonic of frequency 4 at frequency 12 and therefore cannot be used because it would make frequency 12 ambiguous.
- Frequency 5 has also a collision at its 4th harmonic with the 5th harmonic of frequency 4, but both are beyond the maximum harmonic to analyze (3 in this case) and so this does not care.
- Frequency 8 has a direct collision with the 2nd harmonic of frequency 4 and must not be used.
- Frequency 16 has a direct collision with the 4th harmonic of frequency 4. Although this harmonic is not analyzed it might get additional energy by non-linearities, so it is not used either.
orpink circles are used for analysis. See 'The Art of Noise' for further information.

Column Symbol Description [1] fFrequency [2] | R|Magnitude [3] arg RPhase angle in degrees [4] re RReal part ( a)_{i}

[5] im RImaginary part ( b)_{i}[6] hamonicOrdinal of the harmonic. Negative values indicate the second channel in case two channel mode is activated

Column Symbol Description line no. isample index [1] Σ s_{ij}sample value (sum over all channels) [2], two channel mode only s_{i1}sample value of first channel [3], two channel mode only s_{i2}sample value of second channel

In single channel mode the output is still stereo. The two channels are used symmetrically:

s= -_{i1}s. This could be used for an improved SNR. But if you don't need this, simply use only one of them._{i2}

In two channel mode the two channels contain distinct data as you might suggest.

The output will always be normalized to the maximum sample value ±32767. In two channel mode they are normalized simultaneously.

- Support of harmonics
- Changed command line interface

- Internal revision

**RIFF format and endianess**- Currently only PCM data in RIFF wave format is supported for binary output and the endianess is always the platforms native one.