In which Lisp generates music

(abhirag.com)

5 points | by abhirag 5 hours ago ago

8 comments

  • lucy_hnatchuk 5 hours ago

    Nice project! Love the idea of live‑coding music with Lisp’s code‑as‑data philosophy — feels very natural for exploring patterns in real time.

    • abhirag 5 hours ago

      Comment seems AI generated, thanks anyway!

  • abhirag 5 hours ago

    Livecoding Music with Fennel and Renoise

    • Rochus 5 hours ago

      Sounds nice, thanks. Do you also have experience in other live coding languages? Can you share your thoughts about advantages/disadvantages of Lisp compared to others?

      • abhirag 5 hours ago

        Hey, thanks for taking a look! I have messed around with Clojure (Overtone) and Sonic Pi (Ruby dialect) and normally prefer lisps for anything fun :)

        Regarding advantages/disadvantages, Lisp is always very terse which helps and with structural editing juggling parens becomes a non-issue. Dev environment being fiddly and fragile is the biggest con, you need to put some effort upfront in that.

        • Rochus 4 hours ago

          I'm still not sure on which composition language to focus on. I definitely don't like languages where a lot of the syntax is "hidden" in strings (such as e.g. in Tidal). Lisp has aspects which fit to music intuitively, but as soon as you try to represent the full information expected by Midi the code gets messy. Interestingly, Common Music and Nyquist went away from Lisp towards SAL because composers apparently preferred a Pascal like infix syntax over the Lisp way.

          • abhirag 3 hours ago

            I think macros can help when the syntax seems messy, that is where lisp shines the most. Have a look at extempore lang (https://extemporelang.github.io/) you might like it. Macros written by others can feel like magic, but a DSL you create might still feel the most intuitive. I get your point about hidden syntax though.

            The only other language I am still curious about trying for livecoding is forth, for example Sporth(https://paulbatchelor.github.io/proj/sporth.html)

            • Rochus 2 hours ago

              I'm aware of Extempore and its predecessor, but I think they pretty much have the same problem, with no elegant solution (at least I didn't see one when studying the docs and thesis). Maybe the trick is indeed - as you say - to implement a "sublanguage" with macros to cover the more complex music representation. Forth is an interesting language, but I think it has even more issues to represent musical information.