生成
7 个节点
本页内容 7
噪声
函数Random noise of a chosen colour.
噪声 -> AudioBuffer
颜色: Noise Color
时长: 数字
振幅: 数字
种子: 整数
采样率: 整数AudioBuffer Noise(
NoiseColor color = NoiseColor.White,
double duration = 1,
double amplitude = 0.5,
int seed = 1,
int sampleRate = 44100)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 颜色 | Noise Color | 白噪声 | White hisses, pink sounds like rain, brown rumbles. |
| 时长 | 数字 | 1 | Length, in seconds. |
| 振幅 | 数字 | 0.5 | Peak level, from 0 to 1. |
| 种子 | 整数 | 1 | Which take of the noise. |
| 采样率 | 整数 | 44100 | Samples per second. |
返回
| 音频 | AudioBuffer |
备注
The same seed gives the same noise every time, so a document sounds the same on every run; change the seed for a different take.
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 生成
- 所属包
- 音频处理
音符频率
函数The frequency of a note named the way a musician writes it: A4, C#5, Eb3.
音符频率(音符: 文本) -> 数字
double NoteFrequency(string note = "A4")
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 音符 | 文本 | A4 | A letter A to G, an optional # or b, and an octave number. |
返回
| 频率 | 数字 |
备注
Equal temperament with A4 at 440 Hz; middle C is C4. A sharp is # and a flat is b.
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 生成
- 所属包
- 音频处理
静音
函数Nothing, for a length of time - a gap between sounds, or a bed to mix them onto.
静音(时长: 数字, 声道数: 整数, 采样率: 整数) -> AudioBuffer
AudioBuffer Silence(
double duration = 1,
int channels = 1,
int sampleRate = 44100)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 时长 | 数字 | 1 | Length, in seconds. |
| 声道数 | 整数 | 1 | How many channels: 1 for mono, 2 for stereo. |
| 采样率 | 整数 | 44100 | Samples per second. |
返回
| 音频 | AudioBuffer |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 生成
- 所属包
- 音频处理
音效
函数A synthesized game sound effect - a coin, a laser, an explosion, footsteps, rain - from the built-in recipe library.
音效(名称: 文本, 种子: 整数) -> AudioBuffer
AudioBuffer SoundEffect(
string name = "Pickup/Coin",
int seed = 1)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 名称 | 文本 | Pickup/Coin | The effect's name, such as Pickup/Coin, Weapon/Laser or Ambient/Rain. |
| 种子 | 整数 | 1 | Which take of the effect. |
返回
| 音频 | AudioBuffer |
备注
Every effect is made from oscillators, noise and filters as it is rendered; nothing is a recording. Each seed is a slightly different take of the same effect, which is what stops a sound played a hundred times from sounding like one sample played a hundred times. AudioGenerators.SoundEffectNames lists every name.
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 生成
- 所属包
- 音频处理
音效名称
函数The name of every effect AudioGenerators.SoundEffect can make.
音效名称() -> 文本数组
string[] SoundEffectNames()
返回
| 名称 | 文本数组 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 生成
- 所属包
- 音频处理
扫频
函数A tone whose pitch glides from one frequency to another, evenly in musical terms - each octave takes the same time.
扫频 -> AudioBuffer
起始频率: 数字
结束频率: 数字
时长: 数字
振幅: 数字
波形: Waveform
采样率: 整数AudioBuffer Sweep(
double startFrequency = 100,
double endFrequency = 8000,
double duration = 3,
double amplitude = 0.5,
Waveform waveform = Waveform.Sine,
int sampleRate = 44100)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 起始频率 | 数字 | 100 | Where the glide starts, in hertz. |
| 结束频率 | 数字 | 8000 | Where it ends, in hertz. |
| 时长 | 数字 | 3 | Length, in seconds. |
| 振幅 | 数字 | 0.5 | Peak level, from 0 to 1. |
| 波形 | Waveform | 正弦波 | The tone's shape. |
| 采样率 | 整数 | 44100 | Samples per second. |
返回
| 音频 | AudioBuffer |
备注
A sweep is the standard test signal for a filter or an effect: every frequency passes through it once, so its spectrogram is a single rising line and anything the effect does to one part of the spectrum shows as a change in that line.
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 生成
- 所属包
- 音频处理
音调
函数A steady tone of one pitch.
音调 -> AudioBuffer
频率: 数字
时长: 数字
振幅: 数字
波形: Waveform
采样率: 整数AudioBuffer Tone(
double frequency = 440,
double duration = 1,
double amplitude = 0.5,
Waveform waveform = Waveform.Sine,
int sampleRate = 44100)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 频率 | 数字 | 440 | Pitch, in hertz. 440 is the A above middle C. |
| 时长 | 数字 | 1 | Length, in seconds. |
| 振幅 | 数字 | 0.5 | Peak level, from 0 (silent) to 1 (full scale). |
| 波形 | Waveform | 正弦波 | Sine is pure; square, triangle and saw add harmonics and sound brighter. |
| 采样率 | 整数 | 44100 | Samples per second. |
返回
| 音频 | AudioBuffer |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 生成
- 所属包
- 音频处理