Forums > Jitter

Newbie: Sound Frequency makes Image Change

February 15, 2008 | 1:19 am

Hi All,

Very new to the forum and Max/MSP/Jitter, so any helpful guidance is appreciated. I’ve been going through tutorials like crazy and have a good first project for myself.

I’d like create a simple slideshow that syncs to an audio input. If the frequency of the audio being played gets over a certain level (also an adjustable threshold) then the image changes… given that I have a folder of images named 001.jpg, 002.jpg, etc.).

Help point me in the right direction, please.

Steve



MIB
February 15, 2008 | 2:31 am

Seems to me that you would probably need a coll for the images and a counter (or random) to get the images into jit.qt.movie…
For the audio part, if you want frequency you need fiddle~, yin~, analyzer~, or something along those lines to get your information. From there it is easy to set a threshold and get bangs to drive the counter/random.
Hope that helps.


February 15, 2008 | 5:23 am

OK, I’ll start there and see what I come up with. Thank you so much for the guidance. With jit.qt.movie… with that be live?



MIB
February 15, 2008 | 6:26 am

This might help to get you started with the process… there might be some redundancy in here (I ripped it out of another patch of mine), but it should load a folder filled with pics and read it into a coll.
Then you can reference the coll and load the pics with either jit.qt.movie or you could also use jit.matrix… have a look at the help files for that.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 607 296 68 196617 prepend read;
#P newex 587 273 30 196617 t b s;
#P newex 587 253 49 196617 r setColl;
#P newex 526 253 48 196617 loadbang;
#P message 489 290 35 196617 write;
#P message 526 372 37 196617 length;
#B color 14;
#P window linecount 3;
#P message 73 105 110 196617 types MooV JPEG mpg4 BMPf VfW FLC MPG dvc! PNG PICT;
#P button 57 234 15 0;
#P window linecount 0;
#P message 80 335 16 196617;
#P window linecount 1;
#P newex 80 285 62 196617 prepend set;
#P newex 80 234 62 196617 prepend set;
#P newex 325 403 51 196617 print coll;
#P message 439 376 33 196617 clear;
#P newex 210 301 27 196617 t i b;
#P button 327 376 15 0;
#P newex 327 297 62 196617 prepend set;
#P message 327 344 222 196617 CIMG0199.JPG;
#P number 210 281 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 393 376 44 196617 pack i s;
#N coll sounds1;
#P newobj 393 403 65 196617 coll sounds1;
#P newex 243 206 40 196617 t b b i;
#P newex 80 260 86 196617 filepath search 9;
#P newex 80 209 65 196617 relativepath;
#P newex 73 84 48 196617 loadbang;
#P number 243 186 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 197 80 15 0;
#P user umenu 197 260 140 196647 1 64 276 1;
#X add 101_0126.JPG;
#X add 101_0127.JPG;
#X add 101_0129.JPG;
#X add CIMG0156.JPG;
#X add CIMG0179_bearbeitet-1.JPG;
#X add CIMG0185.JPG;
#X add CIMG0188.JPG;
#X add CIMG0199.JPG;
#P newex 197 114 76 196617 opendialog fold;
#P newex 197 162 56 196617 folder;
#P message 398 303 14 196617 0;
#P newex 398 280 27 196617 sel;
#P button 369 109 15 0;
#P message 369 154 14 196617 1;
#P toggle 369 177 15 0;
#P newex 369 203 58 196617 metro 100;
#P newex 369 131 61 196617 delay 1000;
#N counter;
#X flags 0 0;
#P newobj 369 231 66 196617 counter;
#P connect 33 0 31 0;
#P connect 13 0 30 0;
#P connect 14 0 26 0;
#P connect 29 0 15 0;
#P connect 26 0 15 0;
#P connect 15 0 27 0;
#P connect 27 0 28 0;
#P connect 11 0 9 0;
#P connect 9 0 8 0;
#P fasten 9 0 14 0 202 145 189 145 189 168 85 168;
#P fasten 30 0 8 0 78 151 202 151;
#P connect 8 0 10 0;
#P fasten 10 0 19 0 202 278 215 278;
#P connect 19 0 23 0;
#P connect 8 1 12 0;
#P connect 12 0 16 0;
#P connect 10 1 21 0;
#P fasten 23 1 20 0 232 336 332 336;
#P connect 21 0 20 0;
#P fasten 16 0 5 0 248 233 349 233 349 105 374 105;
#P connect 5 0 1 0;
#P connect 1 0 4 0;
#P connect 4 0 3 0;
#P connect 3 0 2 0;
#P connect 2 0 0 0;
#P fasten 23 0 18 0 215 338 398 338;
#P fasten 36 0 17 0 612 369 398 369;
#P fasten 31 0 17 0 531 396 398 396;
#P connect 18 0 17 0;
#P fasten 18 0 25 0 398 397 330 397;
#P fasten 24 0 17 0 444 396 398 396;
#P fasten 32 0 17 0 494 337 398 337;
#P fasten 7 0 0 2 403 321 446 321 446 223 402 223;
#P fasten 7 0 3 0 403 324 450 324 450 172 374 172;
#P fasten 7 0 29 0 403 321 105 321 105 305 62 305;
#P fasten 0 0 6 0 374 264 403 264;
#P fasten 0 0 10 0 374 255 202 255;
#P connect 6 0 7 0;
#P fasten 17 0 6 1 398 424 481 424 481 275 420 275;
#P fasten 17 0 0 4 398 428 486 428 486 214 430 214;
#P fasten 16 2 0 4 278 227 430 227;
#P fasten 16 2 6 1 278 238 344 238 344 275 420 275;
#P fasten 20 0 18 1 332 370 432 370;
#P connect 20 0 22 0;
#P fasten 16 1 24 0 263 230 444 230;
#P fasten 35 0 31 0 592 363 531 363;
#P connect 34 0 35 0;
#P connect 35 1 36 0;
#P window clipboard copycount 37;


February 15, 2008 | 8:01 am

kickass again! i’m well on my way then… more tomorrow.


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