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
As a regular synth, this example would have an array of 5 output channels... one for each item in
harmonic decay
. However, In Overtone 0.7, insts support mono/stereo output only, so the rest of the channels are simply discarded. You can use(mix partials)
to mix all 5 channels down to a single output.