Feedback In a Patch?

Apr 8, 2007 at 8:55am

Feedback In a Patch?

Suddenly I find that I require a patch that incorporates feedback. The goal is to implement a biquad filter given by the difference eqn y(n) = Ax(n) + Bx(n-1) + Cx(n-2) – Dy(n-1) – Ey(n-2).

I have approached this with the use of delay~ objects to get the lsat two sample values for the input and output signals. This requires a feedback loop in the patch which is apparently impossible. MSP seems to detect this configuration and disable audio. Is there a way to patch objects in a feedback configuration?

I know that the implementation of a filter as a max patch may not be possible, but I’m stuck on this feedback issue at the moment.

#31255
Apr 8, 2007 at 9:48am

umm… did you try biquad~
???

#101261
Apr 8, 2007 at 10:48am

Adam wrote:
> Suddenly I find that I require a patch that incorporates feedback.
> The goal is to implement a biquad filter given by the difference eqn
> y(n) = Ax(n) + Bx(n-1) + Cx(n-2) – Dy(n-1) – Ey(n-2).

As Nicholas says, try biquad~.

> This requires a
> feedback loop in the patch which is apparently impossible. MSP seems
> to detect this configuration and disable audio. Is there a way to
> patch objects in a feedback configuration?

To get feedback you need to use configurations like tapin~ -> tapout~ or
send~ -> receive~, but you’re limited to a minimum delay of one vector
size. If you want single sample delays in feedback paths, this needs to
happen in an external.


Owen

#101262
Apr 8, 2007 at 4:04pm

> As Nicholas says, try biquad~.

That would be missing the point.

> To get feedback you need to use configurations like tapin~ -> tapout~ or
> send~ -> receive~, but you’re limited to a minimum delay of one vector
> size. If you want single sample delays in feedback paths, this needs to
> happen in an external.

It would be nice if tapin/out had sample resolution. I have already written the external for this, but a patch would be more illustrative. Maybe there’s a way to do this with the use of a buffer and poke~ ?[img]index.php?t=getfile&id=576&private=0[/img]

#101263
Apr 8, 2007 at 4:49pm

you need to make the point a bit more clear. You cant make a biquad in msp and there is already one there, so I guess I can’t imaine the point.

#101264
Apr 8, 2007 at 11:05pm

Quote: Axiom-Crux wrote on Sun, 08 April 2007 10:49
—————————————————-
> you need to make the point a bit more clear. You cant make a biquad in msp and there is already one there, so I guess I can’t imaine the point.
—————————————————-

I only chose biquad because msp offers a biquad coefficient calculator (filtercoeff~). Once this was working I would be able to prototype any IIR filter in msp. It’s probably doable, just not with delay~ objects alone, perhaps.

Constructive advice still welcome…

#101265
Apr 9, 2007 at 12:13am

try using a send~ recieve~ pair and delay~ ?

#101266
Apr 9, 2007 at 12:18am

forget that idea…

#101267
Apr 9, 2007 at 2:27pm

But cant you already prodotype any IIR filter with biquad~?

I got some pretty amazing results with it.

#101268
Apr 9, 2007 at 9:47pm

biquad can be used for many filter types, and coming up with different coefficient calculations is interesting. but biquad is just one of many iir filter algorithms I would like to try. The biquad object and coeffs in msp are pretty bad sounding imo (i’m an analog filter purist). coefficient meddling can help tho.

Anyway, on the topic… anyone know how to do feedback as in the pic above??

Thanks,
Adam

#101269
Apr 9, 2007 at 11:23pm

Adam wrote:
> The
> biquad object and coeffs in msp are pretty bad sounding imo

Have you tried jkc’s hi-res versions? Less quantisation error might help…

> Anyway, on the topic… anyone know how to do feedback as in the pic
> above??

Short of setting the vector size to 1, and using send~ / receive~ (which
may work for you in a poly~, although I’d expect cpu thrashing), I’m
pretty sure it can’t be done in msp.

AFAIK, when msp does it stuff, it goes through the object graph
presenting each dsp object with a vector’s worth of data at a time. As
such, for most of that vector, the value one sample ago of the output of
some object further downstream makes no sense because it hasn’t
*happened* yet.

Have you come across Faust? It looks like it may be good for making
these sorts of externals:

http://faust.grame.fr/


Owen

#101270
Apr 10, 2007 at 2:20am

You cant feedback directly, msp wont allow it. You have to use send and recieve, thusly, not only do you not have sample accurate feedback, you also dont have sample accurate delays, you cant make a biquad in msp. You must make an external. Id love to see what you make. you could also make a sample delay, that woudl be pretty useful!!!! and easy to code!!!

You should also check out my thread where I made a korg ms20 inspired filter from the biquad~, I think it sounds decent for MSP, I agree I love analogue filters and FM the best, but I also love my laptop and dont want to have huge bulky gear to lug to shows and why buy a huge modular system for 100 times what I payed for max when I can do aobut 1% as much..(though man if I had the cash Id get a buchla 200e … mmmmmm,….. )

Good luck! I really hope you make an exciting filter and share it with the community!!!

;)

#101271
Apr 10, 2007 at 2:31am

what do you know maxobjects.com came through for me!!

http://www.maxobjects.com/?v=objects&id_objet=3734&requested=sample%20delay&operateur=AND&id_plateforme=0

but as far as the feedback, you will have to run the thing in poly~ 1 vs 1 which will take a load of cpu resources, so that you can use send and receive~

at the end of the day its not going to be very useful to have a filter that takes up like 10% cpu (or more!)

This faust looks bad ass, im about to check deeper

#101272
Apr 10, 2007 at 3:18am

