would ClojureScript on Node.js on Max 8 be possible now?

Iain Duncan's icon

I'm curious whether anyone has managed or is trying to get ClojureScript working with Max now that Max 8 supports Node.js and ClojureScript can run on node without java through the Lumo project?

I for one would love to be able to do score processing with clojure in the max, perhaps even get Steven Yi's score project working in cljs.

Sam Tarakajian's icon

This should be possible in principle. If I understand correctly, the thing you'd want to do would be to emit JS using ClojureScript, then include that as a Node module?

Iain Duncan's icon

I'm honestly not sure yet. Lisps are just so nice for doing musical processing, so I'm hoping to explore whether ClojureScript is a good avenue for doing that and integrating with Max.

Julien Vincenot's icon

Hello Iain
If you look for a way to use Lisp in Max, beyond node.js or Clojure itself, I'm developing a system based on the bach package and SBCL (via Shell) to do exactly that. I have been using for a few projects over the past years, it works pretty well and almost without latency — SBCL is also pretty damn fast !
In particular, it allowed to port some libraries from the PW-OpenMusic-PWGL family pretty easily to the real-time world, and it uses bach as an input/output interface but also to generate the lisp code itself.
At the moment it's more of a method — I wrote a paper about it for ICMC 2017 — but I'm in the process of documenting it and turning it into a package. Let me know if you're interested, I could send you some materials.
Best,
Julien

Iain Duncan's icon

Hi Julien, I would definitely be interested in learning more about it. Is the paper public access?

Thanks!
iain

Julien Vincenot's icon

Yes, I wasn't sure but you can get the pdf here :
http://hdl.handle.net/2027/spo.bbp2372.2017.012
Feel free to shoot me an email if you're interested in trying the current dev.
Just so you know, the system works currently only on mac but I hope I can find someone to help me make a windows version soon. Windows 10 can use a unix shell but there is no shell object yet I think ; maybe with node.js it could be easy to talk to SBCL or any other lisp.
Best,
Julien

Iain Duncan's icon

Thanks Julien, I will definitely check it out! :-)

Iain Duncan's icon

Julien, that looks right up my interests. Out of curiosity, have you checked out Steven Yi's Score project in clojure?

Julien Vincenot's icon

No I didn't hear about it, I found a video about a system used (it seems) to control synthesis, is that the one?

Iain Duncan's icon

I'm not sure, but it's this one here, he has two related projects, Pink and Score. https://github.com/kunstmusik

Julien Vincenot's icon

ok I see ! that makes me think of other notation systems based on Lisp. I listed a few of them in my paper, but again my knowledge of Clojure is close to zero, it looks really like another world to me.
To make a metaphor, if Max is CommonLISP and Pd is Scheme, Clojure would be SuperCollider maybe... 😂

Iain Duncan's icon

Hi Julien, I was wondering if you managed to publish your package since this thread?

thanks!

Julien Vincenot's icon

Hi Iain
Not yet, I'm pretty slow since I started my PhD last year, but I'm in the process of revamping/extending/documenting MozLib the pedagogical library which includes my lisp system for Max. I just converted it to package format and I plan for a release around April. If you are interested in testing it give me your address and I will add you to my mailing list and send you a beta when it's ready.
Best,
Julien

Iain Duncan's icon

Hi Julien, I would definitely be interested in checking out a beta. I'm sure my prof Andrew Schloss at the University of Victoria would be too as he does a lot of Max work. My email is iainctduncan@gmail.com