-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathltas.m
More file actions
27 lines (17 loc) · 776 Bytes
/
ltas.m
File metadata and controls
27 lines (17 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
function ltas(duration)
% use the loadwavs function to create a cell array of file paths and
% another cell array of the actual wav samples. the file paths are not
% needed here, so we omit them with "~"
[~, wavdata] = loadwavs;
% we assume that all files have the same sampling rate
samprate = wavread(wavdata{1});
% concatenate all the wavs into one long wav file
corpuswav = concatenatewavs(wavdata);
% calculate the long term average spectrum
corpusspectrum = fft(corpuswav);
% create the noise spectrum
noisespectrum = real(ifft(corpusspectrum));
% create the noise of specified duration & sampling rate
% specify output folder
% outputFolder = uigetdir(cd,'Select Output Folder');
end