Align Wave

버전 1.1 (2.97 KB) 작성자: Wei-Rong Chen
Time-align two wave signals by shifting wav2 to be aligned with wav1, using cross correlation.
다운로드 수: 357
업데이트 날짜: 2021/3/16

라이선스 보기

% Time-align two wave signals by shifting wav2 to be aligned with wav1, using cross correlation.
% The inputs 'wav1' and 'wav2' can be either a string of filename or a
% struct in a format such that : 'wav1.s' contains the wave signal in a nSample x 1 vector and 'wav1.sr' is the sampling rate.
%
% All channels in input wav1, wav2 will be averaged before cross correlation comparison.
% The output 'y', 'sr' are modified signals for time-aligned wav2.
% The time of wav1 is alway preserved.
% 'delayT': "Delay" of wav2 with respect to wav1, which means wav2 was "sampled later" (i.e., signals of interest appear "earlier") than wav1 in 'delayT' sec,
% or earlier (if delayT is negative. i.e., signals of interest appear "later") than wav1 in '- delayT' sec.
% 'ifplot': if you want to plot the aligned results. Default = 0.
% 'SaveAsFName' : save the time-aligned wav2 to a specified file. Set to 0 if you don't want to save a file.
% 'resampleSR' : resampling the signals to a common resampling rate. Set to 0 to use the lower sampling rate in wav1 and wav2. Default = 8000;
% 'StartCompareTimeInWav1' : time point (sec.) in wav1 at which the CC comparison starts. {default = 0 sec.}
% 'corr_coeffs' : correlation coefficients.
%
% DEMO:
% StartCompareTimeInWav1 =1.9; % comparing starts from 1.9 sec in wav1;
% [y, sr, delayT] = AlignWave('1.wav', '2.wav', 1, 'alignedwav2.wav', [], StartCompareTimeInWav1);
%
% Weirong Chen 03-23-2014
% Modified Feb-23-2017

인용 양식

Wei-Rong Chen (2024). Align Wave (https://www.mathworks.com/matlabcentral/fileexchange/50473-align-wave), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2012a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Correlation and Convolution에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.1

Update

1.0.0.0