gen~ > code export > external
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?
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?)
Well my question indeed was prompted by stkr’s comment in a thread about gen~ and poly~.
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.
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.
"Send gen~ the exportcode message in order to export the genpatcher as C++ code."
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.
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.
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
Forums > Gen