How to patch y[n] = x[n]/samplerate + y[n-1] with x the input and y the output in Pure Data?
-
y[n] = x[n]/samplerate + y[n-1]
-
Now we are getting somewhere:
-
Is such a feedback loop as below forbidden in Pure Data? Can't get it to work...
-
Yes, it's forbidden. You can't loop signal objects like that. You have to use a [send~] / [receive~] pair to make the loop.
-
Thanks! Yes the loop is working now.
-
Is there a simple way to give a single pulse to startup the patch instead of the workaround in the red circle?
-
@Nobody said:
Is there a simple way to give a single pulse to startup the patch instead of the workaround in the red circle?
The best way I know is to create a two element array -- first value 1, second value 0 -- then tabplay~ to get the impulse.
[array define dirac] [loadbang] | [t b b] | | | [; dirac resize 2; dirac 0 1 0( <<-- message, not object | [tabplay~ dirac]
(From memory, maybe I got the array messages wrong)
hjh
-
Why isn't the patch below inverting the input signal?
-
@Nobody said:
Why isn't the patch below inverting the input signal?
If the -1 message isn't being transmitted, then *~ might not be multiplying by -1...?
Otherwise... what is it doing instead of inverting?
hjh
-
Thanks. I now have the following and it is working now.
-
Just put -1 as an argument, like this
[*~ -1]
-
Ah - that's even better.