元编程参考文档

音乐分析

8 个节点

本页内容 8

色度

函数

How much of each of the twelve pitch classes a clip holds, C to B, folded across every octave and averaged over the clip - its harmony at a glance.

签名
色度(音频: AudioBuffer) -> 数字数组
double[] Chroma(AudioBuffer audio)

参数

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

返回

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

检测调性

函数

The key a clip is most likely in, by correlating its chroma with the Krumhansl-Kessler major and minor key profiles.

签名
检测调性(音频: AudioBuffer) -> (调性: 文本, 置信度: 数字)
string DetectKey(AudioBuffer audio, out double confidence)

参数

名称类型默认值说明
音频AudioBuffer—The clip; a few seconds of the music at least.

返回

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

检测起音

函数

When each new note or hit begins, in seconds.

签名
检测起音 -> 数字数组
    音频: AudioBuffer
    灵敏度: 数字
    间隔: 数字
double[] DetectOnsets(
    AudioBuffer audio,
    double sensitivity = 2,
    double separation = 100)

参数

名称类型默认值说明
音频AudioBuffer—The clip; several channels are averaged.
灵敏度数字2How far above the recent average a rise in spectral flux must be to count; lower finds more.
间隔数字100The least time in milliseconds between two onsets.

返回

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

检测音高

函数

The one pitch a clip mostly holds: the median of its pitch track.

签名
检测音高(音频: AudioBuffer) -> (频率: 数字, 音符: 文本)
double DetectPitch(AudioBuffer audio, out string note)

参数

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

返回

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

估计速度

函数

A clip's tempo in beats per minute.

签名
估计速度(音频: AudioBuffer) -> 数字
double EstimateTempo(AudioBuffer audio)

参数

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

返回

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

音名

函数

The name of the equal-tempered note nearest a frequency, at A4 = 440 Hz.

签名
音名(频率: 数字) -> (音符: 文本, 音分: 数字)
string NoteName(double frequency, out double cents)

参数

名称类型默认值说明
频率数字—The frequency in Hz.

返回

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

节拍跟踪

函数

The beats of a clip, in seconds, from a bank of comb filters that lock on to the tempo and its phase.

签名
节拍跟踪(音频: AudioBuffer) -> (节拍: 数字数组, 速度: 数字)
double[] TrackBeats(AudioBuffer audio, out double tempo)

参数

名称类型默认值说明
音频AudioBuffer—The clip; several channels are averaged.

返回

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

音高跟踪

函数

Follows the pitch of a clip that plays one note at a time - a voice, a flute, a bass line - window by window.

签名
音高跟踪 -> Pitch Point 数组
    音频: AudioBuffer
    最小值: 数字
    最大值: 数字
PitchPoint[] TrackPitch(
    AudioBuffer audio,
    double minimum = 50,
    double maximum = 1000)

参数

名称类型默认值说明
音频AudioBuffer—The clip; several channels are averaged.
最小值数字50The lowest pitch to look for, in Hz.
最大值数字1000The highest, in Hz.

返回

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