在clojure泛音中捕获USB麦克风
如何在泛音中使用USB麦克风? 以下是使用常规3.5毫米话筒的示例:在clojure泛音中捕获USB麦克风,clojure,usb,microphone,overtone,Clojure,Usb,Microphone,Overtone,如何在泛音中使用USB麦克风? 以下是使用常规3.5毫米话筒的示例: (ns insane-noises.vocoder) (use 'overtone.live) (def a (buffer 2048)) (def b (buffer 2048)) (demo 5 (let [input (sound-in 0); mic src (white-noise) ; synth - try replacing this with other sou
(ns insane-noises.vocoder)
(use 'overtone.live)
(def a (buffer 2048))
(def b (buffer 2048))
(demo 5
(let [input (sound-in 0); mic
src (white-noise) ; synth - try replacing this with other sound sources
formed (pv-mul (fft a input) (fft b src))
audio (ifft formed)]
(pan2 (* 0.1 audio))))
当我尝试输入(0中的声音)时,将0更改为1、2、3…-什么都不管用。
我的麦克风在skype等所有应用程序中都能正常工作。我刚刚试着复制它。它只是间歇性地工作。我跑
(event-debug-on)
在REPL中,允许我看到泛音和超级对撞机之间的OSC通信
它会以两种不同的方式失败,这取决于我是使用overtone.core并连接到外部服务器,还是使用overtone.live
使用overtone.live,我可以很好地分配缓冲区,但当我运行演示函数时,我得到:
event: [:overtone :osc-msg-received] (:msg {:path "/done", :type-tag "s", :args ("/d_recv")})
event: "/done" (:path "/done" :args ("/d_recv"))
event: [:overtone :osc-msg-received] (:msg {:path "/synced", :type-tag "i", :args (18)})
event: "/synced" (:path "/synced" :args (18))
zombified - calling shutdown handler
event: [:overtone :osc-msg-received] (:msg {:path "/n_go", :type-tag "iiiii", :args (34 7 -1 -1 0)})
event: "/n_go" (:path "/n_go" :args (34 7 -1 -1 0))
event: [:overtone :node-created 34] ({:node #<synth-node[live]: beatboxchad-l394/audition-synth 34>})
这看起来像是OSC与服务器的通信出现故障——在某个地方节点ID没有正确递增
当你尝试时,你从事件中得到了什么?我很抱歉,这个“答案”应该是一个评论吗?你都明白了吗?
event: [:overtone :osc-msg-received] (:msg {:path "/d_removed", :type-tag "s", :args ("beatboxchad-l394/audition-synth"), :src-host "localhost.localdomain", :src-port 57110})
event: "/d_removed" (:path "/d_removed" :args ("beatboxchad-l394/audition-synth"))
event: [:overtone :osc-msg-received] (:msg {:path "/done", :type-tag "s", :args ("/d_recv"), :src-host "localhost.localdomain", :src-port 57110})
event: "/done" (:path "/done" :args ("/d_recv"))
event: [:overtone :osc-msg-received] (:msg {:path "/synced", :type-tag "i", :args (71), :src-host "localhost.localdomain", :src-port 57110})
event: "/synced" (:path "/synced" :args (71))
event: [:overtone :osc-msg-received] (:msg {:path "/n_go", :type-tag "iiiii", :args (114 7 -1 -1 0), :src-host "localhost.localdomain", :src-port 57110})
event: "/n_go" (:path "/n_go" :args (114 7 -1 -1 0))
event: [:overtone :node-created 114] ({:node #<synth-node[live]: beatboxchad-l394/audition-synth 114>})
event: [:overtone :osc-msg-received] (:msg {:path "/n_end", :type-tag "iiiii", :args (114 7 -1 -1 0), :src-host "localhost.localdomain", :src-port 57110})
event: "/n_end" (:path "/n_end" :args (114 7 -1 -1 0))
event: [:overtone :node-destroyed 114] ({:node #<synth-node[destroyed]: beatboxchad-l394/audition-synth 114>})
event: [:overtone :osc-msg-received] (:msg {:path "/d_removed", :type-tag "s", :args ("beatboxchad-l394/audition-synth"), :src-host "localhost.localdomain", :src-port 57110})
event: "/d_removed" (:path "/d_removed" :args ("beatboxchad-l394/audition-synth"))
event: [:overtone :osc-msg-received] (:msg {:path "/done", :type-tag "s", :args ("/d_recv"), :src-host "localhost.localdomain", :src-port 57110})
event: "/done" (:path "/done" :args ("/d_recv"))
event: [:overtone :osc-msg-received] (:msg {:path "/synced", :type-tag "i", :args (72), :src-host "localhost.localdomain", :src-port 57110})
event: "/synced" (:path "/synced" :args (72))
event: [:overtone :osc-msg-received] (:msg {:path "/fail", :type-tag "ss", :args ("/s_new" "duplicate node ID"), :src-host "localhost.localdomain", :src-port 57110})
event: "/fail" (:path "/fail" :args ("/s_new" "duplicate node ID"))