Forums > MaxMSP

Cartopol basic question

February 5, 2010 | 1:37 pm

Hi,

In the cartopol help patch when you click on the LCD at what would be North on a compass, the angle you get output is 90 degrees and what would be East on a compass is 0 degrees, South is -90 degrees and West is – 180. I’m sure it is just a bit of simple maths but unfortunately my maths skills are lacking! I want it to output 0 degrees when i click North, 90 degrees when i click East, 180/-180 when i click South and -90 when i click West, any ideas?

It is so that i can control Vbap~ in order to move sounds around a multichannel setup.

Thanks in advance,

Patrick M. Keenan


February 5, 2010 | 8:58 pm

try this one:

[cartopol]
[/ 3.141593]
[scale -1. 1. 0. 1.] ; scale to 0..1
[!- 1.] ; invert
[+ 0.25] ; add offset
[% 1.0] ; wrap around
[scale 0. 1. -180. 180.] ; scale back to -180..180

this maybe seems a bit complicated, but this way you can follow every single
step. Of course you could merge this into a single [expr] object.


February 5, 2010 | 9:21 pm

Thanks so much Mudang,

Thats ingenious, i wish i had maths chops!

I actually got the patch to work by setting the azimuths of the speakers in vbap~ to the ‘wrong’ angles, so that the list of angles for speakers 1, 2, 3, 4 etc were rotated. I appreciate your method though as that is exactly what i wanted.

Cheers, Patrick


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