Forums > MaxMSP

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

February 20, 2011 | 8:31 pm

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.


February 20, 2011 | 9:00 pm

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



Jan
February 20, 2011 | 9:03 pm

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:

http://www.cycling74.com/forums/topic.php?id=22387

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.

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:

– Pasted Max Patch, click to expand. –

February 20, 2011 | 11:27 pm

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.


February 20, 2011 | 11:57 pm

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:

– Pasted Max Patch, click to expand. –

Pd:

#N canvas 228 468 430 289 10;
#X obj -149 49 osc~ 350;
#X obj -149 49 osc~ 350;
#X obj -131 68 osc~ 450;
#X obj -149 90 +~;
#X msg -131 115 1;
#X msg -78 114 0;
#X obj -149 142 *~;
#X obj -149 237 dac~;
#X obj -149 167 clip~ -0.9 0.9;
#X obj -149 199 bp~ 2000 12;
#X text -44 114 start dial tone;
#X connect 0 0 3 0;
#X connect 2 0 3 1;
#X connect 3 0 6 0;
#X connect 4 0 6 1;
#X connect 5 0 6 1;
#X connect 6 0 8 0;
#X connect 8 0 9 0;
#X connect 9 0 7 0;
#X connect 9 0 7 1;



pid
February 21, 2011 | 12:00 am

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:

– Pasted Max Patch, click to expand. –

February 21, 2011 | 7:02 am

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:

– Pasted Max Patch, click to expand. –

May 10, 2011 | 1:57 pm

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


May 10, 2011 | 6:14 pm

Oh yes please!



Jan
May 10, 2011 | 10:11 pm

with pleasure! Thanks!!!

jan@janmech.de


May 12, 2011 | 9:00 pm

Absolutely interested Dr. K.


May 15, 2011 | 8:02 pm

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



pid
May 26, 2011 | 8:20 pm

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

http://www.barrythrew.com/2008/03/28/maxmsp-raw-filter-pack/

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



Jan
January 16, 2012 | 2:10 pm

Hey Drkovorkian,

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

thx
jan.


February 7, 2012 | 10:41 am

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

Max 6.0.3 or later required:

– Pasted Max Patch, click to expand. –

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


February 9, 2012 | 9:44 am

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….!):

http://en.wikibooks.org/wiki/Designing_Sound_in_SuperCollider


February 13, 2012 | 10:55 pm

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:

http://obiwannabe.co.uk/tutorials/html/tutorial_rain.html


February 13, 2012 | 11:39 pm

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


February 14, 2012 | 8:44 pm

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


February 14, 2012 | 10:38 pm

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:

– Pasted Max Patch, click to expand. –

February 15, 2012 | 10:38 am

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

max6-based proof:

– Pasted Max Patch, click to expand. –

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


February 15, 2012 | 11:15 am

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


February 15, 2012 | 5:35 pm

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.


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