view dsp/synth/noise.m @ 61:eff6bddf82e3 tip

Finally implemented perceptual brightness thing.
author samer
date Sun, 11 Oct 2015 10:20:42 +0100
parents c75bb62b90a9
children
line wrap: on
line source
% noise - white noise generator
%
% noise :: 
%    D:natural ~'maximum duration to expect',
% -> (   nonneg  ~'sampling frequency', 
%        N:1..D  ~'duration' 
%     -> [[1,N]] ~'some noise') ~'function to generate white noise'.
function gen=noise(maxdur)
	buf=randn(1,maxdur);
	gen=@(fs,dur)buf(1:dur);