How do I save images with my max patch?

Norbe's icon

Hi everyone, i'm new to maxMSP so please bear with me.

Really quick question (tried to search but couldn't find the answer). I've got a maxMSP patch i've created that uses images to control synthesiser elements. I added the image path using file preferences and I'm using a "read" message to open the images. Problem is that I need to pass on the patch as one single entity. I tried using the "build collective" function, but when i opened the collective file the images wouldn't load when i sent out the read messages. Is there a way to bundle all of the files together and automatically re-assign the file preferences so that the images will open onload on another copy of maxMSP?

~Norbert.

Norbe's icon

looking at it again, I believe it may be saving the images (the filesize of the patch is 5.4mb), but the "read" function doesnt open them unless the path is specified in the file preferences, so i need a second copy of the images in a folder anyway.

Any ideas how to get round this?

~Norbert.

jko's icon

If you paste your picture with "Edit > Paste Picture" from the clipboard (e.g. copied in ps) it should be and stay there...

Norbe's icon

Thanks for your reply jko.

There is one slight problem with that, I actually have four different images which the patch uses, and the "read" messages open whichever one is desired.

Also I dont know if it makes any difference but i'm using the jit.qt.movie object to send the image to a matrix after the read is triggered.

~Norbert.

jko's icon

Try including the pictures with Include Files when building the app maybe?

Norbe's icon

Tried that too. Images still didnt load when I clicked the read buttons in the final app :(

~Norbert.

seejayjames's icon

Quote: Norbe wrote on Wed, 21 January 2009 08:50
----------------------------------------------------
> Tried that too. Images still didnt load when I clicked the read buttons in the final app :(
>
> ~Norbert.
----------------------------------------------------

Had problems with this too, with external files of any type. Maybe you can use a drop-down [umenu] with the image file names, then a [prepend read]. In the umenu inspector, set the prefix for the folder you want, and check auto-populate. The menu will fill up with the files (this is very likely the coolest feature ever). Then, when you build your collective, include the folder --- possibly by adding it manually *after* building --- and see if the app will read them using the umenu. Not sure but maybe worth a try.

Holland Hopson's icon

I'll second seejayjames on adding files to the application after building. I've had success doing this in the past. Here's the process for Macs (should be similar for Windows, but I've never done it):

Control-click (or right-click) on the application and choose "show package contents". Copy your files to application_name/Contents/MacOS folder (is this WinOS folder on windows?)

seejayjames's icon

Quote: Holland Hopson wrote on Thu, 22 January 2009 15:17
----------------------------------------------------
> I'll second seejayjames on adding files to the application after building. I've had success doing this in the past. Here's the process for Macs (should be similar for Windows, but I've never done it):
>
> Control-click (or right-click) on the application and choose "show package contents". Copy your files to application_name/Contents/MacOS folder (is this WinOS folder on windows?)
----------------------------------------------------

On Windows you get a folder with all the stuff in it, including the .exe and some support files. This is where you could put the folder and things should be OK regarding finding the files inside. Also this is where you put the jitter support stuff, which isn't included automatically. BTW it would be nice if this happened automatically if you have any objects in the project which need them...it's simple enough to add, but it took a bit of searching to find out where and how and which files, plus it's in different places on Mac/Windows. Just a thought...it's in the reference, but for me, I assumed it would do everything by itself once you say "build".

Zh's icon

if nothing else works, you could paste them all in, position them all on top of each other, give them names and then use thispatcher scripting to bring them to the front when you want them... look at "scripting" in the thispatcher help file...

script bringtofront var1

hacky, innit?