Don’t [comb~], [allpass~], and [teeth~] allow shorter-than-vector-
size delay with feedback? If used in conjunction with [sampstoms~] it
seems like you could specify delay times on the order of individual
samples, no? I can’t find any info in the documentation regarding
minimum delay time.

On Apr 9, 2007, at 8:31 PM, Nicholas C. Raftis III wrote:

>
> but as far as the feedback, you will have to run the thing in poly~
> 1 vs 1 which will take a load of cpu resources, so that you can use
> send and receive~
>

—-
Steven M. Miller

Home < http://pubweb.csf.edu/~smill>
SFIFEM <
http://sfifem.csf.edu>
Atrium Sound Space <
http://atrium.csf.edu>
OVOS <
http://pubweb.csf.edu/~smill/ovos.html>

#101273
Apr 10, 2007 at 9:59am

Steven Miller wrote:
> Don’t [comb~], [allpass~], and [teeth~] allow shorter-than-vector-size
> delay with feedback?

Yes, but only within an external, not across msp objects.


Owen

#101274
Apr 10, 2007 at 3:59pm

I see, in other words you want access to the feedback path itself?

On Apr 10, 2007, at 3:59 AM, Owen Green wrote:

> Steven Miller wrote:
>> Don’t [comb~], [allpass~], and [teeth~] allow shorter-than-vector-
>> size delay with feedback?
>
> Yes, but only within an external, not across msp objects.

—-
Steven M. Miller

Home < http://pubweb.csf.edu/~smill>
SFIFEM <
http://sfifem.csf.edu>
Atrium Sound Space <
http://atrium.csf.edu>
OVOS <
http://pubweb.csf.edu/~smill/ovos.html>

#101275
Apr 10, 2007 at 4:29pm

Steven Miller wrote:
> I see, in other words you want access to the feedback path itself?

Not me, but Adam, who wants single-sample delay feedback in msp for
building filters.


Owen

#101276
Apr 10, 2007 at 5:34pm

it would be very useful for FM/PM synthesis to have single sample delay feedback. feeding a sine wave back on itself gives a much better saw wave the smaller the delay…..

#101277
Apr 10, 2007 at 5:59pm

bin ray wrote:
> it would be very useful for FM/PM synthesis to have single sample delay feedback.

Did you try poly~ with a vector size of 1? It’s the only way you’ll get
it in msp – single sample feedback at arbitrary vector sizes isn’t a
feature that could be magicked on to the existing system.

This same discussion, with respect to PD, is given by Miller Puckette
below, certainly better than my attempt:

http://crca.ucsd.edu/~msp/techniques/latest/book-html/node120.html


Owen

#101278
Apr 10, 2007 at 7:30pm

did anyone check out that extarnal I just posted a link to which does exactly what your looking for?@!?!?

Ive done feedback FM with the internal objects and it sounds great!

#101279
Apr 10, 2007 at 8:47pm

>did anyone check out that extarnal I just posted a link to which >does exactly what your looking for?@!?!?

i checked it (flextdelay~), and it crashes maxmsp 4.6.2 every time i try to make an instance of it on my PPC powerbook os x 10.4.9

I’m not clear what youre saying this object will solve anyway, earlier you said to make a feedback loop with one sample delay you’d have to run the flextdelay~ in a poly~ set to vs=1. so surely you might as well use send~ receive~ pairs inside the poly~?
doesnt delay~ do the same thing as flextdelay~?

confused

#101280
Apr 10, 2007 at 8:49pm

owen: yes i did try poly~ with vs=1 and it sounds great, but it uses alot of CPU obviously. im looking for a cheaper solution

#101281
Apr 10, 2007 at 9:17pm

Then it’ll be some kind of external. I don’t know how mxj~ would do for
this sort of thing, but it should be ok – besides that, C beckons (or
maybe Faust, don’t know, not tried it yet).


Owen

bin ray wrote:
> owen: yes i did try poly~ with vs=1 and it sounds great, but it uses
> alot of CPU obviously. im looking for a cheaper solution —
> http://www.myspace.com/binray
>
>

#101282
Apr 13, 2007 at 4:32pm

Adam schrieb:
> biquad can be used for many filter types, and coming up with
> different coefficient calculations is interesting. but biquad is
> just one of many iir filter algorithms I would like to try.

The formula you presented in the first post of this thread is exactly
the one used in biquad~. If you need more than 2 samples delay, look
into comb~.

> The biquad object and coeffs in msp are pretty bad sounding imo (i’m
> an analog filter purist). coefficient meddling can help tho.

That’s the nature of that technique. A biquad is a biquad is a biquad.
Its never analog, but you can do coefficient meddling…
If you know the formula you’re after, you should be able to build it
with comb~/biquad~. But who knows what other formula you had in mind
beside the one you presented, that one would be covered completely by
biquad~ or am I missing something…???

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#101283
Feb 28, 2008 at 12:15pm

why am i having problems adding the external object flextdelay~ from maxobjects.com. Im using a G4 PPC, dropping the object in the cycling74 externals folder and loading max/msp gives me this message when i try and type the object name in an empty box.

• error: flextdelay~: unable to load object bundle executable
2008-02-28 12:18:36.897 MaxMSP[3754] CFLog (21): Error loading /Applications/MaxMSP 4.6/Cycling ’74/externals/flextdelay~.mxo/Contents/MacOS/flextdelay~: error code 4, error number 0 (Library not loaded: /Library/Frameworks/MaxAPI.framework/Versions/A/Ma
xAPI
Referenced from: /Applications/MaxMSP 4.6/Cycling ’74/externals/flextdelay~.mxo/Contents/MacOS/flextdelay~
Reason: image not found)

#101284

You must be logged in to reply to this topic.