File Exchange

## Pink, Red, Blue and Violet Noise Generation with Matlab Implementation

version 1.6 (4.97 KB) by

Pink, red, blue and violet noise generation via spectral processing of a white noise.

Updated

The present submission is a set of four Matlab functions that provides a generation of:
1) Pink (flicker) noise - power spectral density slope -3 dB/oct., -10 dB/dec.
2) Red (Brownian) noise - power spectral density slope -6 dB/oct., -20 dB/dec.
3) Blue noise - power spectral density slope +3 dB/oct., +10 dB/dec.
4) Violet (Purple) noise - power spectral density slope +6 dB/oct., +20 dB/dec.
A few examples are given to clarify the usage of the functions. For convenience, the input and output arguments are given in the beginning of each function. The generated noise signal has a unity standard deviation and zero mean value.

The code is based on the theory described in:

[1] J. Kasdin. “Discrete Simulation of Colored Noise and Stochastic Processes and 1/f^a Power Law Noise Generation”. Proceedings of the IEEE, Volume 83, Number 5, May 1995, pp. 802-827.

[2] U. Zölzer. DAFX: Digital Audio Effects. Chichester, John Wiley & Sons, 2011.

[3] D. Manolakis, V. Ingle. Applied Digital Signal Processing. Cambridge, Cambridge University Press, 2011.

Hristo Zhivomirov

### Hristo Zhivomirov (view profile)

Hi Pankaj Singh! Thanks so much for the kind comment! You can find the answer of your question at example2.m file.

Best regards,
Hristo Zhivomirov

pankaj singh

### pankaj singh (view profile)

Great code. Very helpful. I have one question. This functions generates the noise samples irrespective of SNR values. But I need to generate different noise samples for different SNR values (as in the case of AWGN). How can I do it?

Marcin Konowalczyk