classdef C_TP
	% Class principale pour le TP "Modifications du signal audio par TFCT inverse"
	% pour ENSEA 3em SyM
	% 2015/12/14
	% peeters@ircam.fr
	
	properties
		audio_v					% --- contains the audio signal
		sr_hz					% --- sampling rate in Hz of the audio signal
		L_sec		= 0.06;		% --- analysis window length in seconds
		STEP_sec	= 0.06/3;	% --- analysis step in seconds
		L_n						% --- analysis window length in samples
		STEP_n					% --- analysis step in samples
		LT_n					% --- total length of audio signal in samples
		N						% --- size of the FFT
		fenetre_v				% --- contains the values of the analysis window
		
		axeFreq_hz_v			% --- frequency axis of half of the FFT in Hz (only used for plots)
	end
	
	methods(Static)
		function [] = MS_test()
			audioFile = './speech_noise.wav';
			my			= C_TP(audioFile);
			X_im		= my.F_tfct();			
			hatX_im		= my.F_soustractionSpectrale(X_im, 0.1, 0.7);			
			hatX_im		= my.F_vocoderPhase(hatX_im, 0.6);
			hataudio_v	= my.F_tfctInverse(hatX_im);
			soundsc(hataudio_v, my.sr_hz);
		end
	end
	
	
	methods
		
		%%
		function this = C_TP(audioFile)
		end
		
		
		%%
		function [X_im] = F_tfct(this)
		end
		
		
		%%
		function [hatX_im]	= F_soustractionSpectrale(this, X_im, start_sec, stop_sec)
		end
		
		
		%%
		function [hatX_im] = F_vocoderPhase(this, X_im, alpha)
		end
		
		%%
		function [hataudio_v] = F_tfctInverse(this, X_im)
		end
		
	end
end

