How to audiowrite time shifting audio?

5 visualizaciones (últimos 30 días)
Nazhan
Nazhan el 16 de Nov. de 2019
Respondida: Walter Roberson el 16 de Nov. de 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');

Respuestas (1)

Walter Roberson
Walter Roberson el 16 de Nov. de 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

Categorías

Más información sobre Audio Plugin Creation and Hosting en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by