[PD] Spatialisation tools for pd ?

derek holzer derek at x-i.net
Wed Oct 1 19:12:50 CEST 2003


i wrote:

> as for the GUI, couldn't you simply use Yves' Grid object to send XY 
> coordinates? these could then be remapped from cartesian to polar 
> coordinates, giving you a radius and a distance. i use a similar 
> method with a spatialization patch i worked on with Thomas Musil, 
> controlling it either from a Kaos pad or from Grid. "


here is the abstraction i use, with comments. please note that i haven't 
tested it with VBAP/RVBAP because i use something more "custom", but all 
the building blocks are here......


---------------------------------------begin 
cartesian.to.polar.pd---------------------------------------
#N canvas 106 4 589 414 10;
#X text 128 140 radius;
#X text 286 146 phi;
#X text 127 150 distance;
#X text 283 158 angle;
#X obj 243 154 + 45;
#X obj 243 174 / 360;
#X obj 243 219 * 4;
#X obj 101 219 /;
#X msg 101 197 1 \$1;
#X obj 101 174 clip 1 1000;
#X obj 101 148 * 3;
#X obj 243 197 wrap 0 1;
#N canvas 0 0 450 300 cartesian_to-polar 0;
#X obj 71 65 inlet;
#X text 78 42 x;
#X obj 171 60 inlet;
#X text 178 37 y;
#X obj 93 269 outlet;
#X obj 285 276 outlet;
#X text 99 294 radius;
#X text 286 305 phi;
#X obj 94 198 +;
#X obj 171 122 *;
#X obj 171 89 t f f;
#X obj 72 127 *;
#X obj 72 94 t f f;
#X obj 94 232 sqrt;
#X obj 265 139 atan2;
#X obj 283 200 * 180;
#X obj 282 233 / 3.14159;
#X obj 292 56 inlet;
#X text 300 34 x;
#X connect 0 0 12 0;
#X connect 2 0 10 0;
#X connect 2 0 14 0;
#X connect 8 0 13 0;
#X connect 9 0 8 1;
#X connect 10 0 9 0;
#X connect 10 1 9 1;
#X connect 11 0 8 0;
#X connect 12 0 11 0;
#X connect 12 1 11 1;
#X connect 13 0 4 0;
#X connect 14 0 15 0;
#X connect 15 0 16 0;
#X connect 16 0 5 0;
#X connect 17 0 14 1;
#X restore 101 81 pd cartesian_to-polar;
#X obj 101 49 inlet;
#X obj 101 242 outlet;
#X obj 243 240 outlet;
#X obj 172 49 inlet;
#X text 81 47 x;
#X text 217 47 y;
#X text 334 19 main conversion from x-y coordinates to radius and distance
happens here. Yves Degoyon's 'Grid' object is a good way to send x-y
coordinates.;
#X text 335 195 note: here you will need the 'wrap' object from maxlib.
if you cannot find it you will need to make a subpatch that does the
same job: numbers that go over 1 start to go back down to 0, then
back up.;
#X text -49 157 play with these numbers and see what they do for you!
VBAP may need different numbers than the patch i use this with.;
#X text -28 303 CARTESIAN TO POLAR COORDINATES CONVERSION FOR VBAP/RVBAP
SPATIALIZATION PATCHES;
#X text -28 354 -- derek at x-i.net [thanks also to T.Musil!];
#X connect 4 0 5 0;
#X connect 5 0 11 0;
#X connect 6 0 15 0;
#X connect 7 0 14 0;
#X connect 8 0 7 0;
#X connect 9 0 8 0;
#X connect 10 0 9 0;
#X connect 11 0 6 0;
#X connect 12 0 10 0;
#X connect 12 1 4 0;
#X connect 13 0 12 0;
#X connect 13 0 12 2;
#X connect 16 0 12 1;

---------------------------------------end 
cartesian.to.polar.pd---------------------------------------

good luck!
d.





More information about the Pd-list mailing list