How to audiowrite time shifting audio?

5 visualizzazioni (ultimi 30 giorni)
Nazhan
Nazhan il 16 Nov 2019
Risposto: Walter Roberson il 16 Nov 2019
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');

Risposte (1)

Walter Roberson
Walter Roberson il 16 Nov 2019
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

Categorie

Scopri di più su Audio Plugin Creation and Hosting in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by