Created
February 20, 2016 07:08
-
-
Save kn1kn1/144031dbedc24e0a3d65 to your computer and use it in GitHub Desktop.
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
| (ns voltap.voltap | |
| (:use [overtone.live])) | |
| (defsynth vol [freq 440.0 rq 1.0] | |
| (tap "system-vol" 60 (lag (abs (bpf (in:ar 0) freq rq)) 0.1))) | |
| (def monitor-var (vol [:after (foundation-monitor-group)] 440)) | |
| (defn monitor-vol | |
| ([] @(get-in monitor-var [:taps "system-vol"])) | |
| ([synth-var] @(get-in synth-var [:taps "system-vol"]))) | |
| (defsynth sound-in-vol-synth [freq 440.0 rq 1.0] | |
| (tap "system-vol" 60 (lag (abs (bpf (sound-in:ar 0) freq rq)) 0.1))) | |
| (def sound-in-var (sound-in-vol-synth 440)) | |
| (defn sound-in-vol | |
| ([] @(get-in sound-in-var [:taps "system-vol"])) | |
| ([synth-var] @(get-in synth-var [:taps "system-vol"]))) | |
| ; (let [vol (sound-in-vol)] | |
| ; (println vol)) | |
| ;(odoc bpf) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment