格式
8 个节点
本页内容 8
改变速度
函数Plays a clip faster or slower, the way a tape or a record does - pitch and tempo change together.
改变速度(音频: AudioBuffer, 系数: 数字) -> AudioBuffer
AudioBuffer ChangeSpeed(AudioBuffer audio, double factor = 1.5)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 音频 | AudioBuffer | — | The clip to change. |
| 系数 | 数字 | 1.5 | How much faster: above 1 speeds up, below 1 slows down. |
返回
| 音频 | AudioBuffer |
备注
A factor of 2 is twice as fast and an octave higher; 0.5 is half speed and an octave lower.
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 格式
- 所属包
- 音频处理
由样本生成
函数A one-channel clip made from an array of numbers from -1 to 1, one per sample.
由样本生成(样本: 数字数组, 采样率: 整数) -> AudioBuffer
AudioBuffer FromSamples(
double[] samples,
int sampleRate = 44100)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 样本 | 数字数组 | — | The samples, in order. |
| 采样率 | 整数 | 44100 | How many of them make a second. |
返回
| 音频 | AudioBuffer |
备注
Values beyond -1 and 1 are clipped when the clip is stored.
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 格式
- 所属包
- 音频处理
声像
函数Places a clip between the left and right speakers.
声像(音频: AudioBuffer, 位置: 数字) -> AudioBuffer
AudioBuffer Pan(AudioBuffer audio, double position = 0)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 音频 | AudioBuffer | — | The clip to place. |
| 位置 | 数字 | 0 | -1 is fully left, 0 the centre, 1 fully right. |
返回
| 音频 | AudioBuffer |
备注
A mono clip is panned at constant power - at the centre each side is 3 dB down, so it sounds as loud wherever it is placed. A stereo clip is balanced instead: the side it moves away from is turned down and the near side is left alone, so at the centre it passes through unchanged.
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 格式
- 所属包
- 音频处理
重采样
函数Converts a clip to another sample rate without changing how it sounds.
重采样(音频: AudioBuffer, 采样率: 整数) -> AudioBuffer
AudioBuffer Resample(AudioBuffer audio, int sampleRate = 48000)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 音频 | AudioBuffer | — | The clip to convert. |
| 采样率 | 整数 | 48000 | The new number of samples per second. |
返回
| 音频 | AudioBuffer |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 格式
- 所属包
- 音频处理
转为单声道
函数Mixes every channel of a clip down to one.
转为单声道(音频: AudioBuffer) -> AudioBuffer
AudioBuffer ToMono(AudioBuffer audio)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 音频 | AudioBuffer | — | The clip to mix down. |
返回
| 音频 | AudioBuffer |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 格式
- 所属包
- 音频处理
转为样本
函数One channel of a clip as an array of numbers from -1 to 1, one per sample - for arithmetic the toolbox has no node for.
转为样本(音频: AudioBuffer, 声道: 整数) -> 数字数组
double[] ToSamples(AudioBuffer audio, int channel = 0)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 音频 | AudioBuffer | — | The clip to read. |
| 声道 | 整数 | 0 | Which channel, counting from 0; 0 is the left of a stereo clip. |
返回
| 样本 | 数字数组 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 格式
- 所属包
- 音频处理
转为标准格式
函数Converts a clip to the platform's standard 44.1 kHz stereo segment, which some other toolboxes ask for.
转为标准格式(音频: AudioBuffer) -> StandardAudioSegment
StandardAudioSegment ToStandard(AudioBuffer audio)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 音频 | AudioBuffer | — | The clip to convert. |
返回
| 音频 | StandardAudioSegment |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 格式
- 所属包
- 音频处理
转为立体声
函数Gives a clip two channels: a mono clip is heard equally on both sides, and a clip with more than two keeps its first two.
转为立体声(音频: AudioBuffer) -> AudioBuffer
AudioBuffer ToStereo(AudioBuffer audio)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 音频 | AudioBuffer | — | The clip to convert. |
返回
| 音频 | AudioBuffer |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 格式
- 所属包
- 音频处理