元編程參考文件

編輯

13 個節點

本頁內容 13

拼接

函數

Plays one clip after another.

簽名
拼接(第一個: AudioBuffer, 第二個: AudioBuffer) -> AudioBuffer
AudioBuffer Concatenate(AudioBuffer first, AudioBuffer second)

參數

名稱型別預設值說明
第一個AudioBuffer—The clip that plays first; the result takes its sample rate.
第二個AudioBuffer—The clip that follows it.

返回

音訊AudioBuffer
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
編輯
所屬包
音訊處理

淡入

函數

Brings a clip in from silence.

簽名
淡入 -> AudioBuffer
    音訊: AudioBuffer
    時長: 數字
    曲線: Fade Curve
AudioBuffer FadeIn(
    AudioBuffer audio,
    double duration = 0.5,
    FadeCurve curve = FadeCurve.Smooth)

參數

名稱型別預設值說明
音訊AudioBuffer—The clip to fade.
時長數字0.5How long the fade takes, in seconds; a fade longer than the clip covers the whole clip.
曲線Fade Curve平滑The shape of the fade.

返回

音訊AudioBuffer
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
編輯
所屬包
音訊處理

淡出

函數

Takes a clip down to silence at its end.

簽名
淡出 -> AudioBuffer
    音訊: AudioBuffer
    時長: 數字
    曲線: Fade Curve
AudioBuffer FadeOut(
    AudioBuffer audio,
    double duration = 0.5,
    FadeCurve curve = FadeCurve.Smooth)

參數

名稱型別預設值說明
音訊AudioBuffer—The clip to fade.
時長數字0.5How long the fade takes, in seconds; a fade longer than the clip covers the whole clip.
曲線Fade Curve平滑The shape of the fade.

返回

音訊AudioBuffer
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
編輯
所屬包
音訊處理

增益

函數

Makes a clip louder or quieter by a number of decibels.

簽名
增益(音訊: AudioBuffer, 分貝: 數字) -> AudioBuffer
AudioBuffer Gain(AudioBuffer audio, double decibels = -6)

參數

名稱型別預設值說明
音訊AudioBuffer—The clip to change.
分貝數字-6How much louder (positive) or quieter (negative).

返回

音訊AudioBuffer

備註

+6 dB roughly doubles the level and -6 dB roughly halves it; 0 dB leaves the clip exactly as it was. Anything pushed past full scale is clipped.

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
編輯
所屬包
音訊處理

混音

函數

Layers one clip over another, so both are heard at once.

簽名
混音 -> AudioBuffer
    第一個: AudioBuffer
    第二個: AudioBuffer
    偏移: 數字
AudioBuffer Mix(
    AudioBuffer first,
    AudioBuffer second,
    double offset = 0)

參數

名稱型別預設值說明
第一個AudioBuffer—The bottom layer; the result takes its sample rate.
第二個AudioBuffer—The layer on top.
偏移數字0How far into the first clip the second one starts, in seconds.

返回

音訊AudioBuffer

備註

The result lasts until whichever clip ends later. The levels add, so lower them first if the sum would clip.

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
編輯
所屬包
音訊處理

全部混合

函數

Adds any number of clips together, all starting at the same moment.

簽名
全部混合(片段: AudioBuffer 陣列) -> AudioBuffer
AudioBuffer MixAll(AudioBuffer[] clips)

參數

名稱型別預設值說明
片段AudioBuffer 陣列—The clips; at least one.

返回

音訊AudioBuffer

備註

The result is as long as the longest clip and has the most channels any clip has, at the first clip's sample rate. The levels add without being clipped, so the bands or parts a clip was divided into mix back to exactly that clip.

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
編輯
所屬包
音訊處理

標準化

函數

Turns a clip up or down so that its loudest moment reaches a set level.

簽名
標準化(音訊: AudioBuffer, 峰值分貝: 數字) -> AudioBuffer
AudioBuffer Normalize(
    AudioBuffer audio,
    double peakDecibels = -1)

參數

名稱型別預設值說明
音訊AudioBuffer—The clip to normalize.
峰值分貝數字-1The level the loudest sample should reach, in decibels below full scale; -1 leaves a little headroom.

返回

音訊AudioBuffer

備註

A silent clip has no loudest moment and comes back unchanged.

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
編輯
所屬包
音訊處理

補白

函數

Adds silence before and after a clip.

簽名
補白(音訊: AudioBuffer, 之前: 數字, 之後: 數字) -> AudioBuffer
AudioBuffer Pad(
    AudioBuffer audio,
    double before = 0.5,
    double after = 0.5)

參數

名稱型別預設值說明
音訊AudioBuffer—The clip to pad.
之前數字0.5Silence to add at the start, in seconds.
之後數字0.5Silence to add at the end, in seconds.

返回

音訊AudioBuffer
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
編輯
所屬包
音訊處理

重複

函數

Plays a clip several times in a row.

簽名
重複(音訊: AudioBuffer, 數量: 整數) -> AudioBuffer
AudioBuffer Repeat(AudioBuffer audio, int count = 2)

參數

名稱型別預設值說明
音訊AudioBuffer—The clip to repeat.
數量整數2How many times it plays in total.

返回

音訊AudioBuffer
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
編輯
所屬包
音訊處理

倒放

函數

Plays a clip backwards.

簽名
倒放(音訊: AudioBuffer) -> AudioBuffer
AudioBuffer Reverse(AudioBuffer audio)

參數

名稱型別預設值說明
音訊AudioBuffer—The clip to reverse.

返回

音訊AudioBuffer
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
編輯
所屬包
音訊處理

相減

函數

Takes one clip away from another, sample by sample: what is in the first and not the second.

簽名
相減(第一個: AudioBuffer, 第二個: AudioBuffer) -> AudioBuffer
AudioBuffer Subtract(AudioBuffer first, AudioBuffer second)

參數

名稱型別預設值說明
第一個AudioBuffer—The clip taken from; the result takes its sample rate.
第二個AudioBuffer—The clip taken away.

返回

差值AudioBuffer

備註

Peak Decibels of the difference says how far apart two clips are - a clip and the parts it was divided into, mixed back, differ only by float rounding, well below -100 dB.

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
編輯
所屬包
音訊處理

裁剪

函數

Keeps one stretch of a clip and drops the rest.

簽名
裁剪(音訊: AudioBuffer, 起點: 數字, 長度: 數字) -> AudioBuffer
AudioBuffer Trim(
    AudioBuffer audio,
    double start = 0,
    double length = 1)

參數

名稱型別預設值說明
音訊AudioBuffer—The clip to cut.
起點數字0Where the kept stretch begins, in seconds from the start.
長度數字1How long the kept stretch is, in seconds.

返回

音訊AudioBuffer

備註

A stretch that runs past the end of the clip stops at the end; one that starts past the end is empty.

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
編輯
所屬包
音訊處理

去除靜音

函數

Removes the quiet stretches at the start and the end of a clip.

簽名
去除靜音(音訊: AudioBuffer, 閾值(分貝): 數字) -> AudioBuffer
AudioBuffer TrimSilence(
    AudioBuffer audio,
    double thresholdDecibels = -50)

參數

名稱型別預設值說明
音訊AudioBuffer—The clip to tidy.
閾值(分貝)數字-50How quiet counts as silence, in decibels below full scale.

返回

音訊AudioBuffer

備註

A sample counts as quiet when every channel is below the threshold. A clip that is quiet throughout comes back empty.

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
編輯
所屬包
音訊處理