pdaufft(audio_in,Fs,FFT_sample_duration,pda_threshold,audio_gap_time,CHECK_VOICING,med_smooth)
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
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Data Import and Analysis > Data Import and Export > Standard File Formats > Audio and Video Data >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |