tarjectoire in SPAT

Claude's icon

Bonjour,

I try to create some trajectoires for spatialisation in Ircam's SPAT.
Is there a better way to do that than this patch ? I am new in IRCAM
objects and I try to understand this module.

Thanks.

Claude

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

=====
Claude Frenette
compositeur
claudefr@videotron.ca

jasch's icon

hello claude,
you might try the ambimonitor/ambicontrol externals from the icst
ambisonics tools.
this combination gives you a GUI and trajectory recording and plaback
capability.
the output is compatible with the spat-coordinates. attachd is an
extract from the help-files.
you can download the icst ambisonics objects from www.icst.net/
downloads/

hth

/*j

//////////

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 106 484 67 196617 to Spat OPer;
#P message 149 446 76 196617 source Dist $1;
#P message 78 446 70 196617 source Az $1;
#P newex 42 417 102 196617 unpack s 0 0. 0. 0. 0;
#P comment 415 302 57 196617 playback:;
#P comment 709 304 100 196617 move point manually;
#P comment 614 304 38 196617 ...or...;
#P comment 749 323 119 196617 original time in ms;
#P comment 767 341 160 196617 fraction of the trajectory;
#P toggle 485 320 15 0;
#P number 709 322 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 709 359 45 196617 time $1;
#P flonum 727 340 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 485 304 58 196617 start/stop;
#P comment 756 233 88 196617 delete trajectory;
#P comment 673 212 43 196617 finalise;
#P comment 476 145 160 196617 - "close" finalises the trajectory;
#P comment 684 133 116 196617 aed ;
#P comment 476 107 219 196617
- "record" sets ambicontrol in
recording mode;
#P comment 684 121 116 196617 xyz ;
#P comment 476 121 204 196617 - breakpoints are entered in either
format:;
#P comment 468 90 218 196617 record a trajectory as a series of
breakpoints:;
#P comment 452 212 77 196617 record ;
#P comment 649 233 18 196617 ->;
#P comment 510 233 18 196617 ->;
#P comment 534 245 91 196617 inside the monitor;
#P comment 534 233 109 196617 by dragging point no 1;
#P comment 534 221 92 196617 draw a trajectory;
#P message 675 232 33 196617 close;
#P hidden newex 399 47 48 196617 loadbang;
#P message 453 232 49 196617 record 1;
#P comment 687 496 70 196617 resulting in...;
#P comment 762 509 84 196617 0.5 = half speed;
#P comment 762 497 84 196617 1 = real time;
#P hidden newex 649 387 60 196617 loadmess 1;
#P message 717 232 33 196617 clear;
#P user ubumenu 453 405 72 196617 0 1 1 0;
#X add -;
#X add loop;
#X add palindrome;
#X prefix_set 0 0 0;
#P objectname coordinates[1];
#P user ubumenu 543 405 62 196617 0 1 1 0;
#X add -;
#X add linear;
#X add polar;
#X prefix_set 0 0 0;
#P objectname coordinates;
#P message 453 424 43 196617 loop $1;
#P message 543 424 82 196617 interpolation $1;
#P flonum 649 494 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden message 399 66 297 196617 connect le_moniteur , box_rgb
255 50 50 , box 1.5 1.2 0 , xyz 0;
#P newex 399 539 132 196617 ambicontrol trajectory 1 2;
#P comment 762 485 84 196617 2 = double speed;
#P comment 648 479 47 196617 stepsize;
#P comment 410 193 195 196617 record a trajectory in freehand drawing:;
#P comment 492 502 132 196617 read trajectory from a file;
#P message 453 500 29 196617 read;
#P message 453 476 34 196617 write;
#P comment 492 476 121 196617 write trajectory to a file;
#P message 63 386 168 196617 aed 1 27.856449 0. 4.524268 1;
#P newex 64 366 62 196617 prepend set;
#P newex 42 104 48 196617 loadbang;
#P message 42 123 78 196617 xyz 1 0. 0.2 0.;
#P user ambimonitor 38 154 200 200 0 0 1 0 0 0;
#X clickfocus 0;
#X rgb1 0 0 0;
#X rgb2 0 0 0;
#X rgb3 0 0 0;
#X rgb4 235 235 117;
#X rgb5 196 196 196;
#X rgb6 255 255 255;
#X rgb7 176 176 243;
#X rgb8 117 117 255;
#P objectname le_moniteur;
#P comment 237 389 129 196617 azimuth elevation distance;
#P user panel 458 86 352 75;
#X brgb 255 255 255;
#X frgb 181 181 181;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 407 296 535 84;
#X brgb 255 255 255;
#X frgb 181 181 181;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 407 184 535 82;
#X brgb 255 255 255;
#X frgb 181 181 181;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P hidden connect 24 0 22 0;
#P hidden connect 24 0 21 0;
#P hidden connect 24 0 18 0;
#P connect 4 0 55 0;
#P connect 4 0 7 0;
#P connect 55 4 57 0;
#P connect 55 2 56 0;
#P fasten 49 0 16 0 490 376 404 376;
#P fasten 47 0 16 0 714 376 404 376;
#P connect 48 0 47 0;
#P connect 46 0 47 0;
#P hidden connect 29 0 17 0;
#P fasten 11 0 16 0 458 518 404 518;
#P fasten 10 0 16 0 458 494 404 494;
#P fasten 30 0 16 0 680 271 404 271;
#P hidden connect 17 0 16 0;
#P fasten 19 0 16 0 548 445 404 445;
#P fasten 20 0 16 0 458 445 404 445;
#P fasten 23 0 16 0 722 271 404 271;
#P fasten 28 0 16 0 458 271 404 271;
#P connect 22 0 20 0;
#P fasten 18 0 16 1 654 530 526 530;
#P connect 21 0 19 0;
#P connect 7 0 8 0;
#P connect 6 0 5 0;
#P connect 5 0 4 0;
#P window clipboard copycount 59;

Roman Thilenius's icon

anyone else sees the patch above as url link at the forums?

Claude's icon
jasch's icon

hello claude,
thanks for your feedback. the way to handle mltiple trajectories isto
write them to disk and rea them back when needed, coupled with a 1
to start playback immediately.

hth

/*j

> ambimonitor seems to be exactely what i need. Do yoy know if it is
> possible to record more than one trajectory in ambicontrol ? I did
> not find anything on the help file about that.

save as test1.xml

            0
            -0.090000 -0.050000 0.000000
            100
            0.020000 -0.000000 0.000000
            200
            0.280000 0.140000 0.000000
            300
            0.540000 0.400000 0.000000
            400
            0.420000 0.470000 0.000000
            500
            0.200000 0.400000 0.000000
            600
            0.120000 0.110000 0.000000
            700
            0.090000 -0.090000 0.000000
            826
            -0.210000 -0.130000 0.000000
            926
            -0.430000 0.050000 0.000000
            1026
            -0.150000 0.200000 0.000000
            1126
            0.060000 0.070000 0.000000
            1226
            0.080000 -0.100000 0.000000
            1326
            0.220000 -0.080000 0.000000
            1426
            0.350000 0.160000 0.000000
            1526
            -0.360000 0.040000 0.000000
            1626
            -0.000000 -0.290000 0.000000
            1726
            0.420000 -0.050000 0.000000
            1826
            0.080000 0.070000 0.000000
            1926
            -0.070000 -0.130000 0.000000
            2026
            0.090000 -0.280000 0.000000
            2126
            -0.030000 -0.350000 0.000000
            2252
            -0.360000 -0.120000 0.000000
            2352
            -0.010000 0.330000 0.000000
            2452
            0.370000 0.210000 0.000000
            2552
            -0.030000 -0.190000 0.000000
            2652
            -0.290000 -0.050000 0.000000
            2752
            0.040000 0.420000 0.000000
            2852
            0.360000 0.440000 0.000000
            2952
            0.310000 0.460000 0.000000
            3052
            -0.250000 0.220000 0.000000
            3152
            0.260000 -0.040000 0.000000
            3252
            0.730000 0.190000 0.000000
            3352
            0.380000 0.080000 0.000000
            3452
            0.080000 -0.290000 0.000000
            3552
            -0.060000 -0.270000 0.000000
            3652
            0.130000 0.230000 0.000000
            3752
            0.570000 0.140000 0.000000
            3852
            0.350000 -0.340000 0.000000
            3952
            0.310000 0.070000 0.000000
            4052
            0.890000 0.300000 0.000000
            4152
            0.740000 -0.040000 0.000000
            4252
            0.450000 -0.120000 0.000000
            4352
            0.290000 -0.220000 0.000000
            4452
            0.260000 -0.310000 0.000000
            4552
            0.520000 -0.190000 0.000000
            4652
            0.720000 0.230000 0.000000
            4752
            -0.260000 0.100000 0.000000
            4852
            -0.540000 -0.430000 0.000000
            4952
            -0.300000 -0.520000 0.000000
            5052
            0.080000 -0.060000 0.000000
            5152
            0.130000 0.100000 0.000000

save as test2.xml

            0
            0.240000 -0.310000 0.000000
            100
            0.200000 -0.310000 0.000000
            200
            0.150000 -0.310000 0.000000
            500
            0.130000 -0.310000 0.000000
            600
            0.100000 -0.280000 0.000000
            700
            0.020000 -0.260000 0.000000
            800
            -0.020000 -0.250000 0.000000
            900
            -0.090000 -0.240000 0.000000
            1000
            -0.150000 -0.230000 0.000000
            1100
            -0.180000 -0.140000 0.000000
            1200
            -0.190000 -0.100000 0.000000
            1300
            -0.210000 -0.030000 0.000000
            1700
            -0.260000 -0.020000 0.000000
            1800
            -0.340000 0.040000 0.000000
            1900
            -0.410000 0.140000 0.000000
            2000
            -0.420000 0.190000 0.000000
            2100
            -0.440000 0.230000 0.000000
            2200
            -0.470000 0.280000 0.000000
            2300
            -0.510000 0.300000 0.000000
            2400
            -0.530000 0.300000 0.000000

your patch, modiefied a little

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 547 500 90 196617 read test2.xml , 1;
#P message 536 457 82 196617 write test2.xml;
#P message 453 458 82 196617 write test1.xml;
#P comment 106 484 67 196617 to Spat OPer;
#P message 149 446 76 196617 source Dist $1;
#P message 78 446 70 196617 source Az $1;
#P newex 42 417 102 196617 unpack s 0 0. 0. 0. 0;
#P comment 415 302 57 196617 playback:;
#P comment 709 304 100 196617 move point manually;
#P comment 614 304 38 196617 ...or...;
#P comment 749 323 119 196617 original time in ms;
#P comment 767 341 160 196617 fraction of the trajectory;
#P toggle 485 320 15 0;
#P number 709 322 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 709 359 45 196617 time $1;
#P flonum 727 340 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 485 304 58 196617 start/stop;
#P comment 756 233 88 196617 delete trajectory;
#P comment 673 212 43 196617 finalise;
#P comment 476 145 160 196617 - "close" finalises the trajectory;
#P comment 684 133 116 196617 aed ;
#P comment 476 107 219 196617
- "record" sets ambicontrol in
recording mode;
#P comment 684 121 116 196617 xyz ;
#P comment 476 121 204 196617 - breakpoints are entered in either
format:;
#P comment 468 90 218 196617 record a trajectory as a series of
breakpoints:;
#P comment 452 212 77 196617 record ;
#P comment 649 233 18 196617 ->;
#P comment 510 233 18 196617 ->;
#P comment 534 245 91 196617 inside the monitor;
#P comment 534 233 109 196617 by dragging point no 1;
#P comment 534 221 92 196617 draw a trajectory;
#P message 675 232 33 196617 close;
#P hidden newex 399 47 48 196617 loadbang;
#P message 424 235 49 196617 record 1;
#P comment 687 496 70 196617 resulting in...;
#P comment 762 509 84 196617 0.5 = half speed;
#P comment 762 497 84 196617 1 = real time;
#P hidden newex 649 387 60 196617 loadmess 1;
#P message 717 232 33 196617 clear;
#P user ubumenu 453 405 72 196617 0 1 1 0;
#X add -;
#X add loop;
#X add palindrome;
#X prefix_set 0 0 0;
#P objectname coordinates[1];
#P user ubumenu 543 405 62 196617 0 1 1 0;
#X add -;
#X add linear;
#X add polar;
#X prefix_set 0 0 0;
#P objectname coordinates;
#P message 453 424 43 196617 loop $1;
#P message 543 424 82 196617 interpolation $1;
#P flonum 649 494 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden message 399 66 358 196617 connect le_moniteur , show_box 1
, box_rgb 255 50 50 , box 1.5 1.2 0 , xyz 0;
#P newex 399 539 123 196617 ambicontrol trajectory 1;
#P comment 762 485 84 196617 2 = double speed;
#P comment 648 479 47 196617 stepsize;
#P comment 410 193 195 196617 record a trajectory in freehand drawing:;
#P comment 246 497 132 196617 read trajectory from a file;
#P message 453 500 90 196617 read test1.xml , 1;
#P message 453 476 34 196617 write;
#P comment 246 471 121 196617 write trajectory to a file;
#P message 63 386 168 196617 aed 1 52.4314 0. 1.640122 1;
#P newex 64 366 62 196617 prepend set;
#P newex 42 104 48 196617 loadbang;
#P message 42 123 78 196617 xyz 1 0. 0.2 0.;
#P user ambimonitor 38 154 200 200 0 0 1 0 0 0;
#X clickfocus 0;
#X rgb1 0 0 0;
#X rgb2 0 0 0;
#X rgb3 0 0 0;
#X rgb4 235 235 117;
#X rgb5 196 196 196;
#X rgb6 255 255 255;
#X rgb7 176 176 243;
#X rgb8 117 117 255;
#P objectname le_moniteur;
#P comment 237 389 129 196617 azimuth elevation distance;
#P user panel 458 86 352 75;
#X brgb 255 255 255;
#X frgb 181 181 181;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 407 296 535 84;
#X brgb 255 255 255;
#X frgb 181 181 181;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 407 184 535 82;
#X brgb 255 255 255;
#X frgb 181 181 181;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P fasten 61 0 16 0 552 527 404 527;
#P fasten 60 0 16 0 541 474 404 474;
#P fasten 59 0 16 0 458 474 404 474;
#P fasten 49 0 16 0 490 376 404 376;
#P fasten 47 0 16 0 714 376 404 376;
#P fasten 11 0 16 0 458 518 404 518;
#P fasten 10 0 16 0 458 494 404 494;
#P fasten 30 0 16 0 680 271 404 271;
#P hidden connect 17 0 16 0;
#P fasten 19 0 16 0 548 445 404 445;
#P fasten 20 0 16 0 458 445 404 445;
#P fasten 23 0 16 0 722 271 404 271;
#P fasten 28 0 16 0 429 271 404 271;
#P fasten 18 0 16 1 654 537 517 537;
#P hidden connect 24 0 22 0;
#P hidden connect 24 0 21 0;
#P hidden connect 24 0 18 0;
#P connect 5 0 4 0;
#P connect 6 0 5 0;
#P connect 7 0 8 0;
#P connect 21 0 19 0;
#P connect 22 0 20 0;
#P hidden connect 29 0 17 0;
#P connect 46 0 47 0;
#P connect 48 0 47 0;
#P connect 55 2 56 0;
#P connect 55 4 57 0;
#P connect 4 0 7 0;
#P connect 4 0 55 0;
#P window clipboard copycount 62;