time interval over the duration of an effect and not the signal

조회 수: 1 (최근 30일)
jérôme TAÏEB
jérôme TAÏEB 2018년 10월 2일
편집: Guillaume 2018년 10월 3일
Hi,
I write a little script in command window of Matlab:
between:
t = (0: 0.001: 10)';
y = sin (2 * pi * 50 * t)
sound (y, Fs);
and
t = (0: 0.001: 100)';
y = sin (2 * pi * 50 * t)
sound (y, Fs);
the 2nd sound is lengthened in duration
OK!
Now I add an effect to this signal with effect.m:
(E)
t = (0: 0.001: 100)';
y = sin (2 * pi * 50 * t)
z = effect (y);
sound (z, Fs);
How to correct (E) for this effect to act in a time interval t1 = (a: 0.001: b) with a> 0 and b <100?
thanks
  댓글 수: 1
jérôme TAÏEB
jérôme TAÏEB 2018년 10월 3일
편집: Guillaume 2018년 10월 3일
sorry,i found the answer with a=30 and b=70:
t= (0: 0.001:30)';
x = sin (2 * pi * 50 * t);
sound(x,20000);
t = (30: 0.001:70)';
y_2= sin (2 * pi * 50 * t);
y=tremolo(y_2,20000);
sound(y,20000);
t = (70: 0.001:100)';
z = sin (2 * pi * 50 * t);
sound(z,20000);
but there lies the following problem:
from an audio file whose variable t does not intervene explicitly:
[y, Fs] = audioread ("audio.wav");
what is the function of Matlab who captures his time t?
thanks

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by