[HN Gopher] Sndkit - a toolkit for computer music composition
       ___________________________________________________________________
        
       Sndkit - a toolkit for computer music composition
        
       Author : todsacerdoti
       Score  : 12 points
       Date   : 2024-09-17 16:55 UTC (6 hours ago)
        
 (HTM) web link (pbat.ch)
 (TXT) w3m dump (pbat.ch)
        
       | retzkek wrote:
       | > 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":                   (-> (sine 6 50)             (add 440)
       | (sine 0.5))
       | 
       | [1]: https://clojure.org/guides/threading_macros
       | 
       | Incidentally, for making music with Clojure there's Overtone:
       | https://github.com/overtone/overtone
        
       ___________________________________________________________________
       (page generated 2024-09-17 23:01 UTC)