元编程参考文档

分析

11 个节点

本页内容 11

声道数

函数

How many channels a clip has: 1 for mono, 2 for stereo.

签名
声道数(音频: AudioBuffer) -> 整数
int ChannelCount(AudioBuffer audio)

参数

名称类型默认值说明
音频AudioBuffer—The clip to read.

返回

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

描述

函数

A one-line description of a clip: its length, sample rate, channels and peak level.

签名
描述(音频: AudioBuffer) -> 文本
string Describe(AudioBuffer audio)

参数

名称类型默认值说明
音频AudioBuffer—The clip to describe.

返回

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

主频率

函数

The frequency a clip holds most of - for a single note, its pitch.

签名
主频率(音频: AudioBuffer) -> 数字
double DominantFrequency(AudioBuffer audio)

参数

名称类型默认值说明
音频AudioBuffer—The clip to analyse.

返回

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

时长

函数

A clip's length.

签名
时长(音频: AudioBuffer) -> 数字
double Duration(AudioBuffer audio)

参数

名称类型默认值说明
音频AudioBuffer—The clip to measure.

返回

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

峰值

函数

The loudest sample in a clip, from 0 (silent) to 1 (full scale).

签名
峰值(音频: AudioBuffer) -> 数字
double Peak(AudioBuffer audio)

参数

名称类型默认值说明
音频AudioBuffer—The clip to measure.

返回

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

峰值分贝

函数

The loudest sample in a clip, in decibels below full scale.

签名
峰值分贝(音频: AudioBuffer) -> 数字
double PeakDecibels(AudioBuffer audio)

参数

名称类型默认值说明
音频AudioBuffer—The clip to measure.

返回

分贝数字

备注

A silent clip reads -120 dB rather than minus infinity.

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

均方根

函数

A clip's average level - the root of the mean of the squared samples - which follows how loud a clip sounds far better than its peak does.

签名
均方根(音频: AudioBuffer) -> 数字
double Rms(AudioBuffer audio)

参数

名称类型默认值说明
音频AudioBuffer—The clip to measure.

返回

均方根数字

备注

A full-scale sine reads about 0.707; a full-scale square wave reads 1.

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

均方根分贝

函数

A clip's average level in decibels below full scale.

签名
均方根分贝(音频: AudioBuffer) -> 数字
double RmsDecibels(AudioBuffer audio)

参数

名称类型默认值说明
音频AudioBuffer—The clip to measure.

返回

分贝数字

备注

A full-scale sine reads about -3 dB. A silent clip reads -120 dB.

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

采样率

函数

How many samples a clip has per second, per channel.

签名
采样率(音频: AudioBuffer) -> 整数
int SampleRate(AudioBuffer audio)

参数

名称类型默认值说明
音频AudioBuffer—The clip to read.

返回

采样率整数
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
分析
所属包
音频处理

频谱质心

函数

The centre of gravity of a clip's spectrum - a single number for how bright it sounds.

签名
频谱质心(音频: AudioBuffer) -> 数字
double SpectralCentroid(AudioBuffer audio)

参数

名称类型默认值说明
音频AudioBuffer—The clip to analyse.

返回

频率数字

备注

A dull, bassy clip has a low centroid and a bright, hissy one a high centroid; a filter that darkens a sound moves it down.

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

频谱

函数

How much of each frequency a clip holds, averaged over its whole length.

签名
频谱(音频: AudioBuffer, 变换大小: 整数) -> Audio Spectrum
AudioSpectrum Spectrum(
    AudioBuffer audio,
    int transformSize = 8192)

参数

名称类型默认值说明
音频AudioBuffer—The clip to analyse.
变换大小整数8192Samples per transform: a power of two from 256 to 65536. Bigger resolves closer frequencies.

返回

频谱Audio Spectrum

备注

The clip is cut into overlapping stretches of Transform Size samples, each is windowed and transformed, and their power is averaged - so a steady tone reads at its true level however long the clip is, and noise settles into a smooth floor instead of a jagged one.

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