Forums > Jitter

Reading jpg files from a folder….

Apr 01 2009 | 9:48 pm

I need to read a bunch of jpegs into a patch. Other than using the jit.qt.window, does anyone know what object to use? I cant seem to find it in the Max tutorials or help options.
Any suggestions to how i can implement this? I just want to read jpeg files, that are initially triggered by an FFT. Every time a sound is triggered by the built-in mic a jpeg should change to the next jpeg.

Help is much appreciated!

Apr 02 2009 | 1:28 am

[jit.matrixset] is the common way, since it loads the matrix in ram, you can acess quickly.

Apr 02 2009 | 1:03 pm

Another option is to make your jpegs into a movie (for instance using Quicktime Pro). Then, you just load the movie into [].
Another option is to read each jpeg only when you need it, for instance using a umenu & autopopulate, and triggering the next jpeg by telling umenu the new number.
But Kyred’s option is surely the one to go first. You could use a umenu-based system to read the jpegs, dimension the jit.matrixset, and fill the set with the different images.
Send a patch of what you have (the jpeg reading system).
Jean-François Charles.

Apr 05 2009 | 2:00 pm

Thank you for all of your suggestions, i really appreciate it.
I have been toying around with it for quite some time now, and i simply can not come to a fruitful solution. I can easily read the jpegs using the into a jit.matrixset, but then i have to read every time i want to view a photo. I dont know what more i can do, or how i can make the umenu to work, as i have tried to connect it to several of the objects, but without any luck.
I simply want to loop through the photos in the umenu without having to read (use the read message) for each jpeg. Meaning opening every jpeg individually… also i am not quite sure of how the autopopulate variable works.

Check out the patch i have uploaded – Help is much appreciated!

Apr 05 2009 | 4:03 pm

you can try this :

— Pasted Max Patch, click to expand. —
Apr 05 2009 | 4:14 pm

Im not sure how to implement that – SORRY!
I tried copy/pasting it into a patch, but it does not allowed me. Any suggestions?

Apr 05 2009 | 4:27 pm

i don’t really uunderstad your problem.
just copy and do "new from clipboard" (cmd-alt-N).

Apr 05 2009 | 4:31 pm

That was weird, it worked fine when i did copy from clipboard. Anyways thank you very much, let me have a look at it.

Apr 06 2009 | 9:56 pm

Thank you very much for the help! I managed to redo the patch a little so it works as looping pictures and viewing them into a window. There is one problem though… my intention was to make a jpeg/photo viewer that is supposed work with an FFT / adc… meaning the input audio signal has to change a photo… at a certain peak, the next photo from the umenu has to be displayed.
I got really stuck in constructing this, as i have no idea to what i should connect the ezadc object.
Help is extremely appreciated!!
Check out the attached patch.

Apr 07 2009 | 1:35 pm

Study Jitter Tutorial 28. You could implement the "peak volume" detection it in your patch.
Then, if you want / need FFT, you should first make a separate patch dealing just with you FFT analysis / spectral peak detection.
Connecting this to your photo engine will be easy. You will need to study the MSP fft tutorials. I would use [pfft~], not only [fft~], might be easier to use, especially if you are beginning with FFT.

Nov 26 2013 | 10:52 pm

I know this thread is old, but i would just like to say that FP’s patch provided the solution i was looking for. I’m still having one problem though. Large pictures (like photo size) get scrambled when i try to display them with jit.pwindow. I’ve created another post for this as it’s likely an entirely different issue:

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

Forums > Jitter