-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.m
More file actions
54 lines (36 loc) · 1.91 KB
/
main.m
File metadata and controls
54 lines (36 loc) · 1.91 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
%% ESTRAZIONE DELLE FEATURES DA UN SUONO
% The goal is the iteration of extracting low-level features from a
% single sound
%% Clear Screen And Workspace
clear; clf; clc;
%% Input Data
prompt = {'Filename:','Start Second(s):', 'End Second(s):', 'Partials(y/n):','Plot(y/n):'};
dlgtitle = 'Input';
dims = [1 50];
definput = {'path_audiofile.wav','0','2','y','y'};
opts.Interpreter = 'tex';
answer = inputdlg(prompt,dlgtitle,dims,definput,opts);
%% Setting Data
filename = string(answer(1)); % Folder name
Startsec = cell2mat(answer(2)); % Seconds to analyze
Endsec = cell2mat(answer(3));
flagp = string(answer(4)); % Flag for partial window
flagplot = string(answer(5)); % Flag for descriptor's plot
infoTrack = audioinfo(filename); % Track info
Fs = infoTrack.SampleRate; % Sample frequency
%% MPEG7 Extraction and Plotting
if infoTrack.NumChannels == 2
LLDs = LLDsfeatureStereo(filename,Fs,Startsec,Endsec,flagp); % Features extraction
if strcmp(flagplot, 'y')
FeaturePlotLowLevelStereo;
end
else
LLDs = LLDsfeatureMono(filename,Fs,sec,flagp); % Features extraction
if strcmp(flagplot, 'y')
FeaturePlotLowLevelMono;
end
end
%% Psychoacoustical Extraction
PsychoF = PsychoFeature(answer(1),LLDs.AWF.Input,Fs);
%% NO-MPEG7 Extraction
OtherLowLevel = OtherFeature(LLDs.AWF.Input,Fs);