A NEW GENERALIZED PROJECTION AND ITS APPLICATION TO ACCELERATION OF AUDIO DECLIPPING
====================================================================================

README FILE
-----------

- This MATLAB software package 

- The LTFAT toolbox is necessary to successfully run the codes. It can be downloaded from http://ltfat.github.io/

- The executable file is called "main.m" and contains user settings for the input audio file and other settings, e.g. clipping threshold, DGT parameters and the choice of the algorithm (Condat algorithm and Douglas-Rachford algorithm).

- Inner parameters of the optimization algorithms including the maximum number of iterations can be set directly in the functions "condat" and "douglas_rachford". All these parameters are part of the "paramsolver" structure.

- Folder "Sounds" contains WAVE sound samples, that were used for all experiments described in the article.

- Folder "data" contains numbers of iterations needed for recreating the figures 4 and 5 (see below).

- To recreate Figures 2 and 3 from the paper, please use the default settings:
	
	main.m:
	-------
	% DGT parameters
	param.wtype = 'hann';  % window type
	param.w = 1024;        % window length 
	param.a = param.w / 4; % window shift
	param.M = 1024;        % number of frequency channels

	condat.m
	--------
	% setting different parameter for the simulation
	paramsolver.maxit = 1000;     % maximum number of iterations
	paramsolver.tau = 0.5;
	paramsolver.sigma = 1/(3*paramsolver.tau); % only if F is a Parseval tight frame (FF* = 1)
	paramsolver.ro = 0.99;        % extrapolation coeficient

	douglas_rachrford.m
	-------------------
	paramsolver.maxit = 1000;    % maximum number of iterations
	paramsolver.lambda = 1;      % step size for DR algorithm (default 1)
	paramsolver.gamma = 1;       % DR parameter; here threshold for soft thresholding


- To recreate Figures 4 and 5 it is necessary to run the algorithms until the objective function will differ by 0.1% from the solution obtained at exactly 3000 iterations. To facilitate this experiment, we attach the exact number of iterations in the MAT files located in the "data" folder.
The numbers of iterations are contained in a matrix 5x9, where the row corresponds to the selected audio sample (in alphabetical order) and the column corresponds to the clipping threshold (column 3 => clipping threshold 0.3).
The experiment was done only for clipping thresholds 0.3, 0.5 and 0.7, therefore only columns 3, 5 and 7 contain usable values (other rows contain NaN).
After computing for the specific number of iteration, measure the computational time and plot the time ratio (DR/C).

- For recreating Fig. 4, please use the above-mentioned setting for DGT and proximal algorithms, only the maximum number of iterations (paramsolver.maxit) set to the corresponding value from the matrix
	"data\Iter_exp4_CA_0.1%.mat" for the Condat algorithm and
	"data\Iter_exp4_DR_0.1%.mat" for the Douglas-Rachford algoritm.

- For recreating Fig. 5, please note, that this experiment uses twice oversampled DFT, thus set the number of frequency channels to twice the value of the length of the window. For 1024 samples long window set 
	param.M = 2048;        % number of frequency channels
In the settings of the proximal algorithms, please set the number of iterations to the corresponding value from the matrix
	"data\Iter_exp5_CA_0.1%.mat" for the Condat algorithm and
	"data\Iter_exp5_DR_0.1%.mat" for the Douglas-Rachford algoritm.

