Forums > MaxMSP

Feedback In a Patch?

April 8, 2007 | 8:55 am

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.


April 8, 2007 | 9:48 am

umm… did you try biquad~
???


April 8, 2007 | 10:48 am

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


April 8, 2007 | 4:04 pm

> 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]


April 8, 2007 | 4:49 pm

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.


April 8, 2007 | 11:05 pm

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…


April 9, 2007 | 12:13 am

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


April 9, 2007 | 12:18 am

forget that idea…


April 9, 2007 | 2:27 pm

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

I got some pretty amazing results with it.


April 9, 2007 | 9:47 pm

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


April 9, 2007 | 11:23 pm

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


April 10, 2007 | 2:20 am

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!!!

;)


April 10, 2007 | 2:31 am

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


April 10, 2007 | 3:18 am

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>


April 10, 2007 | 9:59 am

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


April 10, 2007 | 3:59 pm

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>


April 10, 2007 | 4:29 pm

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


April 10, 2007 | 5:34 pm

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…..


April 10, 2007 | 5:59 pm

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


April 10, 2007 | 7:30 pm

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!


April 10, 2007 | 8:47 pm

>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


April 10, 2007 | 8:49 pm

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


April 10, 2007 | 9:17 pm

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
>
>


April 13, 2007 | 4:32 pm

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


February 28, 2008 | 12:15 pm

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)


Viewing 25 posts - 1 through 25 (of 25 total)