Implement a reverbration effect on an audio
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I faced diffiulties in implentenig revrerbartion with the feedback filter y[?] = ?[? − ?] + ?[?], where D is related to the dimensions of the simulated room, and
0 < ? < 1 is the absorption coefficient of the wallsusing tho and audio using this eqution. so whats it the mistake and how the code should be
x=audioread("SpeechDFT-16-8-mono-5secs.wav")
sound(x)
y=zeros(1,length x)
for
n=10
a=1
d=0.500
y(n)=a*y(n-d)+x(n)
end
0 comentarios
Respuestas (1)
Walter Roberson
el 29 de Abr. de 2020
In MATLAB, for loops must have one of these syntaxes:
for variable = start : stop
for variable = start : increment : stop
for variable = expression
Using plain for without something that looks like an assignment on the same line, is not valid syntax.
y=zeros(1,length x)
You need to use the function form of length
y=zeros(1,length(x));
4 comentarios
Mrutyunjaya Hiremath
el 29 de Abr. de 2020
Editada: Mrutyunjaya Hiremath
el 29 de Abr. de 2020
y(n) =a*y(n-d)+x(n)
d = 0.5
but array index (n-d) must be integer.
Walter Roberson
el 29 de Abr. de 2020
y(n-d) does not appear anywhere in your posted equation, y[?] = ?[? − ?] + ?[?]
Perhaps it should have been . If so then take note that the [] are not indices and instead represent functional relationship. The value at time n depends upon the value at time n - D. D is time, not relative index. When you convert your equation over to using vectors, you need to convert that D from being time to being relative index, by multiplying the time by the sample rate.
Often when time is converted to delay in samples, the result is not an integer. You can choose to ignore that, using floor() or ceil() or round() of the delay-in-samples; this will result in the signal not really being right, especially if it has to pass through more processing. For example, two stages of delays of 22.5 samples should logically be the same as a single delay of 45 samples, not of 2*floor(22.5) = 44 or 2*ceil(22.5) = 26. The higher your sample rate, the less significant the difference will be for perception. But to get it right, you might choose to use fractional delay techniques.
Ver también
Categorías
Más información sobre Audio Processing Algorithm Design 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!