FTM standalone process

Nick Donovan's icon

Hey everyone, I'm trying to make a standalone app with ftm objects and messages in it. I have read the ftmstandalone txt file and it is still no clearer. Here is my process, if anyone can see anything wrong or dumb I'm doing please let me know.

My process is to put the externals folder (from ftm-and-co) onto the ftmstandaloneAnte droplet (not sure if this right... the instruction on the text file are really unclear) and then use open the patch -use the builder to put the top level pather in and press build > application > save into the Ftm Standalone folder and then drop the icon on the FTMStandalonePost object.

There must be something I'm missing/doing very wrong as when I open the application it shows the ftm objects as greyed and missing.... I'm sure there is something I'm doind wrong. My max window on the app reads

ftm.mess: unable to load object bundle executable
2010-12-22 13:42:28.614 LHSC[1381:207] Error loading /private/var/folders/cN/cNMYWM5uE7Oe7f2dbD17Jk+++TI/TemporaryItems/appRuntime-mxt/ftm.mess.mxo/Contents/MacOS/ftm.mess: dlopen(/private/var/folders/cN/cNMYWM5uE7Oe7f2dbD17Jk+++TI/TemporaryItems/appRunt
ime-mxt/ftm.mess.mxo/Contents/MacOS/ftm.mess, 262): Library not loaded: @loader_path/../Frameworks/FTMlib.framework/Versions/2.5/FTMlib
Referenced from: /private/var/folders/cN/cNMYWM5uE7Oe7f2dbD17Jk+++TI/TemporaryItems/appRuntime-mxt/ftm.mess.mxo/Contents/MacOS/ftm.mess
Reason: image not found
ftm.mess: ftm.mess: no such object
ftm.object: unable to load object bundle executable
2010-12-22 13:42:28.662 LHSC[1381:207] Error loading /private/var/folders/cN/cNMYWM5uE7Oe7f2dbD17Jk+++TI/TemporaryItems/appRuntime-mxt/ftm.object.mxo/Contents/MacOS/ftm.object: dlopen(/private/var/folders/cN/cNMYWM5uE7Oe7f2dbD17Jk+++TI/TemporaryItems/app
Runtime-mxt/ftm.object.mxo/Contents/MacOS/ftm.object, 262): Library not loaded: @loader_path/../Frameworks/FTMlib.framework/Versions/2.5/FTMlib
Referenced from: /private/var/folders/cN/cNMYWM5uE7Oe7f2dbD17Jk+++TI/TemporaryItems/appRuntime-mxt/ftm.object.mxo/Contents/MacOS/ftm.object
Reason: image not found
ftm.object: ftm.object: no such object
ftm.list: unable to load object bundle executable
2010-12-22 13:42:28.704 LHSC[1381:207] Error loading /private/var/folders/cN/cNMYWM5uE7Oe7f2dbD17Jk+++TI/TemporaryItems/appRuntime-mxt/ftm.list.mxo/Contents/MacOS/ftm.list: dlopen(/private/var/folders/cN/cNMYWM5uE7Oe7f2dbD17Jk+++TI/TemporaryItems/appRunt
ime-mxt/ftm.list.mxo/Contents/MacOS/ftm.list, 262): Library not loaded: @loader_path/../Frameworks/FTMlib.framework/Versions/2.5/FTMlib
Referenced from: /private/var/folders/cN/cNMYWM5uE7Oe7f2dbD17Jk+++TI/TemporaryItems/appRuntime-mxt/ftm.list.mxo/Contents/MacOS/ftm.list
Reason: image not found
aka.wiiremote 1.0B7-UB by Masayuki Akamatsu
cannot enable FTM JavaScript support
Jitter 1.7.0 installed
jit.gl.shader: unable to find CG framework.
jit.openexr: No such object

PLEASE HELP AAAAAH!

Nick Donovan's icon

Posted on the ftm website but nothing. Any sugestions?

Nick Donovan's icon

Hey everyone, just been discussing this with dtr and thought it would be useful to have for everyone if needed as there seems to be no current solutions on the board for this issue: problems in using ftm objects in standalone apps.
The link below from ircam is unclear and gave me many headaches so I thought I'd attach a useful document I found from my time working through this process regarding a number of issues including what to include in the search path, where to place folders etc.

