Forums > Jitter

# Selecting planes and performing calculations on them

November 4, 2006 | 10:58 pm

Hi,

Does anybody know how to solve this riddle?

I have a matrix consisting of an arbitrary number of planes.
Now, I want to put noise over one (or more) of them and be able to change which plane(s) I’m putting the noise over.
Jit.unpack constructions are not an option (as far as I can see) because this object assumes that you know beforehand how many planes you’ve got.

– TB

November 5, 2006 | 12:09 am

November 5, 2006 | 11:31 am

hello,

you could use jit.expr:

#P window setfont Geneva 9.;
#P window linecount 1;
#N vpatcher 15 55 325 298;
#P window setfont Geneva 9.;
#P window linecount 1;
#P newex 80 99 27 9961481 – 1;
#P newex 50 50 73 9961481 t b b;
#P newex 80 146 104 9961481 sel 0 1;
#P newex 80 125 43 9961481 == 0;
#P newex 50 75 40 9961481 uzi 5;
#P newex 113 76 50 9961481 random 5;
#P inlet 50 30 15 0;
#P outlet 127 168 15 0;
#P outlet 80 168 15 0;
#P connect 2 0 7 0;
#P connect 7 0 4 0;
#P connect 4 2 8 0;
#P connect 8 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 0 0;
#P connect 7 1 3 0;
#P connect 3 0 5 1;
#P connect 6 1 1 0;
#P pop;
#P newobj 515 193 104 9961481 p select random plane;
#P message 515 366 269 9961481 expr in[0].p[0] in[0].p[0] in[0].p[0]
in[1].p[0] in[0].p[0];
#P newex 515 331 60 9961481 prepend set;
#P newex 90 67 40 9961481 t b b b;
#P newex 515 233 88 9961481 sprintf in[0].p[%i];
#P newex 515 289 67 9961481 prepend expr;
#P newex 515 265 52 9961481 zl group 5;
#P message 609 234 51 9961481 in[1].p[0];
#P user jit.pwindow 89 367 66 66 0 1 0 0 1 0;
#P newex 90 342 56 9961481 jit.expr;
#P newex 313 204 104 9961481 jit.noise 1 char 64 64;
#P button 90 48 15 0;
#P newex 90 204 190 9961481 jit.bfg 5 char 64 64 @basis noise.simplex;
#P fasten 7 0 3 0 520 315 95 315;
#P connect 7 0 10 0;
#P fasten 2 0 3 1 318 278 141 278 141 309 144 309 144 320 141 320;
#P connect 3 0 4 0;
#P fasten 0 0 3 0 95 242 83 250 95 260;
#P fasten 9 0 0 0 95 117 92 117 92 127 95 127;
#P fasten 9 2 12 0 125 95 291 95 302 77 312 96 520 96;
#P fasten 9 1 2 0 110 188 157 188 157 160 184 160 184 190 257 190 276 161
292 189 318 189;
#P connect 10 0 11 0;
#P connect 12 1 5 0;
#P connect 12 0 8 0;
#P fasten 5 0 6 0 614 258 520 258;
#P connect 8 0 6 0;
#P connect 6 0 7 0;
#P connect 1 0 9 0;
#P window clipboard copycount 13;

best,
nesa

November 6, 2006 | 9:13 pm

Not only does your patch look super-cool, it actually works very well too! I like…

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