Hi Donal,
in cases like this, it helps to learn a bit about dataflow in PD. All that you are really asking for is a logic check. Is it greater than this? Is it between this and this? Is it greater than that? Check the attached patch and make sure to read the help patch for the Relational Operators ([>], [<], [==], [!=], etc).
best, d.
Donal Carey wrote:
Hi Derek
Cheers for getting back to me with the info, however I'm still having a bit of a problem with it. Basically what the patch is doing is analysing a piece of music using the [bonk~] and [timer] objects. There are then three [gemhead] objects which are activated automatically based on how fast the beats are occuring (i.e. < 100, < 200, < 300). When one particular [gemhead] is activated it needs to deactivate which ever of the other two is active, automatically. The switch object you've suggested doesnt seem to be able to do this. I've attached the patch here so you can see what I'm on about.
Thanks for the help Donal
----- Original Message ----- From: "Derek Holzer" derek@umatic.nl To: "Donal Carey" donal@lunasadesign.com Cc: pd-list@iem.at Sent: Saturday, January 12, 2008 5:28 PM Subject: Re: [PD] Active/deactive gemheads
Easiest way is to control the active Gemhead with a single switch/number box/radio buttons/etc, and use three different [==] objects to check against the current Gemhead number. The [==] of the current Gemhead will send a 1, and the others a 0. See attached patch.
d.
Donal Carey wrote:
Hi
I'm currently building a VJ type patch and have run into a bit of difficulty. I have three [gemheads] connected to three sets of pics and videos and basically what I want to do is if any one of the 3 gem-heads is active the other two must be deactive so there would have to be some sort of mechanism to check if either of the other two gem-heads were active and if so deactivate them. Any suggestions would be much appreciated.
-- derek holzer ::: http://www.umatic.nl ::: http://blog.myspace.com/macumbista ---Oblique Strategy # 76: "Give the game away"
#N canvas 0 22 454 304 10; #X obj 105 121 == 0; #X obj 165 121 == 1; #X obj 225 121 == 2; #X obj 131 148 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 190 149 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 250 149 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 105 194 gemhead; #X obj 165 194 gemhead; #X obj 225 194 gemhead; #X obj 212 28 hradio 15 1 0 3 empty empty empty 0 -6 0 10 -262144 -1 -1 0; #X connect 0 0 6 0; #X connect 0 0 3 0; #X connect 1 0 7 0; #X connect 1 0 4 0; #X connect 2 0 8 0; #X connect 2 0 5 0; #X connect 9 0 0 0; #X connect 9 0 1 0; #X connect 9 0 2 0;
#N canvas 435 84 807 535 10; #X obj 298 537 makefilename %s; #X symbolatom 298 563 20 0 0 0 - - -; #X obj 298 510 coll middleText.txt; #C restore; #X msg 139 828 destroy; #X msg 133 800 create , 1; #X obj 133 857 gemwin; #X obj 239 595 gemhead; #X msg 263 723 auto $1; #X obj 264 696 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X msg 258 671 open $1; #X obj 239 778 pix_film; #X obj 239 875 pix_texture; #X obj 239 905 rectangle 4 3; #X floatatom 285 749 5 0 0 0 - - -; #X obj 315 795 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 258 817 unpack 0 0 0; #X floatatom 292 845 5 0 0 0 - - -; #X floatatom 250 847 5 0 0 0 - - -; #X floatatom 336 846 5 0 0 0 - - -; #X obj 592 523 makefilename %s; #X symbolatom 592 549 20 0 0 0 - - -; #X msg 510 720 auto $1; #X obj 511 693 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X msg 505 668 open $1; #X obj 486 775 pix_film; #X obj 486 872 pix_texture; #X obj 486 902 rectangle 4 3; #X floatatom 532 746 5 0 0 0 - - -; #X obj 562 792 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 505 814 unpack 0 0 0; #X floatatom 539 842 5 0 0 0 - - -; #X floatatom 497 844 5 0 0 0 - - -; #X floatatom 583 843 5 0 0 0 - - -; #X obj 592 496 coll endText.txt; #C restore; #X obj 15 654 pix_image; #X obj 15 575 gemhead; #X obj 92 569 makefilename %s; #X symbolatom 92 595 20 0 0 0 - - -; #X obj 92 542 coll startText.txt; #C restore; #X msg 87 620 open $1; #X obj 18 714 pix_draw; #X obj 14 526 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 487 590 gemhead; #X obj 495 546 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 245 546 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 61 45 bonk~; #X obj 61 15 adc~; #X floatatom 5 140 5 0 0 0 - - -; #X obj 165 73 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 141 128 timer; #X floatatom 141 161 8 0 0 0 - - -; #X obj 147 100 t b b; #X text 207 162 time between beats; #X obj 271 242 change; #X text 98 11 accept input from mp3 player; #X text 317 272 selects which set of pics/videos to play; #X obj 339 326 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X text 321 218 beats are less then 20 per second; #X text 37 136 how hard the beats are occuring; #X obj 274 280 sel; #X obj 105 215 < 100; #X obj 101 257 change; #X obj 103 292 sel; #X obj 117 333 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 273 220 < 200; #X obj 582 222 < 300; #X obj 608 268 change; #X obj 615 311 sel; #X obj 659 355 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 384 657 loadbang; #X obj 444 369 loadbang; #X obj 455 402 t b b; #X obj 367 411 t b b; #X connect 0 0 1 0; #X connect 1 0 9 0; #X connect 2 0 0 0; #X connect 3 0 5 0; #X connect 4 0 5 0; #X connect 6 0 10 0; #X connect 7 0 10 0; #X connect 8 0 7 0; #X connect 9 0 10 0; #X connect 10 0 11 0; #X connect 10 1 15 0; #X connect 10 2 14 0; #X connect 11 0 12 0; #X connect 13 0 10 1; #X connect 14 0 13 0; #X connect 15 0 17 0; #X connect 15 1 16 0; #X connect 15 2 18 0; #X connect 19 0 20 0; #X connect 20 0 23 0; #X connect 21 0 24 0; #X connect 22 0 21 0; #X connect 23 0 24 0; #X connect 24 0 25 0; #X connect 24 1 29 0; #X connect 24 2 28 0; #X connect 25 0 26 0; #X connect 27 0 24 1; #X connect 28 0 27 0; #X connect 29 0 31 0; #X connect 29 1 30 0; #X connect 29 2 32 0; #X connect 33 0 19 0; #X connect 34 0 40 0; #X connect 35 0 34 0; #X connect 36 0 37 0; #X connect 37 0 39 0; #X connect 38 0 36 0; #X connect 39 0 34 0; #X connect 41 0 35 0; #X connect 42 0 24 0; #X connect 43 0 42 0; #X connect 44 0 6 0; #X connect 45 0 47 0; #X connect 45 1 48 0; #X connect 46 0 45 0; #X connect 48 0 51 0; #X connect 49 0 50 0; #X connect 50 0 60 0; #X connect 50 0 64 0; #X connect 50 0 65 0; #X connect 51 0 49 0; #X connect 51 1 49 1; #X connect 53 0 59 0; #X connect 56 0 2 0; #X connect 56 0 44 0; #X connect 59 1 56 0; #X connect 60 0 61 0; #X connect 61 0 62 0; #X connect 62 1 63 0; #X connect 63 0 41 0; #X connect 63 0 38 0; #X connect 64 0 53 0; #X connect 65 0 66 0; #X connect 66 0 67 0; #X connect 67 1 68 0; #X connect 68 0 33 0; #X connect 68 0 43 0; #X connect 69 0 8 0; #X connect 69 0 22 0; #X connect 69 0 4 0; #X connect 70 0 71 0; #X connect 70 0 72 0; #X connect 71 0 43 0; #X connect 71 1 43 0; #X connect 72 0 44 0; #X connect 72 1 44 0;
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list