LISP and Max
Hi,
Is there any LISP interpreter available for Max, more specifically for Max 7 or 8? It would be great to be able to work with LISP in a Max Environment.
Any hints or insights on this question would be much appreciated.
All the best,
António
The only solution of which I was aware was Brad Garton's maxlisp object, which is very old. It might still work, it might not. Oh, wait - it's almost certainly a 32-bit external. Max 7 only, if so....
http://sites.music.columbia.edu/brad/maxlisp/
Thank you, Max. Your reply is actually what got me to go through the motions. I had seen Brad Garton's maxlisp and maxlispj pages, but I hesitated (well, the latest version of maxlispj is from 2011.) And well, the good news is that it worked.
Since I'm on Mac, I installed maxlispj on Max 7 — it's available here: http://sites.music.columbia.edu/brad/maxlispj/#download
For other Mac users, you have to place the BGabcl.jar file in: /Applications/Max 7.app/Contents/Resources/C74/packages/max-mxj/java-classes/classes/
I also placed the maxlispj folder in: ~/Documents/Max 7/Packages/ — the usual thing.
All the best,
António
Hi Antonio,
I had the same question so I found yours. I'm looking into the Bach library. Can be downloaded with package manager. It's based on the same tree-like lisp structures as Open Music.
I just started looking into Bach library, so I don't really know if it'll solve my lisp problems or maybe I go back to Open Music.
Best,
Maija
Hey, Maija - enjoyed your recent release on Ravello (played some of it on my radio program, even). Was this done with Max?
Hi Gregory, thank you for listening. Truly honoured to part of your show!
Yeah, most electronics done in Max. I use sound files as well as live processing. All live processing and most fixed parts are also done in Max or AudioSculpt. I'm a huge fan of SuperVP audio engine (or what would you call it?) that runs all the processing in AudioSculpt and also in some Max FFT-objects. For the most recent work I also do some physical modelling (Modalys) and concatenative synthesis (CataRT), again all in Max.
I'm curious to hear what is your favourite set of tools? Do you find yourself investigating and building new and different ones, or do you elaborate on and develop further the existing ones? I'm always trying something new and usually end up using a huge amount of time and accomplishing quite little. Still, it doesn't prevent me from trying again...
Hi Maija,
Thank you, bach is great. I've been working with it for quite some time now and it's definitely a great tool set, especially for anyone coming from OpenMusic or PWGL.
In my experience there's much that bach can indeed do, it's quite powerful, and porting OM patches to bach is in many instances effortless (there's even a bach tutorial on it), but I wouldn't expect it to be able to replace OM in my digital homestead.
All the best,
António
Hi Antonio,
Thanks for your reply–good to know that about Bach!
My current project is that I'm trying to import some text files, that seem to be in lisp, to notes on a Bach roll. Experimenting with Orchidea library, not in Max but with command lines. It sounds great! Now I'd like to see those results written out as score, not timestamps and sample names in a text file... I'll probably get there, sooner or later.
What kind of projects do you do with Bach or OM?
Best wishes,
Maija
Hi Maija,
I think there might be a "swiss knife" solution to what you're aiming to do, and you only need to have Orchidea and bach in Max. On Mac, it would go something like this:
1) Before opening Max, create a sub-folder in "~/Documents/Max 8/Packages/orchidea/media" called "command_line_orchidea" (or any other name you might deem more suiting.)
2) Change the file name from "filename.txt" to "solution.connection.txt" and move it to the sub-folder you've created in step 1.
3) You can then use the following Max patch:
And you're set. Hope this helps.
All the best,
António
Hi Antonio,
That's phenomenal – thank you!
I saw some bach objects appear in brown, but guessing it is solvable issue.
Carmine Cella, the developer of Orchidea, is my supervisor at UC Berkeley and he was of the opinion that he'd need to make a new patch to do the conversion. Then he's too busy to do that. I just started with bach and advanced to a point where I can import some data, but not all and not at all in a sophisticated way...
I will now test this. Again, thank you so much!
Best wishes,
Maija
Antonio,
Yes, it works! I could only get it working in Max 7 though.
I'm very grateful to you!
Best wishes,
Maija
Maija, on my end the patch works both in Max 7 and 8, with Orchidea v.0.5 and bach 0.8.1b, running on macOS Mojave 10.14.5. Just to be sure, you can download the latest version of bach, here: https://www.bachproject.net/dl/
All the best,
António
Hi Maija,
I was hoping you could let me know how you got the Orchidea command line tools running. I'm using a Windows machine, so the command line tools are my only option. I downloaded the folder from the Orchidea site, but there isn't a readme or anything in there.
I'm a long time Max user, but I have no idea where to get started with these command line tools... and I really want to try them out!
Thanks,
David
Hi Antonio, I just saw this thread now because of David's recent response. I'll soon be releasing a max external to use lisp/scheme in Max. It embeds the S7 scheme interpreter from CCRMA, same one used in Common Music and Grace, which is a quite "lisp-y" scheme. (Common Lisp and Clojure style keywords and macros for example, with first class environments and gensym for hygeine). If you want to check it out, I have it on github and I track progress publicly on github issues. I will also need testers soon if anyone is interested. I'm very close now to feature complete (in beta form) for a first beta release. So far, I can say it's super fun, and extending it in C is quite straightforward because of S7's extremely simple foreign function interface. You can follow it on github or join the (totally silent so far) email list, that I will use for release updates. https://github.com/iainctduncan/scheme-for-max
There will definitely be a release with documentation in the next two months, as I have a course deadline for it! ;-)
Hi Iain,
That's really great news, thank you. I'm now following you on GitHub...
All the best,
António
Hi David,
Yes indeed, I got it working. The patch that Antonio shared works, but I think there's a newer one as well. I'm actually doing graduate studies/research with Carmine Cella at the moment here at CNMAT and am going to gather all data at some point. The piece I used Orchidea for is now finished, but will start a new one in some months.
To get started with the command line tools and Orchidea, was that one of your questions? I can send you tutorial and program scripts to get started. Let me know.
Best wishes,
Maija
Hi Maija,
Thank you so much for your response. I would love to see all that you have put together at some point, and I'd love to hear the piece you used Orchidea on if it's online somewhere.
And yes, my main question is how to get started with the Orchidea command line tools since there isn't a Max or standalone release for Windows. If you could send me a tutorial and program scripts, I would GREATLY appreciate it!
Thanks for your help with this; I'm very excited to get started.
Best,
David
Hi people, you know the moz'lib for Max??
http://julienvincenot.com/?page_id=235
Hi Maija,
If you have a chance, it would be great if you could share the tutorials and scripts on the IRCAM Forum as well, here: https://discussion.forum.ircam.fr/c/orchidea
All the best,
António
Should it be of interest, you can live-code Clojure in Max via Node.
https://github.com/cassiel/clojure4node4max
I've used this on stage: works well.
I got Nick's clojure4node4max working too, it's very cool. It's a bit a of a different situation, because Node runs in a separate process so the direct API to Max is much more limited than what you can do in the C SDK; what look like direct calls are all ultimately serialized over the network under the hood. Hence my decision to go a different route, but there are advantages to the approach taken in Node-4-Max too, and the tooling and external libraries are great if you already know Node, ClojureScript, Emacs etc.
Another reason I'm exploring S7 is that I want to be able to take some of the work from Common Music and make it usable in Max, though I imagine that will take a while. Rick Taube has done a rich library of algorithmic composition helpers in S7 as part of CM. You can see the list here: http://commonmusic.sourceforge.net/cm/res/doc/cm.html#toolbox
Hi Nick, Iain,
Thank you both, I'm eager to start experimenting with Clojure4Node4Max, and really looking forward to Iain's upcoming external.
All the best,
António
Hi Antonio,
I just see this. As Charles mentioned, I also developed a package called MOZ'Lib based on bach that has two heads, one for pedagogy of computer-aided composition (inspired from BEAP modules)
the other I called PWforMax that allows to run Lisp code in Max by talking to SBCL.
So it's 100% CommonLISP , and I provide a "core" file that includes a bunch of traditional CAC functions from OM and PWGL as well as some major user-librairies like PWConstraints, JBS-Constraints, CMI, Profile and Morphologie. The aim is obviously being able to continue using the PatchWork heritage in a Max/bach environment.
It can be downloaded here : http://julienvincenot.com/?page_id=235 If you're interested, feel free to get in touch and to subscribe to the mailing list.
I released it in January 2020 after revamping the project completely, now it's fully documented in English.
Here's also my ICMC 2017 paper on the LISP system and how to generate lisp code with bach : https://quod.lib.umich.edu/cgi/p/pod/dod-idx/lisp-in-max-exploratory-computer-aided-composition-in-real.pdf?c=icmc;idno=bbp2372.2017.012;format=pdf
Best
Julien
Nice, that looks really interesting Julien! I'm looking forward to checking out how you're doing it. :-)
FWIW, I also just released the first version of Scheme for Max, embedding the S7 Scheme interpreter (the one in Common Music) in a max external. I've got a package up on GitHub for OSX and Max 8, and build instructions for other platforms in the docs. If anyone is interested in being involved, I'd love it.
Github: https://github.com/iainctduncan/scheme-for-max
Docs (rough version): https://iainctduncan.github.io/scheme-for-max-docs/
Demo: https://www.youtube.com/watch?v=ErirIFCTdjg&t=10s
For those who have not checked out S7, I should add that it's a bit of a lisp-scheme hybrid. It's fundamentally scheme, but uses common lisp style macros and has misc other bits from CL added. The ref page for S7 details gives you all the details. I really like the feature mix myself, it's been growing on me. And for those coming from Clojure, the mix of lisp-1 with CL defmacros, applicative syntax, and keywords will be familiar.
https://ccrma.stanford.edu/software/snd/snd/s7.html
Hi Julien,
Thank you, I had missed Charles' reply. I didn't experiment with it yet but I read your paper, your package seems to be exactly what I'm looking for...
All the best,
António