> Brackets and s-expressions can be fun, but they can get very unwieldy very quickly in LIL, especially since backslashes are required to break up commands across different lines.
> The previous vibrato example
sine [add [param 440] [sine 6 50]] 0.5
> can be rewritten without brackets using a special function called 'zz':
sine 6 50
add zz 440
sine zz 0.5
> zz itself doesn't do anything. It is a placeholder that tells the function to use the argument that has been implicitely generated.
This is an interesting approach to making stacked operations more readable, similar to the "thread-as" macro in Clojure [1], which would make the example look like:
(as-> (sine 6 50) zz
(add zz 440)
(sine zz 0.5))
Of course, with this example in Clojure one could use "thread-first":
> Brackets and s-expressions can be fun, but they can get very unwieldy very quickly in LIL, especially since backslashes are required to break up commands across different lines.
> The previous vibrato example
> can be rewritten without brackets using a special function called 'zz': > zz itself doesn't do anything. It is a placeholder that tells the function to use the argument that has been implicitely generated.This is an interesting approach to making stacked operations more readable, similar to the "thread-as" macro in Clojure [1], which would make the example look like:
Of course, with this example in Clojure one could use "thread-first": [1]: https://clojure.org/guides/threading_macrosIncidentally, for making music with Clojure there's Overtone: https://github.com/overtone/overtone