18. // make our patch
SinOsc s => dac;
// time-loop, in which the osc's frequency is
changed every 100 ms
while( true ) {
100::ms => now;
Std.rand2f(30.0, 1000.0) => s.freq;
}
20. ; make sure that everything is disconnected
(au:clear-graph)
; setup simple au graph
; piano -> output
(define piano (au:make-node "aumu" "dls "
"appl"))
(au:connect-node piano 0 *au:output-node* 0)
(au:update-graph)
; play note on piano
(play-note (now) piano 60 80 (* 1.0 *second*))
32. “Lisp is worth learning for the profound
enlightenment experience you will have
when you finally get it; that experience will
make you a better programmer for the rest
of your days, even if you never actually use
Lisp itself a lot."
Eric S. Raymond, "How to Become a
Hacker".
35. LISt Processing
LIS
● Second oldest high-level language (first is
Fortran)
● Code as Data (Homoiconic)
● Perfect for Domain-specific languages
(DSL)
● Exploratory programming
36. Clojure
● Lisp in JVM
● Concurrent programming
● Dynamic Development (REPL)
● Lazy sequences
● No side effects (almost)