This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn flat-lists | |
[ls] | |
(letfn [(rec-flat [rec-list ls] | |
(cond (empty? rec-list) ls | |
(seq? (first rec-list)) (rec-flat (rest rec-list) | |
(rec-flat (first rec-list) ls)) | |
(not (seq? (first rec-list))) (rec-flat (rest rec-list) | |
(cons (first rec-list) ls))))] | |
(cond (seq? ls) (reverse (rec-flat ls '())) | |
:else (list ls)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn sum-dur-ext | |
[ls] | |
(letfn [(rec-sum [tl, ls] | |
(cond (empty? tl) ls | |
(empty? ls) (rec-sum (rest tl) (conj ls (first tl))) | |
:else (rec-sum (rest tl) | |
(conj ls (+ (first ls) (first tl))))))] | |
(reverse (rec-sum ls '())))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defsynth hansa [] | |
(let [sig (* (lf-noise0 (x-line:kr 100 1000 0.5)) | |
(env-gen:ar (env-perc 0.001 0.05 1 -4) :action FREE :gate (impulse:ar (/ 1 0.04)))) | |
delayed (comb-c:ar sig 1 (* 0.005 (+ (* (sin-osc 20 0) 0.5 ) 1)) 1) | |
env (env-gen:ar (env-perc 0.4 1.5 0.6 -4) :action FREE) | |
sig (free-verb (+ sig delayed) (x-line:kr 0.01 0.6 1) 0.1 0.1)] | |
(out [0 1] (* sig env)))) | |
(hansa) |
NewerOlder