首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >捕获USB- clojure overtone中的麦克风

捕获USB- clojure overtone中的麦克风
EN

Stack Overflow用户
提问于 2016-11-28 11:28:21
回答 1查看 168关注 0票数 2

如何在Overtone中使用USB-麦克风?下面是一个使用普通3.5 to麦克风的例子:

代码语言:javascript
复制
(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等等。

EN

回答 1

Stack Overflow用户

发布于 2016-11-29 08:23:39

我只是试着重现它。它只能断断续续地工作。我跑了

代码语言:javascript
复制
(event-debug-on) 

在REPL中,我可以看到Overtone和SuperCollider之间的OSC通信。

它会以两种不同的方式失败,这取决于我是使用overtone.core并连接到外部服务器,还是使用overtone.live。

使用overtone.live时,我可以很好地分配缓冲区,但是当我运行演示函数时,我得到:

代码语言:javascript
复制
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>}) 

..。随后是一系列与Overtone清理其默认节点和组相关的事件,如关闭的一部分。如果你没有从你的overtone.live得到相同的输出,我知道我有一些关于我的插孔设置的问题需要解决。

使用连接到外部服务器的overtone.core,它会断断续续地工作。

当它工作时,我会得到以下事件:

代码语言:javascript
复制
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>}) 

当它失败时,我会得到以下结果:

代码语言:javascript
复制
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")) 

这看起来像是OSC与服务器之间的通信出现了故障--在某个节点ID没有正确递增的地方。

当你尝试的时候,你在事件方面得到了什么?

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40836759

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档