Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 0f15e27b34
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (25 sloc) 1.014 kb
(ns renard-clojure.osc-server
(:use [overtone.core]
(def renard-out :temp)
(def port (renard-open-port "COM28"))
(def channel-map (loop [n 1 result {}]
(if (> n 32)
(recur (+ n 1) (merge result {(str "/Renard/fader" n) 0})))))
(defn make-osc-server [name port]
(osc-server port name))
(defn add-osc-handles [server]
(dotimes [n 33] (osc-handle server (str "/Renard/fader" n)
(fn [msg]
(def channel-map
(assoc channel-map (str "/Renard/fader" n) (int (first (:args msg)))))
(renard-write channel-map port)
(defn remove-osc-handles [server]
(osc-rm-all-handlers server "/Renard"))
(defn close-osc-server [server] (osc-close server))
(def server (make-osc-server "renard" 44100))
(add-osc-handles server)
Jump to Line
Something went wrong with that request. Please try again.