3 ms·
This is the THX sound synthesised using Overtone, a music synthesis program. (definst thx [gate 1] (let [target-pitches (map midi->hz [77 74 72 70 65 62 60
by zaph0d 14y ago
This is the THX sound synthesised using Overtone, a music synthesis program.
(definst thx [gate 1]
(let [target-pitches (map midi->hz [77 74 72 70 65 62 60 58 53 50 46 34 26 22 14 10])
r-freq (env-gen:kr (envelope [1 1 0.007 10] [8 4 2] [0 -4 1] 2) gate)
amp-env (env-gen:kr (envelope [0 0.07 0.21 0] [8 4 2] [0 1 1] 2) gate :action FREE)
mk-noise (fn [ug-osc]
(mix (map #(pan2 (ug-osc (+ (* r-freq (+ 230 (* 100 (lf-noise2:kr 1.3))))
(env-gen:kr (envelope [0 0 %] [8 6] [0 -3]))))
(lf-noise2:kr 5))
target-pitches)))
saws (mk-noise saw)
sins (mk-noise sin-osc)
snd (+ (* saws amp-env) (* sins amp-env))]
(* 0.5 (g-verb snd 9 0.7 0))))
https://github.com/overtone/overtone/blob/master/examples/thx.clj https://github.com/overtone/overtone/blob/master/examples/th...
http://overtone.github.com/ http://overtone.github.com/
- bromagosa 14y agoYou've just reduced 20000 lines of C to 13 lines of LISP :) http://www.youtube.com/watch?v=5-OjTPj7K54 http://www.youtube.com/watch?v=5-OjTPj7K54