comparison Problems/generateAudioDenoiseProblem.m @ 220:0d30f9074dd9

Merge
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Wed, 11 Apr 2012 15:56:39 +0100
parents 9c418bea7f6a
children
comparison
equal deleted inserted replaced
165:775caafd5651 220:0d30f9074dd9
55 %ask for file name 55 %ask for file name
56 56
57 TMPpath=pwd; 57 TMPpath=pwd;
58 if ~ exist( 'soundfile', 'var' ) || isempty(soundfile) 58 if ~ exist( 'soundfile', 'var' ) || isempty(soundfile)
59 %ask for file name 59 %ask for file name
60 [pathstr1, name, ext, versn] = fileparts(which('SMALLboxSetup.m')); 60 [pathstr1, name, ext] = fileparts(which('SMALLboxSetup.m'));
61 cd([pathstr1,FS,'data',FS,'audio']); 61 cd([pathstr1,FS,'data',FS,'audio']);
62 [filename,pathname] = uigetfile({'*.mat; *.mid; *.wav'},'Select a file to transcribe'); 62 [filename,pathname] = uigetfile({'*.mat; *.mid; *.wav'},'Select a file to transcribe');
63 [pathstr, name, ext, versn] = fileparts(filename); 63 [pathstr, name, ext] = fileparts(filename);
64 data.name=name; 64 data.name=name;
65 65
66 if strcmp(ext,'.mid') 66 if strcmp(ext,'.mid')
67 midi=readmidi(filename); 67 midi=readmidi(filename);
68 % data.notesOriginal=midiInfo(midi); 68 % data.notesOriginal=midiInfo(midi);
89 cd([pathstr1,FS, 'data', FS, 'audio', FS, 'mat']); 89 cd([pathstr1,FS, 'data', FS, 'audio', FS, 'mat']);
90 x=load([pathname,filename]); 90 x=load([pathname,filename]);
91 end 91 end
92 else 92 else
93 [x.signal, x.fs, x.nbits]=wavread(soundfile); 93 [x.signal, x.fs, x.nbits]=wavread(soundfile);
94 [pathstr, name, ext, versn] = fileparts(soundfile); 94 [pathstr, name, ext] = fileparts(soundfile);
95 data.name=name; 95 data.name=name;
96 end 96 end
97 97
98 %% set parameters %% 98 %% set parameters %%
99 if ~ exist( 'sigma', 'var' ) || isempty(sigma), sigma = 0.2; end 99 if ~ exist( 'sigma', 'var' ) || isempty(sigma), sigma = 0.2; end