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