< Back to IRCAM Forum

Mubu.gmm problem in standalone Max app

Hi guys,

I might be missing something trivial, but I’m having a strange problem when exporting a standalone Max app which uses a mubu.gmm object.

Basically, I’ve already got a training model, which I previously created with the gmm_vowels.maxpat example: to do so, I did record some audio, labeled the classes, trained the machine THEN exported the model on a .json file. All good.

Now I want to use this model on another patch, so I load it with a ‘read’ message to a mubu.gmm object.
Here’s the problem:

  • if I do this within a normal Max patch/project, everything works perfect
  • if I export the very same patch in a Max collective or app, I got this very interesting error (see attached picture LOL)

Same error on OSX Mavericks and Yosemite.

Any ideas?

thanks a lot for your help

L

any news guys?

Hi,

After a quick search into the source code, this error seems to happen because of a path formatting problem.
There’s a new version of xmm for max coming soon (pretty much the same, but code was rewritten from a new xmm api), although i’m not sure this update will fix your problem.

To solve it, trying different path formattings (absolute, relative, or some options max might offer) could be of some help.

Good luck !
Joseph

hi Joseph,

thank you very much for your answer, really appreciated!

I’m working within a project and all the externals are ‘consolidated’ so everything is kept local.

Are you saying that I should keep the externals in the library as global references then build the application?

thanks

L

That might be a solution.
Honestly I have no idea, try and see if it works.

Otherwise, how do you use the “read” message ? Loading models manually, or with predefined names ?
In any case, what I was saying was that you could try to format the paths to your model files to get them to be absolute, starting by “Macintosh HD:/” or “/Users”, I don’t know …
You could do this using an opendialog object, then the conformpath object or some combination of fromsymbol, tosymbol and sprintf objects, then prepend “read” to this path and give it to the mubu object.
Or do some character replacement in the path until you get to a working result.
And of course this is likely to totally change if you want to build for windows

Good luck again !
Joseph

thanks a lot Joseph!

I’ll give it a go tomorrow and let everybody here know

kind regards,

L

hi guys,

I can confirm that Joseph’s suggestion worked well.

I moved the model .json file to my desktop and changed the path to absolute with the object . I then built the standalone application and now the mubu.gmm can succesfully read the model.

However, this means that I have to read a file which is not local to the project folder: actually, this file now lies in a very specific location (my desktop, or any other absolute path), which is not really ideal.

Not a big issue, but it would still be nice to have a fix for it :slight_smile:
Hope the Mubu authors are reading this!

thank you

L

Hey L,

Thanks for the update, that’s good to know.
Not sure if this is really a MuBu related issue, I remember having some troubles dealing with paths in standalones …
Maybe other workarounds are possible, I never really dug into this.
Did you try searching for similar threads into cycling’s forum ?

Best,
Joseph

not really yet

I’m sure local paths in standalones work well for audio and media in general, might it be a problem with .json files only?

I’ll have a look and see

thanks again

L