Forums > MaxMSP

Java, JavaScript or something else

June 23, 2013 | 12:31 am

Hello

I’m learning Max but I’d really like to ‘get under the hood’ so to speak.

I’ve dabbled in both Java and JavaScript but I’d be interested to hear people’s thoughts as to which language would be best to concentrate on. It would be good to concentrate on a language that has a wide range of uses.

Or perhaps there is another language that would be beneficial to learn and still allow me to delve deeper into Max…?

Many thanks!
J.


June 23, 2013 | 1:34 am

A quick forum-search: http://cycling74.com/forums/topic/java-javascript-or-c .

HTH,
Ádám



Jan
June 23, 2013 | 1:55 am

Hi James,

like always in computing also inside Max each language has it’s strength and is therefore good for certain purposes. If you don’t have any experience in programming the learning curve of JavaScript is less steep than Java (Which doen’t mean that Java is only for experienced geeks).

Some thoughts on Java:
Java is a so-called strictly typed (also called strong typed) language, while JavaScript is a loosely typed (or weak typed) language. Which means among others if you learn Java you need to be more aware things like data types in programming language.
In many scenarios Java will be significantly faster than JavaScript. Besides that it offers you a deeper access to the computer system than JavaScript. I.e. within Java you can have access networking with other computers, you can talk to printers and other parts of you computer system. Java has the capability of multi-threading wich makes it a good choice for more complex tasks. Further more with Java you can write your own msp~ objects for sound processing. (Though since the introduction of gen~ there are very good reasons to use gen~ for this purpose)
A backside for a beginner is that it is more complex in sytax and you need to work with so-called libraries. To have maximums assistance while writing/learning Java I would recommend you to use an IDE such as eclipse for writing. here is a good tutorial to get Eclipse installed and running: http://compusition.com/web/articles/maxmsp-eclipse

Some thoughts on JavaScript:
JavaScript is easier in the beginning, as you do not have to deal with data-types libraries etc. It is a so-called scripting language. As a stating point you can think about it as a very refined remote-control for Max. It is very good for dynamically creating/modifying patchers and I usually choose for JavaScript for things like creating advanced GUIs and more complex data handling. You do not have to deal with anything else than typing the code which – again makes it a good choice to start learning how to code.

If you want to dig more under the hood learning both languages is not mutual exclusive. I would recommend to start with JavaScript and as soon as you have some orientation try to dive into Java as almost everything you learn in JavaScript will help you to understand Java better, but not necessarily the other way around.
And if after all that you feel like learning more try to take a look into C/C++ to write your own externals…. :)

Anyhow coding is fun!!!

Best Jan


June 23, 2013 | 4:00 am

Hi

Adam – Thanks for the link, I thought this must have been a question already asked….

Jan – thanks ever so much for the detailed response, it’s very helpful. I’ve learnt a little of both languages and as I’d prefer to get stuck in at the deep end I may concentrate on Java and then move to C perhaps. I just want to make sure I’m learning the language that will be most useful from a max perspective as I don’t have a great deal of time.

Cheers guys!

James.


June 24, 2013 | 2:31 am

Ever so slightly off topic but digging around I’ve realised that Ruby might also be a useful language to learn with regards to Max/MSP? I like Ruby so this could be an option.

Any thoughts from anyone on this?

Thanks in advance.
J


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