Max analogs for Pd's [bp~] and [hip~]?

stringtapper's icon

Hi, I am starting on the examples in Andy Farnell's "Designing Sound" but I am also trying to translate the patches into Max as I go. I am wondering if anyone on this list might know which Max objects will work best to replace the Pd objects [bp~] and [hip~]. I am currently replacing [bp~] with [reson~] and I'm replacing [hip~] with the right outlet of [cross~]. However, I am getting slightly different results than Farnell's examples. At the moment I'm dealing specifically with the "phonetones" examples and even more specifically with the contents of the "tline" subpatcher.

Hoping someone can offer a little advice. Thanks.

Gregory Taylor's icon

You tried the outputs of svf~? Barring that, there's always a filtergraph~>biquad~ pair.

Jan M's icon

As far as i know [bp~] is a bandpass filter in PD. So what about playing around with [filtercoeff~] and [biquad~] to replace it?

technically the [reson~] should be similar.

here are some suggestions for PD -> Max/MSP translations:

I recently discovered Andy Farnell's book and also thought about translating some patches. Though at the moment i have very little time and I have to postpone this idea.

Max Patch
Copy patch and select New From Clipboard in Max.

What do you thing about sharing the translated patches? Maybe there are already some people who have worked on this already? as soon as there is a reasonable collection i could set up a web-site for distribution...
[gaussianoise] subpatch in the raindrop section:

stringtapper's icon

Ok I rebuilt the patches in Pd and Max side by side listening to the result as each component was added and the difference is happening at the first [bp~]/[reson~] object. There's a marked difference between the output of these two objects with the same settings. ([svf~]'s bandpass output gives similar but not identical results).

@jan74: I would be glad to share any translated patches I complete. I only have limited time myself, so I will be going rather slowly until the summer.

stringtapper's icon

In case anyone who uses both Max and Pd cares, these two patches show the difference between [bp~] and [reson~]. Wish I understood why.

Max Patch
Copy patch and select New From Clipboard in Max.

Max:

Pd:

Max Patch
Copy patch and select New From Clipboard in Max.

pid's icon
Max Patch
Copy patch and select New From Clipboard in Max.

i'll look at bp~, all this interests me... but in the meantime, hip~ is just a simple highpass, which you do in max by using the onepole~ trick at shown in the helpfile and here:

Maurizio Giri's icon
Max Patch
Copy patch and select New From Clipboard in Max.

There are some coefficient abstractions for the biquad PD object in the externals/nusmuk/biquad directory of Extended PD. The author is Cyrille Henry.
Here is a port I made in MaxMSP for the bp~ coefficients abstraction:

Drkovorkian's icon

I've rebuilt most of these patches in max, you guys still interested in this?

Dg's icon

Oh yes please!

Jan M's icon

with pleasure! Thanks!!!

jan@janmech.de

stringtapper's icon

Absolutely interested Dr. K.

AudioLemon's icon

I would also be interested. I am going to buy the book so to have the patches would be great.

pid's icon

i cannot BELIEVE i have missed this for the last three years:

i mean why the hell didn't anyone tell me about that?! it solves everything. well, almost...

Jan M's icon

Hey Drkovorkian,

... now officially ;) do you still have the translated patches you offered to share?

thx
jan.

stkr's icon

here is an example of using GenExpr to solve these porting problems.

Max Patch
Copy patch and select New From Clipboard in Max.

Max 6.0.3 or later required:

in initial listening tests, this code sounds and behaves exactly like [bp~] or [vcf~].

Mark Durham's icon

Nice to see some talk of Andy's book here. I'd be interested in contributing to any online repository of translated patches. More interesting than this though is the idea of translating and trying to improve the patches. I seem to remember a bit of the book where he is talking about these being first generation models, expecting further versions to sound more realistic. I think there was a nice analogy to early 3d models and how realistic they were and are now. With some group development and thinking from this forum I wonder how far we could take them? I've been working on a version of the electric motor which is starting to sound nice.

