How to audiowrite time shifting audio?

5 ビュー (過去 30 日間)
Nazhan
Nazhan 2019 年 11 月 16 日
回答済み: Walter Roberson 2019 年 11 月 16 日
hello, I made a code for time shifting. The graph appears good but I'm having a problem to audiowrite the time shifted audio. I code the audiowrite but when I play it does not play any sound. help me thanks
clc;
close all;
[sf,Fs] = audioread('signal.flac');
t=linspace(2,4,size(sf,1))'/Fs;
%time shifting
subplot(5,1,4);
plot(t,sf);
title('Time Shifting')
xlabel('Time Period');
ylabel('Amplitude');

回答 (1 件)

Walter Roberson
Walter Roberson 2019 年 11 月 16 日
You cannot write an audio file at particular times. You must construct every sample from time 0.
In the simple case that would involve putting a number of samples with value 0 before the existing values, or removing some of the existing values. However you cannot just do that for fractional times

カテゴリ

Help Center および File ExchangeAudio Plugin Creation and Hosting についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by