view dsp/synth/noise.m @ 36:9e7be347b3a0

Renamed sequence classes to avoid clashes with seq methods; Fixed default slicing dimension while retaining behaviour of window.m; Updated use of sequences in dsp/synth.
author samer
date Thu, 24 Jan 2013 14:51:23 +0000
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);