samer@34: function X=playarspec(S,h) samer@34: % PLAYARSPEC - Return (or play) sound for a given power spectrum samer@34: % samer@34: % playarspec :: (S:spectrum,h:window)->x:signal samer@34: % S can be an array of spectra samer@34: % h is window or `grain shape' used to synthesis the sound samer@34: % (What about overlap? See stereo reconstrunction functions) samer@34: samer@34: x=poly2snd(ac2poly(spec2ac(S)),h.*randn(size(h))); samer@34: if nargout<1, sound(flatten(x),11025); else X=x; end