Created
July 8, 2012 16:40
-
-
Save ctford/3071723 to your computer and use it in GitHub Desktop.
Bell
This file contains 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
(definst bell# [frequency 440 duration 4.0] | |
(let [harmonic-decay [1.0 0.5 0.25 0.125] | |
partials (map-indexed | |
(fn [harmonic proportion] | |
(let [envelope (env-gen (perc 0.01 (* duration proportion))) | |
overtone (* (inc harmonic) frequency)] | |
(* envelope proportion (sin-osc overtone)))) | |
harmonic-decay)] | |
(detect-silence (first partials) :action FREE) | |
partials)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gotcha. Thanks!