0
$\begingroup$

I have this block-diagram of Karplus-Strong basic algorithm. enter image description here

Where $$H_{d}(z) = \frac{1+z^{-1}}{2}$$ The problem occurs when I try to get the difference equation. As I can see from the diagram, that would be $$y(n) = x(n-N)+\frac{y(n)+y(n-1)}{2}$$ but I've found online this one(which I know how to implement in code, unlike the first one)$$y(n) = x(n)+\frac{y(n-N)+y(n-(N+1))}{2}$$ Are these two equation somehow equivalent?

$\endgroup$
1
$\begingroup$

Neither of the two equations match with the diagram. It's actually quite straightforward: at the input of the delay you have

$$x[n]+\frac12\big(y[n]+y[n-1]\big)\tag{1}$$

Then a delay of $N$ samples is applied to compute the output, hence

$$y[n]=x[n-N]+\frac12\big(y[n-N]+y[n-1-N]\big)\tag{2}$$

But here I've found a different diagram, which corresponds to the last equation in your question.

$\endgroup$
  • $\begingroup$ Agree, but this equation makes no sense to me, since first N samples of output are zero, right? $\endgroup$ – smiljanic997 Apr 28 at 17:20
  • $\begingroup$ @smiljanic997: Well, that begs the question if your diagram makes sense. $\endgroup$ – Matt L. Apr 28 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.