annotate dsp/synth/playarspec.m @ 61:eff6bddf82e3
tip
Finally implemented perceptual brightness thing.
author |
samer |
date |
Sun, 11 Oct 2015 10:20:42 +0100 |
parents |
c75bb62b90a9 |
children |
|
rev |
line source |
samer@34
|
1 function X=playarspec(S,h)
|
samer@34
|
2 % PLAYARSPEC - Return (or play) sound for a given power spectrum
|
samer@34
|
3 %
|
samer@34
|
4 % playarspec :: (S:spectrum,h:window)->x:signal
|
samer@34
|
5 % S can be an array of spectra
|
samer@34
|
6 % h is window or `grain shape' used to synthesis the sound
|
samer@34
|
7 % (What about overlap? See stereo reconstrunction functions)
|
samer@34
|
8
|
samer@34
|
9 x=poly2snd(ac2poly(spec2ac(S)),h.*randn(size(h)));
|
samer@34
|
10 if nargout<1, sound(flatten(x),11025); else X=x; end
|