• ### Digital Filter Desing

First of all, I already read excellent tutorial on the subject by Maelstorm and the superb online book on https://ccrma.stanford.edu/~jos/filters/filters.html.
I would like to compute simple schemes in pd in order to study digital filter design.
However, I don't want to use [cpole~] and related. I want to create the filter on a sample by sample basis using the signal flow from the difference equation.

My first try was:

[sig~ 1] [sig~ 1]
| |
| [lrshift~ -1]
| |
[-~]
| %%%this is my impulse input signal%%%%%
|
[+~]\[r~ feedback]
/|
/ [*~ 0.5]
/ |
/ [s~ feedback]
[bang~]

I get the following error "DSP loop detected (some tilde objects not scheduled)". I'm not an advanced user of pd, and I get kind of lost when trying to implement stuff that implies working on a sample-by-sample level. Do you guys have any recommendations?

Thanks in advance and long live pure data

• Posts 3 | Views 3765
• by the way, I forgot to add in the ASCII figure a [lrshift~-1] just before the [s~ feedback]

• You can't make a feedback loop just by connecting objects together in a loop. The result is a delay-free loop, i.e. y = f(y), which can't be calculated by simply connecting things together in a signal-flow graph. PD doesn't solve equations iteratively like a circuit simulator...

You need to add some explicit delay using [send~] and [receive~] objects, BUT the resulting delay is equal to the block size (typically 64 samples, unless you're using the block~ or switch~ object to change it). That's no good for filters (except comb filters). If you want feedback loops with 1-sample delays, you need to do it in a subpatch with a block size of 1. But that's computationally expensive, so you're probably better off using [biquad~] objects or whatever, or [fexpr~].

Posts 3 | Views 3765
Internal error.

Oops! Looks like something went wrong!