pdaufft(audio_in,Fs​,FFT_sample_duratio​n,pda_threshold,aud​io_gap_time,CHECK_V​OICING,med_smooth)

Dear all, I am facing a problem in this function. Could you please correct me ?
58 Downloads
Updated 17 Nov 2015

View License

function [f0_time,f0_value,SHR,f0_candidates]= pdaufft(audio_in,Fs,FFT_sample_duration,pda_threshold,audio_gap_time,CHECK_VOICING,med_smooth)
%*****************************************************************************************************************************************
%________________________________ INPUT ARGUMENTS_________________________________________________________________________________________
%*****************************************************************************************************************************************
% audio_in is the input audio file with extension .wav or .mp3 or any other format
% Fs is the sampling frequency in Hertz
% FFT_sample_duration is the smallest chunk of the sudio signal whose FFT has to be found out. Default value is chosen as 30 milliseconds.
% audio_gap_time is the gap between the consecutive chunks of the audio signal for calculating FFT. Maximum value is 10 milliseconds
%_________________________________________________________________________________________________________________________________________
%*****************************************************************************************************************************************
%_______________________________OUTPUT ARGUMENTS__________________________________________________________________________________________
%*****************************************************************************************************************************************
% FFT_segment stores the values of 1024-point FFT of the normalized audio input
% max_value stores the value of the maximum amplitude in the absolute value plot of FFT_segment.
% max_index corresponds to the index value of the maximum amplitude.
% frequency has the value of frequency computed using the index.
% note corresponds to MIDI note.
%******************************************************************************************************************************************
if nargin<7
med_smooth=0;
end
if nargin<6
%frame_len=40; % default 40 ms
CHECK_VOICING=0;
end
if nargin<5
audio_gap_time=10;% default 10 ms
end
if nargin<4
%frame_len=40; % default 40 ms
pda_threshold=0.4;
end
if nargin<3
FFT_sample_duration=30; % default 30 ms
end
if nargin<2
error(':Sampling rate must be supplied!')
end
%timestep=10;
%total_len=length(audio_in);
%segmentduration=frame_l
%segmentlen = round(segmentduration*(Fs/1000));
%inc=round(timestep*(Fs/1000));
%nf = fix((total_len-segmentlen+inc)/inc);

Cite As

Krishna Pawan Kumar (2024). pdaufft(audio_in,Fs,FFT_sample_duration,pda_threshold,audio_gap_time,CHECK_VOICING,med_smooth) (https://www.mathworks.com/matlabcentral/fileexchange/54023-pdaufft-audio_in-fs-fft_sample_duration-pda_threshold-audio_gap_time-check_voicing-med_smooth), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0