Advice about programming language for MaxMSP development : C, C++, Flext? Books?

Roald Baudoux's icon

Hello,

What compiled language would you recommend to a beginner to create MaxMSP externals on MacOS X :
- C ?
- C++ ?
- C++ with Flext?
- other ?

Also, which book(s) would you recommend (possibly in French) to learn programming in the advised language?

Thank you in advance.

Best regards,

Roald Baudoux

Mike S's icon

this is just what i've been meaning to ask

oli larkin's icon

C to start with, since most max externals you find with source code are written with C. After that it's relatively painless to move to C++ (if you need to).

Kerrnigan & Ritchie - The C programming Language is really good

Emmanuel Jourdan's icon
pdelges's icon

+1

K&R (pour les intimes) existe en français chez Dunod:
http://www.dunod.com/livre-dunod-9782100487349-le-langage-c.html

I never read this second edition and just discovered that my copy is now 20 years old...

p

Timothy Place's icon

When I was first learning C, I found "Practical C Programming" by Steve Oualline to be very effective. It does enough hand-holding to be helpful, but doesn't treat you like you're clueless.

Roald Baudoux's icon

I found this one : "Le Livre Du C Premier Langage", Claude Delannoy, Eyrolles.

Thanks for all the answers.

Roald Baudoux

Antoine Villeret's icon

hi,

thanks for the refs.

what is the less painful way to move a Jitter project from C to C++ ?

best

a.

Emmanuel Jourdan's icon

You might want to consider making shaders (if what you're trying to do apply to that...). It's super fast.

Jean-Francois Charles's icon

I see that the question originates from experienced Max users, but just a remark for readers of the thread...
The first question before developing an external in Max is of course to look if Java/mxj is an option (or, as says EJ shaders in Jitter). Because it might be really more difficult/time consuming to develop and maintain a C external on PC and Mac.

Jean-Francois Charles's icon

Sorry, not a very useful comment, didn't see the thread was in the "dev" forum.

Antoine Villeret's icon

For what I want to do (to communicate with a GigE camera) shader or Java are not a solution...

Emmanuel Jourdan's icon

Tim and Graham (at least) posted some examples of C++ externals (there's even one in the SDK now). It's quite straightforward AFAICT.

Timothy Place's icon

The example in the SDK for a general Max object that uses C++ is the 'collect' example (uses a std::vector from the library).

Similarly, there is a 'simplejit' example ( in the latest SDK @ https://cycling74.com/download/MaxSDK-5.1.1.zip ) for Jitter that uses C++ (some easy template stuff).

The SDK examples are really C-ish and just using a couple of random things from C++. The templates that Graham made for C++ really much more C++ish than these SDK examples. You should be able to search the forum to find them.

Cheers