Creating Flange or Variable Delay DSP model

1 reply · 4K views · last reply
Evo8
Messages
168
Reaction score
0

Homework Statement



Im trying to model this in simulink. I am having a little trouble getting things to work. I need to create a variable delay model or basically implement a "flanger" effect.

Flange
A flange is an audio effect, which is achieved by combining two identical signals with each other; the original and delayed signal by a gradually changing amount. The difference equation for the flange effect is given by:
$$x(n)a*[x(n)+x(n-d(n))]$$

Where the time varying delay is given by
$$d(n)=D+\frac{D}{2}[1-sin(\frac{2 \pi f_{d} n}{f_{s}})]$$

Where
- D is a fixed delay,
- fd is the flanging frequency



Homework Equations



N/A

The Attempt at a Solution



So this is what I have right now.
Simulink block diagram of a flanger: From Wave File feeds a sum, gain 0.8, and To Wave File; a delayed branch uses Variable Fractional Delay, with Sine Wave, Constant1, 1-sin, Product, Delay 20, Constant2, D/2 and Add blocks forming the time-varying delay.


The parameters of the Variable fractional delay block are here:
Screenshot of the Simulink Function Block Parameters dialog for Variable Fractional Delay, Main tab, Interpolation mode set to Linear, Maximum delay (Dmax) 1000 samples, Initial conditions 0, Dmin 0 and Dmax 1000.


Im basically trying to mimic that equation with math operators. I am told that it should do the trick. However it doesn't. I am not sure where I am going wrong. Any hints or tips would be greatly appreciated!

Thank you,

E
 
Attachments
  • Simulink block diagram of a flanger: a From Wave File source feeds a sum block, Gain 0.8 and To Wave File; the source also feeds a Variable Fractional Delay driven by a delay path of Constant1, 1-sin, Product, Add, D/2 and Constant2 with Delay 20.
    Flange_simulation.png
    19.5 KB · Views: 922
  • Screenshot of the Simulink Function Block Parameters dialog for Variable Fractional Delay, Main tab, Interpolation mode set to Linear, Maximum delay (Dmax) 1000 samples, Initial conditions 0.
    Variable_fractional_delay.png
    18.1 KB · Views: 977
I do not have much experience with simulink, but it seems to me that your model should work.

What does it do now?
Or what exactly doesn't it do?