Mercurial > hg > ishara
view dsp/synth/playarspec.m @ 42:ae596261e75f
Various fixes and development to audio handling
author | samer |
---|---|
date | Tue, 02 Dec 2014 14:51:13 +0000 |
parents | c75bb62b90a9 |
children |
line wrap: on
line source
function X=playarspec(S,h) % PLAYARSPEC - Return (or play) sound for a given power spectrum % % playarspec :: (S:spectrum,h:window)->x:signal % S can be an array of spectra % h is window or `grain shape' used to synthesis the sound % (What about overlap? See stereo reconstrunction functions) x=poly2snd(ac2poly(spec2ac(S)),h.*randn(size(h))); if nargout<1, sound(flatten(x),11025); else X=x; end