Skip to content

Instantly share code, notes, and snippets.

@kn1kn1
Created February 20, 2016 07:08
Show Gist options
  • Select an option

  • Save kn1kn1/144031dbedc24e0a3d65 to your computer and use it in GitHub Desktop.

Select an option

Save kn1kn1/144031dbedc24e0a3d65 to your computer and use it in GitHub Desktop.
(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