Forums > Dev

Externals for Max5 and Max6

June 11, 2012 | 5:34 pm

Hi,

I’ve made MSP externals for Max5 and Max6 with the SDK of Max 6. With Max 6, everything is working perfectly but I’ve a problem with Max 5. Max 5 can’t load the external because it doesn’t find gensym_tr in the MaxAPI library. It’s seems that I’m not the only one :
http://cycling74.com/forums/topic.php?id=36040
http://cycling74.com/forums/topic.php?id=36234
Instead of my objects, simplemsp~ is working fine on both versions, I don’t know why. If someone got a solution, I will be pleased to know it, I don’t want to create an object for each Max.

Thanks


June 12, 2012 | 7:18 am

You need to compile using the 5.x SDK in order to have the external working in both Max 5 and Max 6.


June 12, 2012 | 9:51 am

It works, but perhaps it’s better to have 2 externals for the durability (if I want to use buffer). And I still can’t figure out, why does the simplemsp~ example of Max 6 SDK work in both Max 5 and Max 6? (because the project is very simple?…).
Anyway, thanks a lot. I’m working on the FFT analysis and your project "zsa.descriptor" helped me a lot to understand.
If you want to have a look : http://pierreguillot.github.com/MaxObjects/

Best,

Pierre


June 12, 2012 | 11:33 am

Yep, I found the bad function….

[simplemsp~] don’t use CLASS_ATTR_LABEL ! The definition has changed :

Max 6 :
#define CLASS_ATTR_LABEL(c,attrname,flags,labelstr)
CLASS_ATTR_ATTR_FORMAT(c,attrname,"label",USESYM(symbol),flags,"s",gensym_tr(labelstr))

Max 5 :
#define CLASS_ATTR_LABEL(c,attrname,flags,labelstr)
CLASS_ATTR_ATTR_FORMAT(c,attrname,"label",USESYM(symbol),flags,"s",gensym(labelstr))

Small differences that matter!


June 12, 2012 | 12:25 pm

… and what is gensym_tr ???
aa


June 15, 2012 | 6:46 am

Hi Nicolas.
Yes, I have read the doc about gensym_tr… but in fact I was wondering what "translated" means!
Anyone else?
aa


June 15, 2012 | 1:32 pm

Hi,

@Nicolas
No I didn’t try and I’ve find another translated function str_tr called by one of my object but I don’t where. I don’t know if it’s possible to force gensym instead of gensym_tr. We have only the prototype of the function, I don’t know how to do this, if you have any suggestion…

@Andrea
I’ve try with a french word to see if it will be translated in english but that didn’t work… .In fact, with translated the character don’t need to be a constante, but I still don’t know the differences…


June 18, 2012 | 2:49 pm

Yes, "translated" is indeed referring to other languages for which Max may be localized. There will be more information about this in the future.

If you want to build for Max 5 and 6 you really should heed EJ’s advice and build against the Max 5 SDK. There are many subtle differences and many opportunities for your code to fail at runtime if you fail to heed this advice.

Cheers,
Tim


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