Forums > Gen

gen~ > code export > external

December 3, 2013 | 2:23 pm

So someone (stkr?) in another thread recently suggested that someone use the code export feature in Gen and create an external. I had to put my noobular foray into external coding on hiatus for a while (working with Eric Lyon’s book), but from what I remember Max externals are coded in C and the Gen code export function exports C++.

So how would creating an external from a Gen patch work using code export?

Thanks!

Dave


December 4, 2013 | 4:57 am

really interesting! is this true about c/c++?
This would be really great, although I’m not sure what the advantages are besides that there is no need to compile the thing on startup.(There are still these issues with having lots of poly~ instances with gen~inside right?)


December 4, 2013 | 4:01 pm

Well my question indeed was prompted by stkr’s comment in a thread about gen~ and poly~.

http://cycling74.com/forums/topic/gen-in-poly-and-variables/

He makes it sound like making such an external would alleviate such a problem.

Also not sure if there would be any advantages beyond the poly~ issue.


December 4, 2013 | 4:19 pm

Funny, I missed that thread. But indeed, gen export to external sounds great hope somebody will chime in to clear things up and give some hints on how to go about this.


December 4, 2013 | 11:21 pm

http://cycling74.com/wiki/index.php?title=Gen_Code_Export_AU

"Send gen~ the exportcode message in order to export the genpatcher as C++ code."


December 5, 2013 | 12:11 am

The crucial question is how to translate the C++ code into C to compile an external.

I’m realizing this might have been better posted in the dev section.


December 9, 2013 | 10:20 am

The Max SDK has an example of an external object built with C++ code, under examples>advanced>collect.

I don’t have enough experience with building externals (only did some Max external work a year ago) OR exactly how this external can use C++ code when it was also my understanding that all Max externals needed to be written in C, but this may be a place to start. It would be great to be able to develop MSP~ externals through DSP code created with gen~.

Perhaps someone with a greater amount of experience in external programming could shed some light on this.


December 10, 2013 | 7:28 am

that would be a huge benefit to develop MSP externals through GEN . Setting up the environment for C code compiling is not so straight forward , there are always many problems . now setting editor for max external compiling is just another level .instead i would not mind to be able to create external straight in GEN and save it as external itself . If GEN is compiling itself that should not be a huge work for C’74 guys , or ? … maybe its a different thing , as for example GEN in poly takes time to load , so it seems like GEN is some sort of addition to MAX itself not a family object code, or it has something to do with JSON as maxpatch interpretation , i dont know . or im totally wrong and that issue is already gone ?
anyway , would be great to know more about it for sure , or shape the idea for the future as a new addition


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