Instructions for Building your application in Max. (with FTM objects).

1.    Open your patch and possibly copy and paste all the ftm objects you use onto the top level of the patch (the one with the standalone object on it)… you don’t need to separate them from the original connections of paste the whole objects just the ftm bits…. This may not even be important but it immediately lets you see whether the standalone has worked if your objects are in subpatchers - if there are non disregard this)
2.    Drop the externals folder (Cycling 74 > Ftm & Co > externals) onto the StandaloneAnte ‘droplet’ in the FTMStandalone folder. DO NOT DROP THE ‘ftm-externals’ folder onto the FTMStandaloneAnte droplet!!!
3.    Go into max and click build app/collective and then buid it (selecting application) into the FTMStandalone folder (nothing else is required DO NOT PUT IN ANY MORE FTM OBJECTS BY ‘INCLUDE FILE’ OR ‘INCLUDE FOLDER’.
4.    Drop the App icon on the FTMStandalonePost droplet. Voila, you can use your app!

NOTE: Something weird I noticed is that when the app ISNT dropped onto the POST droplet it still works…..but wont work when moved away from the FTMStandalone folder.

johannes's icon

hey nick,

thanks for sharing this. i will give it try these days.

btw. is there a difference in cpu utilization and performance between ftm standalone and a ftm patch?

ciao,
johannes

dtr's icon

One particularity in my case was that i had the whole FTM folder in my search path. That doesn't work. I had to take it out and set individual paths to the externals, FTM, Gabor and MnM folders.

This is with Max 6, btw.

@johannes: not sure if a single standalone compared to a single patch is faster but in the case of very large systems like mine, splitting it up in individual apps definitely speeds things up. One of the gains is that they run in separate threads so the OS can distribute 'm over multiple CPU cores more efficiently than Max does.

johannes's icon

dtr, very interessting. i also got a big ftm-patch (polar based double playhead phasevocoder) with a lot of abstractions to make things a bit less cpu intensive, but still get about 20-30% cpu utilization. that of course makes gui things stuck. i wonder if it is polar pvoc related or patching style issue. (i use about 50 ftm-objects …)

is there a way to split the processes over the cpu cores in max?
in pd there is the pd~ object…

jo

dtr's icon

> is there a way to split the processes over the cpu cores in max?

There's a way using poly~ with 'parallel 1'. Each voice will run in its won thread. Of course whether you can split it up in poly voices depends on your system architecture.

I'm not an optimization-guru so others might have better/more tips.

> i wonder if it is polar pvoc related or patching style issue.

I couldn't say. I'm just using some MNM objects for processing sensor input streams. No FTM audio related stuff.

My system is big and heavy because it has Kinect motion tracking, analog sensor inputs, quad audio synthesis and openGL graphics outputting to a triplehead2go beamer setup...

Splitting this up in individual applications/collectives greatly helps keeping the framerate up.

johannes's icon

you are right, dtr.

putting everything in a poly~ object make everything smoother, even though
the cpu utilization still seems to be the same.

i will create an max app these days and report how it works…

thanks,
j

dtr's icon

you're only going to see CPU improvements if poly can divide things over multiple voices. a poly with 1 voice won't make a difference.

johannes's icon

yes, of course i use 2 poly voices. anyway, i expect the cpu to be lower but i guess its the heavy fft process…

Nick Donovan's icon

> My system is big and heavy because it has Kinect motion tracking, analog sensor inputs, quad audio synthesis and openGL graphics outputting to a triplehead2go beamer setup...

> Splitting this up in individual applications/collectives greatly helps keeping the framerate up.

Hi dtr, it sounds like I'm building a similar patch right now - with Kinect and a lot of different kinds of other processing going on. This off FTM topic but is there a best practice for saving cpu through dividing up your patch into apps/collectives and allowing the to talk to each other? UDPsend for example?
N

dtr's icon

i'm using OSC over updsend/receive and jit.netsend/receive. you could throw in soundflower to patch audio around and syphon for hardware accelerated texture routing.

i don't really know the best practices though.

Nick Donovan's icon

That's cool. I think I just meant 'better than mine' - this sounds good.