.TH NOISE 1carl CARL
.SH NAME
noise \- generate various flavors of random noise
.SH SYNOPSIS
.B noise
[
.B -h
] [
.B -l
] [
.B -u
] [
.B -n
] [
.B -S
] [
.B -w
] [
.B -s
] [
.B -r
] [
.B -m
]
> output
.SH DESCRIPTION
flags: (default)
.TP
.B -h
prints help message
.TP
.B -l
lower bound (-1.0)
.TP
.B -u
upper bound (+1.0)
.TP
.B -n
number of samples (16384)
.TP
.B -S
seed (0)
.TP
.B -w
weighting (w), options are: w = white, f = 1/f, i = rational white
b = brownian, m = mixed
.TP
.B -s
sequence length (4096) for 1/f
low sequence lengths tend towards whiter noise
.TP
.B -r
relative distance traveled for brownian (.1)
range: 0 (correlated) => 1 (uncorrelated)
.TP
.B -m
mixture of noise type for -wm mode: -1 => 0 mix b and f,
0 => +1 mix f and w
.PP
.B noise 
either prints random numbers on your terminal or if the
standard output is a file or pipe, it
writes floatsams.
By default, it produces 1 second of white noise at a sampling rate
of 16KHz.  The noise is bounded by default to the signed unit
interval, [-1,+1].  Use the -l and -u flags to change this range.
.PP   
.I 1/f 
noise is implemented using Voss's algorithm.  The sequence length
must be a power of 2 (it is truncated to the nearest lower power if you
miss).  Low sequence lengths tend to whiten the noise.  A sequence length
of 1 is exactly white noise.
.PP
The 
.I -r 
flag, when Brownian noise is selected,
determines the distance that the next point
can be from the current one, expressed as a fraction of the total range between
the upper and lower bound.  
Typical values: .25 approximates the spectrum for 1/f noise, .1 gives
10dB/octave rolloff, 1 gives whiteish noise.
.PP
The 
.I rational 
noise mode gives whole numbers only.  These are necessarily
outside the range of the signed unit interval.  You must 
always use -l and -u to set an appropriate range for your application.  
Output is still floating point, but without fraction.
.PP
Finally, the spectra can be varied by mixing Brownian, 1/f and white
noise in varying proportions.  The -m flag acts like a panpot: between
-1 and 0 it produces a correctly weighted mixture of Brownian and
1/f noise.  At 0 it is exactly 1/f noise. Between 0 and +1 it goes from
1/f to white.  For this mode, you may also vary the -s and -r flags
to tailor things.
.SH AUTHOR
Gareth Loy