Also there is a nice site of the patches translated to Supercollider (something else I've been trying to fin time to learn....!):

pablo's icon

Hi, I was trying out one of Farnell´s examples aswell to just find the same differences between filters in PD and MSP mentioned on this thread, particularly an issue with bandpass.

I don´t have Max 6 in order to try out the latest implementation posted using GenExpr.
However, I opened the port posted by Maurizio using biquad but to me it sounds still quite different using the same freq and Q values as in the original bp~ .

Any other solution to implement bp~ accurately using max?

I´m trying out the patch below:

Wetterberg's icon

@stkr:
>here is an example of using GenExpr to solve these porting problems.

Really cool - can you perhaps be persuaded to add the Q value to the cascaded example on the right?

stkr's icon

@20020, the only way i know in max5 would be to compile your own max external based on the pd bp~ source code. looking at it i think it would not be too hard. i have never been able to replicate bp~ with biquad~s, sorry. or upgrade to max6.

@wetterberg, butterworth low/high passes do not work in that way. they have a flat pass-band and steep roll off. no Q. there is an excellent explanation and demonstration in the [filterdesign] helpfile in max6. in the puckette 6-pole i posted, he uses the q values of the cascaded bp~s to help create the coefficients for the lowpass. it is a fantastic effect as it 'feels' resonant. it has a different sound quality than doing this (very simply) using the [filterdesign] / [cascade~] combo in max6. in the more well known 3 and 5 pole butterworths in pd, puckette uses the 'raw' filters (rzero~, cpole~, etc). these have been ported to max by barry threw i think. they are also very easy and simple to recreate in gen~. i would always use the new filterdesign - it is fantastic, unless i need these things specifically inside gen~ land (which i do).

peter mcculloch has done some fantastic resonant filters on the tools page.

best.

volker böhm's icon
Max Patch
Copy patch and select New From Clipboard in Max.

don't have max6 to check out the gen~solution, but i wouldn't know why you'd have to use it.
i believe there is nothing special in pd's bp~ that can't be recreated with a simple old biquad.
try this and see if it sounds the same:

stkr's icon

well, that is brilliant volker. so much for my biquad/msp skills. thanks very very much for showing the way.

Max Patch
Copy patch and select New From Clipboard in Max.

max6-based proof:

(@20020, use volker's patch in max5)

Luigi Castelli's icon

Hi folks,

I have good news: I am in the process of updating my old objects to Max 6, and while I am at it I decided to also create a PD filter pack and some new externals. I think this will solve the PD => Max filter compatibility issues.
The time-consuming thing is to make the PD filter externals (which are very simple and straight-forward anyway) fit the new Max 6 paradigm with all its idiosyncrasies. For instance, in the PD filters no coefficient interpolation or 64-bit processing is implemented. Also, in PD support for Pattr is not necessary, and so forth...

A good implementation in Max should support all of the above, that's why it's taking me a little longer than expected. In any case, I should be done in 2-3 weeks at the most.
The whole pack should include [lop~], [hip~], [bp~], [vcf~], [rpole~], [rzero~], [rzero_rev~], [cpole~], [czero~], [czero_rev~] and [moses] (I know it's not a filter, but there has been a request for it on the list and it's trivial to port anyway)

If I am forgetting or overlooking something, now it's the time to tell me...

It would help me a great deal if when I release these objects, you guys will report back any issues you may encounter.

Thanks.

- Luigi

Peter McCulloch's icon

As an addition to all of this: it's also important to choose filters based not just on frequency response, but also on time response.

Biquad-based solutions are great for static or slower-moving (non-envelope rate) filters. If you want to sweep the frequency over 5 ms, however, they don't perform as well as other filters such as the Chamberlin (svf~, 2up_svf~) and ladder filters. You simply won't get as snappy and resonant a sweep with 4 cascaded biquad~s as you will with a ladder. (or it will sound awful because the resonance is too high) On the other hand, you can build shapes with biquad~/cascade~ that you can't get with svf~ or ladder filters.

It just depends on what's important to your design.

Edwin Benavides's icon

Hi guys. I'm resurrecting this thread because I couldn't find the filter ports for Max (even tried archive.org). I've been trying to port some patches from Pd but they use objects like rzero_rev~ or rpole~. Could someone share a copy? Do they work on Max 8? Thanks!