Created
July 8, 2012 21:11
-
-
Save ctford/3072824 to your computer and use it in GitHub Desktop.
Reduced 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] | |
ring (reduce + (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 ring :action FREE) | |
ring)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yep, sounds the same to me.