noise

noise — A white noise generator with an IIR lowpass filter.

Description

A white noise generator with an IIR lowpass filter.

Syntax

ares noise xamp, kbeta

Performance

xamp -- amplitude of final output

kbeta -- beta of the lowpass filter. Should be in the range of -1 to 1, exclusive of the end-points.

The filter equation is:

[Filter equation for filter in noise opcode.]

where xn is the original white noise and yn is lowpass filtered noise. The higher β is, the lower the filter's cut-off frequency. The cutoff frequency is roughly sr * ((1-kbeta)/2).

Examples

Here is an example of the noise opcode. It uses the file noise.csd.

Example 657. Example of the noise opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-odac  ;;;realtime audio out
;-iadc    ;;;uncomment -iadc if realtime audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o noise.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

instr 1

kbeta line -0.9999, p3, 0.9999	;change beta value between -1 to 1
asig  noise .3, kbeta
asig  clip asig, 2, .9	;clip signal
      outs asig, asig

endin
</CsInstruments>
<CsScore>

i 1 0 10

e
</CsScore>
</CsoundSynthesizer>


Credits

Author: John ffitch
University of Bath, Codemist. Ltd.
Bath, UK
December 2000

New in Csound version 4.10