生成
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 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 生成
- 所屬包
- 音訊處理