Rather a lot of Javascript for Max

Tom Swirly's icon
Joshua Kit Clayton's icon

Impressive work, Tom!

Thanks for sharing.

nickbugayev's icon

I thought #include was not possible in Max/MSP javascript? How is it that you have #include statements?

Charles Turner's icon

cpp will pre-process any text file.

nickbugayev's icon

@vze26m98

What do you mean exactly?

I can't stick #include at the top of my .js file... Where would I specify my includes then?

Charles Turner's icon

If you have the folder "tom-swirly-max-javascript," take a look at "Makefile." Swirly's Javascript files (.js) contain cpp directives to slice and dice the source according to certain configurations he's established, mostly to create and run a series of test cases for his code. The output is a ".jso" file, which is preprocessed Javascript.

You could also run diff against "js/write_lom.js" and "./write_lom.jso," for example, to get a visceral understanding of what he's doing.

HTH