comparison Problems/generateAudioDeclippingProblem.m @ 161:f42aa8bcb82f ivand_dev

debug and clean the SMALLbox Problems code
author Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk>
date Wed, 31 Aug 2011 12:02:19 +0100
parents b14209313ba4
children 9c418bea7f6a
comparison
equal deleted inserted replaced
155:b14209313ba4 161:f42aa8bcb82f
2 %% Generate Audio Declipping Problem 2 %% Generate Audio Declipping Problem
3 % 3 %
4 % generateAudioDeclippingProblem is part of the SMALLbox [1] and generates 4 % generateAudioDeclippingProblem is part of the SMALLbox [1] and generates
5 % Audio declipping is a problem proposed in Audio Inpaining Toolbox and 5 % Audio declipping is a problem proposed in Audio Inpaining Toolbox and
6 % in [2]. 6 % in [2].
7 %
8 % The function takes as an optional input
9 % soundfile - name of the file
10 % clippingLevel - (default 0.6)
11 % windowSize - 1D frame size (eg 512)
12 % overlap - ammount of overlaping frames between 0 and 1
13 % wa,ws,wd - analisys, synthesis and dictionary window functions
14 %
15 % Dict_fun - function to be used to generate dictionary
16 % redundancyFactor - overcompletness of dictionary (default 2)
17 %
18 % The function outputs the structure with following fields:
19 % original - original signal
20 % clipped - clipped signal
21 % clipMask - mask indicating clipped samples
22 % clippingLevel - (default 0.6)
23 % Upper_Limit - maximum value of original data
24 % fs - sample rate of the original signal in Hertz
25 % nbits - the number of bits per sample
26 % sigma - added noise level
27 % B - dictionary to be used for sparse representation
28 % M - measurement matrix (non-clipped data in b)
29 % b - matrix of clipped frames
30 % m - size od dictionary atom
31 % n - number of frames to be represented
32 % p - number of atoms in dictionary
33 % windowSize - 1D frame size (eg 512)
34 % overlap - ammount of overlaping frames between 0 and 1
35 % wa,ws, wd - analisys, synthesis and dictionary window functions
7 % 36 %
8 % [1] I. Damnjanovic, M. E. P. Davies, and M. P. Plumbley "SMALLbox - an 37 % [1] I. Damnjanovic, M. E. P. Davies, and M. P. Plumbley "SMALLbox - an
9 % evaluation framework for sparse representations and dictionary 38 % evaluation framework for sparse representations and dictionary
10 % learning algorithms," V. Vigneron et al. (Eds.): LVA/ICA 2010, 39 % learning algorithms," V. Vigneron et al. (Eds.): LVA/ICA 2010,
11 % Springer-Verlag, Berlin, Germany, LNCS 6365, pp. 418-425 40 % Springer-Verlag, Berlin, Germany, LNCS 6365, pp. 418-425
101 data.wa = wa; 130 data.wa = wa;
102 data.wd = wd; 131 data.wd = wd;
103 132
104 data.fs = x.fs; 133 data.fs = x.fs;
105 data.nbits = x.nbits; 134 data.nbits = x.nbits;
106 data.Upper_Limit = max(solutiondata.XClean); 135 data.Upper_Limit = max(solutionData.xClean);
107 [data.m, data.n] = size(x_clip); 136 [data.m, data.n] = size(x_clip);
108 data.p = windowSize*redundancyFactor; %number of dictionary elements 137 data.p = windowSize*redundancyFactor; %number of dictionary elements
109 138
110 cd(TMPpath); 139 cd(TMPpath);
111 140