Draw a polar pattern

Kep's icon

Hi,
I'm new in using Max Msp and I'm trying to draw changeable polar patterns of microphones.
For example, choosing "cardioid" I would have in my display the shape of a cardioid, choosing "figure of eight" I would have its shape. They should not be fixed but increasing the gain with, for example, a slider, also the dimensions of the polar pattern should become bigger.
I've seen the object "lcd" or "jit.lcd" but I haven't sufficient indication for their use...
Any suggestions?

Thanks a lot!

Floating Point's icon

here's a starting point (-- you can work out the rest):

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

Kep's icon

Sorry, but I don't understand the code you sent (I see a series of letters and numbers)... How can I use it?

Thanks a lot!

Andrea

Kep's icon

Ok, I've copied the text inside a patch of MAX and magically I can see the complete patch...
Thanks, thanks, thanks!!!!

I will start to to work on this

Brian H.'s icon

I spent a chunk of the fall trying to do just that for a class demo. I a relative newbie to both Max and trig (but know my mic stuff relatively well). It proved quite challenging, and isn't 100% there yet-- I'd love it if I could get some pointers on why the negative polarity components aren't drawing right, for example; And ultimately, instead of using setpixel in LCD, I was hoping to be able use some sort of line to draw a shape, so it can be re-shape in real-time without having to have the 'update' cycle it has now. But I got it functional and the class seemed to find it very informative. The example posted here was actually a great start, so I'll look at integrating (uzi, for example, instead of metro). I've attached what I've done (or tried to do) with the hopes it will be useful and maybe you can post back with your work. Feel free to e-mail me if that's better for you.

Best,
Brian

martinrobinson's icon

there's 'plotter' abstraction missing from the zip...

And BTW you could replace 'setpixel' with 'lineto' get a continuous line (although you'd need to move the pen with 'moveto' before the first 'lineto' otherwise you'll get a spurious line from the previous pen position).

Floating Point's icon

Yep, use [uzi 360]->[- 180] instead of metro->counter and everything will draw much faster, and then you can update the plot every time the user changes a parameter in 'real time'. I think the source of the odd plot behaviour is to do with the 'major kludge' bit, as otherwise the maths looks right. Maybe try to resolve that (sorry no suggestions (too much shiraz tonight)).
T

Brian H.'s icon

Hi,
The Plotter was an 3rd party external I didn't end up using, but wanted to remember it was around in case I wanted to go back to it. I hadn't planned to send this out, so it's a bit of mess still. Thanks for the lineto tip, I see if I can make it work.

The kludge was there because I couldn't get it to draw any out of polarity (-) component to left of LCD center, so had to force it to. It was drawing them, just to the right of center, so one lobe would appear 'inside' the other. You can see this with the hypercard plot.

I really have no idea about that one, if anyone wants to take a stab at it.

Kep, is this thing what you're looking to do at all? If you want to possibly collaborate, feel free to post here or mail me privately.

best,
Brian