2

我正在尝试调用(sound-in 0)(我已经尝试了所有值 0-7)并且我得到了一个很大的 edn 响应,但没有返回任何音频。不太确定在哪里看。

以下是提到的 edn 响应。我很困惑,因为我没有收到任何错误,所以我认为这是音频设备和端口的问题。我与 Jack 混在一起并创建了聚合设备,但没有运气。

这来自跑步

(definst mic [] (sound-in 0))
(mic)

edn 太长了,所以我在外部添加了一个链接。https://pastebin.com/f9CqqZSc

以下是更合理的长度响应

(definst mic [] (in 8))
(mic)
{:synth "learn-leipzig.audio-visual/mic",
 :id 42,
 :target 39,
 :position :tail,
 :args {},
 :sdef
 {:name "learn-leipzig.audio-visual/mic",
  :constants [8.0 18.0],
  :params (),
  :pnames (),
  :ugens
  ({:id 315,
    :name "In",
    :rate 2,
    :rate-name :ar,
    :special 0,
    :args (8.0),
    :n-outputs 1,
    :spec
    {:args
     ({:doc "the index of the bus to read in from",
       :name "bus",
       :default 0,
       :expands? true}
      {:doc
       "the number of channels (i.e. adjacent buses) to\n                     read in. The default is 1. You cannot modulate this\n                     number by assigning it to an argument in a\n                     SynthDef.",
       :name "num-channels",
       :default 1,
       :mode :num-outs,
       :expands? false}),
     :fn-names {"in:ar" :ar, "in:kr" :kr, "in" :ar},
     :init #function[overtone.sc.machinery.ugen.specs/with-init-fn/fn--4096],
     :full-doc
     "\n  Read a signal from a bus. \n\n  [bus 0, num-channels 1]\n\n  bus          - The index of the bus to read in \n                 from \n  num-channels - The number of channels (i.e. \n                 adjacent buses) to read in. The \n                 default is 1. You cannot modulate \n                 this number by assigning it to an \n                 argument in a SynthDef. \n\n  In:kr is functionally similar to in-feedback. That is it \n  reads all data on the bus whether it is from the current \n  cycle or not. This allows for it to receive data from \n  later in the node order.\n\n  in:ar reads only data from the current cycle, and will \n  zero data from earlier cycles (for use within that synth; \n  the data remains on the bus). Because of this and the fact \n  that the various out ugens mix their output with data from \n  the current cycle but overwrite data from an earlier cycle \n  it may be necessary to use a private control bus when this \n  type of feedback is desired. \n\n  Categories: \n  Rates: [ :ar, :kr ]\n  Default rate: :ar",
     :name "In",
     :default-rate :ar,
     :summary "Read a signal from a bus.",
     :categories [],
     :rates #{:ar :kr},
     :doc
     "in:kr is functionally similar to in-feedback. That is it\n             reads all data on the bus whether it is from the current\n             cycle or not. This allows for it to receive data from later\n             in the node order.\n\n             in:ar reads only data from the current cycle, and will zero\n             data from earlier cycles (for use within that synth; the\n             data remains on the bus). Because of this and the fact that\n             the various out ugens mix their output with data from the\n             current cycle but overwrite data from an earlier cycle it\n             may be necessary to use a private control bus when this\n             type of feedback is desired."},
    :arg-map {:bus 8, :num-channels 1},
    :orig-args (8),
    :outputs ({:rate 2}),
    :inputs ({:src -1, :index 0})}
   {:id 316,
    :name "Out",
    :rate 2,
    :rate-name :ar,
    :special 0,
    :args
    (18.0
     {:id 315,
      :name "In",
      :rate 2,
      :rate-name :ar,
      :special 0,
      :args (8.0),
      :n-outputs 1,
      :spec
      {:args
       ({:doc "the index of the bus to read in from",
         :name "bus",
         :default 0,
         :expands? true}
        {:doc
         "the number of channels (i.e. adjacent buses) to\n                     read in. The default is 1. You cannot modulate this\n                     number by assigning it to an argument in a\n                     SynthDef.",
         :name "num-channels",
         :default 1,
         :mode :num-outs,
         :expands? false}),
       :fn-names {"in:ar" :ar, "in:kr" :kr, "in" :ar},
       :init #function[overtone.sc.machinery.ugen.specs/with-init-fn/fn--4096],
       :full-doc
       "\n  Read a signal from a bus. \n\n  [bus 0, num-channels 1]\n\n  bus          - The index of the bus to read in \n                 from \n  num-channels - The number of channels (i.e. \n                 adjacent buses) to read in. The \n                 default is 1. You cannot modulate \n                 this number by assigning it to an \n                 argument in a SynthDef. \n\n  In:kr is functionally similar to in-feedback. That is it \n  reads all data on the bus whether it is from the current \n  cycle or not. This allows for it to receive data from \n  later in the node order.\n\n  in:ar reads only data from the current cycle, and will \n  zero data from earlier cycles (for use within that synth; \n  the data remains on the bus). Because of this and the fact \n  that the various out ugens mix their output with data from \n  the current cycle but overwrite data from an earlier cycle \n  it may be necessary to use a private control bus when this \n  type of feedback is desired. \n\n  Categories: \n  Rates: [ :ar, :kr ]\n  Default rate: :ar",
       :name "In",
       :default-rate :ar,
       :summary "Read a signal from a bus.",
       :categories [],
       :rates #{:ar :kr},
       :doc
       "in:kr is functionally similar to in-feedback. That is it\n             reads all data on the bus whether it is from the current\n             cycle or not. This allows for it to receive data from later\n             in the node order.\n\n             in:ar reads only data from the current cycle, and will zero\n             data from earlier cycles (for use within that synth; the\n             data remains on the bus). Because of this and the fact that\n             the various out ugens mix their output with data from the\n             current cycle but overwrite data from an earlier cycle it\n             may be necessary to use a private control bus when this\n             type of feedback is desired."},
      :arg-map {:bus 8, :num-channels 1},
      :orig-args (8)}),
    :n-outputs 0,
    :spec
    {:args
     ({:doc
       "the index of the buss to write to. The lowest index\n                     numbers are written to the audio hardware.",
       :name "bus",
       :expands? true}
      {:doc
       "a list of signals or single output to write\n                     out. You cannot change the size of this once a\n                     synth has been defined.",
       :name "signals",
       :mode :append-sequence,
       :expands? false}),
     :fn-names {"out:ar" :ar, "out:kr" :kr, "out" :auto},
     :init #function[overtone.sc.machinery.ugen.specs/with-init-fn/fn--4096],
     :full-doc
     "\n  write a signal to a bus, adding to previous contents. \n\n  [bus :none, signals :none]\n\n  bus     - The index of the buss to write to. The \n            lowest index numbers are written to \n            the audio hardware. \n  signals - A list of signals or single output to \n            write out. You cannot change the size \n            of this once a synth has been defined. \n\n  Write a signal to a bus, adding to any existing contents\n\n  N.B. Out is subject to control rate jitter. Where sample \n  accurate output is needed, use OffsetOut.\n\n  When using an array of bus indexes, the channel array will \n  just be copied to each bus index in the array. So (out:ar \n  [bus1 bus2] channels-array) will be the same as (+ (out:ar \n  bus1 channelsArray) (out:ar bus2 channelsArray)). \n\n  Categories: \n  Rates: [ :ar, :kr ]\n  Default rate: :auto",
     :check
     #function[overtone.sc.machinery.ugen.check/mk-when-rate/fn--4319/fn--4320],
     :auto-rate true,
     :name "Out",
     :default-rate :auto,
     :num-outs 0,
     :summary "write a signal to a bus, adding to previous contents.",
     :categories [],
     :rates #{:ar :kr},
     :doc
     "write a signal to a bus, adding to any existing contents\n\n             N.B. Out is subject to control rate jitter. Where sample\n             accurate output is needed, use OffsetOut.\n\n             When using an array of bus indexes, the channel array will\n             just be copied to each bus index in the array. So (out:ar\n             [bus1 bus2] channels-array) will be the same as (+ (out:ar\n             bus1 channelsArray) (out:ar bus2 channelsArray))."},
    :arg-map
    {:bus 18,
     :signals
     {:id 315,
      :name "In",
      :rate 2,
      :rate-name :ar,
      :special 0,
      :args (8.0),
      :n-outputs 1,
      :spec
      {:args
       ({:doc "the index of the bus to read in from",
         :name "bus",
         :default 0,
         :expands? true}
        {:doc
         "the number of channels (i.e. adjacent buses) to\n                     read in. The default is 1. You cannot modulate this\n                     number by assigning it to an argument in a\n                     SynthDef.",
         :name "num-channels",
         :default 1,
         :mode :num-outs,
         :expands? false}),
       :fn-names {"in:ar" :ar, "in:kr" :kr, "in" :ar},
       :init #function[overtone.sc.machinery.ugen.specs/with-init-fn/fn--4096],
       :full-doc
       "\n  Read a signal from a bus. \n\n  [bus 0, num-channels 1]\n\n  bus          - The index of the bus to read in \n                 from \n  num-channels - The number of channels (i.e. \n                 adjacent buses) to read in. The \n                 default is 1. You cannot modulate \n                 this number by assigning it to an \n                 argument in a SynthDef. \n\n  In:kr is functionally similar to in-feedback. That is it \n  reads all data on the bus whether it is from the current \n  cycle or not. This allows for it to receive data from \n  later in the node order.\n\n  in:ar reads only data from the current cycle, and will \n  zero data from earlier cycles (for use within that synth; \n  the data remains on the bus). Because of this and the fact \n  that the various out ugens mix their output with data from \n  the current cycle but overwrite data from an earlier cycle \n  it may be necessary to use a private control bus when this \n  type of feedback is desired. \n\n  Categories: \n  Rates: [ :ar, :kr ]\n  Default rate: :ar",
       :name "In",
       :default-rate :ar,
       :summary "Read a signal from a bus.",
       :categories [],
       :rates #{:ar :kr},
       :doc
       "in:kr is functionally similar to in-feedback. That is it\n             reads all data on the bus whether it is from the current\n             cycle or not. This allows for it to receive data from later\n             in the node order.\n\n             in:ar reads only data from the current cycle, and will zero\n             data from earlier cycles (for use within that synth; the\n             data remains on the bus). Because of this and the fact that\n             the various out ugens mix their output with data from the\n             current cycle but overwrite data from an earlier cycle it\n             may be necessary to use a private control bus when this\n             type of feedback is desired."},
      :arg-map {:bus 8, :num-channels 1},
      :orig-args (8)}},
    :orig-args
    (18
     {:id 315,
      :name "In",
      :rate 2,
      :rate-name :ar,
      :special 0,
      :args (8.0),
      :n-outputs 1,
      :spec
      {:args
       ({:doc "the index of the bus to read in from",
         :name "bus",
         :default 0,
         :expands? true}
        {:doc
         "the number of channels (i.e. adjacent buses) to\n                     read in. The default is 1. You cannot modulate this\n                     number by assigning it to an argument in a\n                     SynthDef.",
         :name "num-channels",
         :default 1,
         :mode :num-outs,
         :expands? false}),
       :fn-names {"in:ar" :ar, "in:kr" :kr, "in" :ar},
       :init #function[overtone.sc.machinery.ugen.specs/with-init-fn/fn--4096],
       :full-doc
       "\n  Read a signal from a bus. \n\n  [bus 0, num-channels 1]\n\n  bus          - The index of the bus to read in \n                 from \n  num-channels - The number of channels (i.e. \n                 adjacent buses) to read in. The \n                 default is 1. You cannot modulate \n                 this number by assigning it to an \n                 argument in a SynthDef. \n\n  In:kr is functionally similar to in-feedback. That is it \n  reads all data on the bus whether it is from the current \n  cycle or not. This allows for it to receive data from \n  later in the node order.\n\n  in:ar reads only data from the current cycle, and will \n  zero data from earlier cycles (for use within that synth; \n  the data remains on the bus). Because of this and the fact \n  that the various out ugens mix their output with data from \n  the current cycle but overwrite data from an earlier cycle \n  it may be necessary to use a private control bus when this \n  type of feedback is desired. \n\n  Categories: \n  Rates: [ :ar, :kr ]\n  Default rate: :ar",
       :name "In",
       :default-rate :ar,
       :summary "Read a signal from a bus.",
       :categories [],
       :rates #{:ar :kr},
       :doc
       "in:kr is functionally similar to in-feedback. That is it\n             reads all data on the bus whether it is from the current\n             cycle or not. This allows for it to receive data from later\n             in the node order.\n\n             in:ar reads only data from the current cycle, and will zero\n             data from earlier cycles (for use within that synth; the\n             data remains on the bus). Because of this and the fact that\n             the various out ugens mix their output with data from the\n             current cycle but overwrite data from an earlier cycle it\n             may be necessary to use a private control bus when this\n             type of feedback is desired."},
      :arg-map {:bus 8, :num-channels 1},
      :orig-args (8)}),
    :outputs (),
    :inputs ({:src -1, :index 1} {:src 0, :index 0})})},
 :status #<Atom@2b513c46: :live>,
 :loaded? #<Promise@64a0d5fc: true>}
4

0 回答 0