元编程参考文档

实时输入

8 个节点

本页内容 8

默认录音设备

函数

The recording device the system uses when none is named.

签名
默认录音设备() -> 文本
string DefaultRecordingDevice()

返回

设备文本
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
实时输入
所属包
音频处理

实时监听

函数

Plays a stereo signal live for some seconds, then stops, and says how it went: how much delay it added, how busy the machine was, and whether the input ever ran dry.

签名
实时监听 -> 文本
    立体声: Stereo Signal
    秒数: 数字
    块帧数: 整数
string Listen(
    StereoSignal stereo,
    double seconds = 10,
    int blockFrames = 256)

参数

名称类型默认值说明
立体声Stereo Signal—What is played.
秒数数字10How long, 0 to 3600.
块帧数整数256Frames the device renders at a time, 32 to 16384.

返回

报告文本

备注

Waits until it has finished, so a program can carry on afterwards. 0 seconds plays nothing. Use headphones when a Microphone is in it.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
实时输入
所属包
音频处理

测量实时延迟

函数

Measures how late a live input is heard on this machine: plays clicks through the speakers, listens for them through a recording device, and times each round trip.

签名
测量实时延迟 -> Live Latency
    设备: 文本
    咔嗒声次数: 整数
    块帧数: 整数
    缓冲: 数字
LiveLatency MeasureLatency(
    string device = "",
    int clicks = 10,
    int blockFrames = 256,
    double cushion = 0.01)

参数

名称类型默认值说明
设备文本—A name from Recording Devices; empty for the default.
咔嗒声次数整数10How many clicks, half a second apart, 1 to 1000.
块帧数整数256The output's block, as Start Live Signal would use it.
缓冲数字0.01Microphone's cushion, as a live signal would use it.

返回

延迟Live Latency

备注

The round trip is the delay between speaking into a Microphone and hearing it from Start Live Signal, plus the air between speaker and microphone. Hold the microphone near the speakers, or a headphone against it, and keep the room quiet; the median and range are of the clicks heard back.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
实时输入
所属包
音频处理

麦克风

函数

What a recording device hears, as a signal: wire it through effects and into Start Live Signal to hear yourself through them as you speak or play.

签名
麦克风(设备: 文本, 缓冲: 数字) -> Signal
Signal Microphone(string device = "", double cushion = 0.01)

参数

名称类型默认值说明
设备文本—A name from Recording Devices; empty for the default.
缓冲数字0.01Seconds kept waiting, 0 to 0.5.

返回

信号Signal

备注

Silent until a live session opens the device, so a chain rendered offline hears nothing from it. Cushion is the sound kept waiting so the device never runs dry between its chunks: lower is heard sooner, higher survives a busier machine.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
实时输入
所属包
音频处理

录音设备

函数

The recording devices on this machine, by name: a built-in microphone, a headset, an audio interface's inputs. Any of these names goes in Microphone's Device.

签名
录音设备() -> 文本数组
string[] RecordingDevices()

返回

设备文本数组
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
实时输入
所属包
音频处理

开始实时信号

函数

Plays a signal live on the audio device, opening the recording device of every Microphone in it, until Stop Live Signal.

签名
开始实时信号 -> Live Signal Session
    信号: Signal
    块帧数: 整数
    录制: 真否
    采样率: 整数
LiveSignalSession Start(
    Signal signal,
    int blockFrames = 256,
    bool record = false,
    int sampleRate = 44100)

参数

名称类型默认值说明
信号Signal—What is played, on both sides.
块帧数整数256Frames the device renders at a time, 32 to 16384; 256 is 5.8 ms at 44.1 kHz, and the device is asked for a buffer the same size. Raise it if the sound breaks up.
录制真否FalseWhether to keep what is played, for Stop Live Signal to hand back.
采样率整数44100The rate to run at.

返回

会话Live Signal Session

备注

Use headphones when a Microphone is in it: through speakers, the microphone hears its own sound come back and howls.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
实时输入
所属包
音频处理

开始实时立体声

函数

Plays a stereo signal live on the audio device - a panned voice, a stereo reverb or chorus - until Stop Live Signal.

签名
开始实时立体声 -> Live Signal Session
    立体声: Stereo Signal
    块帧数: 整数
    录制: 真否
    采样率: 整数
LiveSignalSession StartStereo(
    StereoSignal stereo,
    int blockFrames = 256,
    bool record = false,
    int sampleRate = 44100)

参数

名称类型默认值说明
立体声Stereo Signal—What is played.
块帧数整数256Frames the device renders at a time, 32 to 16384.
录制真否FalseWhether to keep what is played, for Stop Live Signal to hand back.
采样率整数44100The rate to run at.

返回

会话Live Signal Session
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
实时输入
所属包
音频处理

停止实时信号

函数

Stops a live signal and closes its devices.

签名
停止实时信号(会话: Live Signal Session) -> AudioBuffer
AudioBuffer Stop(LiveSignalSession session)

参数

名称类型默认值说明
会话Live Signal Session—The session.

返回

音频AudioBuffer
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
实时输入
所属包
音频处理