Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
AudioEffectChorus
继承: AudioEffect < Resource < RefCounted < Object
向音频总线添加合唱音频效果。
营造出多重音频源的听感。
描述
合唱(Chorus)效果会生成原始音频的多个副本(称为“声部”),并对这些副本的音高进行细微的变化处理,然后将它们叠加在原始音频之上,从而营造出声音来自多个不同声源的听感。这会产生一种频谱和空间上的流动感。
每个声部都会在原始音频播放后的一小段时间后才开始播放,这个时间差由 delay(延迟)来控制。一个内部的低频振荡器(LFO)负责控制它们的音高变化,而 depth(深度)则决定了 LFO 的最大作用量。
在现实世界中,这种效果常见于钢琴、合唱团以及各类乐器合奏中。
这种效果也可以用来拓宽单声道(Mono)音频的声场,并让数字生成的声音听起来更具自然感或模拟设备的质感。
教程
属性
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
方法
get_voice_cutoff_hz(voice_idx: int) const |
|
get_voice_delay_ms(voice_idx: int) const |
|
get_voice_depth_ms(voice_idx: int) const |
|
get_voice_level_db(voice_idx: int) const |
|
get_voice_pan(voice_idx: int) const |
|
get_voice_rate_hz(voice_idx: int) const |
|
void |
set_voice_cutoff_hz(voice_idx: int, cutoff_hz: float) |
void |
set_voice_delay_ms(voice_idx: int, delay_ms: float) |
void |
set_voice_depth_ms(voice_idx: int, depth_ms: float) |
void |
set_voice_level_db(voice_idx: int, level_db: float) |
void |
set_voice_pan(voice_idx: int, pan: float) |
void |
set_voice_rate_hz(voice_idx: int, rate_hz: float) |
属性说明
原始音频的音量比例。取值范围为 0 到 1。
float voice/1/cutoff_hz = 8000.0 🔗
语音低通滤波器的频率阈值,单位为 Hz。
float voice/1/delay_ms = 15.0 🔗
该声部相对于原始音频的延迟时间,单位为毫秒(ms)。
float voice/1/depth_ms = 2.0 🔗
语音低频振荡器的深度,以毫秒为单位。
float voice/1/level_db = 0.0 🔗
语音的增益,单位为分贝。
语音的声像位置。
该声部低频振荡器(low-frequency oscillator)的速率,单位为赫兹(Hz)。
float voice/2/cutoff_hz = 8000.0 🔗
语音低通滤波器的频率阈值,单位为 Hz。
float voice/2/delay_ms = 20.0 🔗
该声部相对于原始音频的延迟时间,单位为毫秒(ms)。
float voice/2/depth_ms = 3.0 🔗
语音低频振荡器的深度,以毫秒为单位。
float voice/2/level_db = 0.0 🔗
语音的增益,单位为分贝。
语音的声像位置。
该声部低频振荡器(low-frequency oscillator)的速率,单位为赫兹(Hz)。
语音低通滤波器的频率阈值,单位为 Hz。
该声部相对于原始音频的延迟时间,单位为毫秒(ms)。
语音低频振荡器的深度,以毫秒为单位。
语音的增益,单位为分贝。
语音的声像位置。
该声部低频振荡器(low-frequency oscillator)的速率,单位为赫兹(Hz)。
语音低通滤波器的频率阈值,单位为 Hz。
该声部相对于原始音频的延迟时间,单位为毫秒(ms)。
语音低频振荡器的深度,以毫秒为单位。
语音的增益,单位为分贝。
语音的声像位置。
该声部低频振荡器(low-frequency oscillator)的速率,单位为赫兹(Hz)。
该效果中的声部数量。取值范围为 1 到 4。
所有声部的音量比例。取值范围为 0 到 1。
方法说明
float get_voice_cutoff_hz(voice_idx: int) const 🔗
返回指定 voice_idx(声部索引)的低通滤波器的频率阈值(以赫兹 Hz 为单位)。高于该值的频率将会从该声部中被移除。
float get_voice_delay_ms(voice_idx: int) const 🔗
返回指定 voice_idx(声部索引)的低通滤波器的频率阈值(以赫兹 Hz 为单位)。高于该值的频率将会从该声部中被移除。
float get_voice_depth_ms(voice_idx: int) const 🔗
返回给定 voice_idx 的低频振荡器深度,以毫秒为单位。
float get_voice_level_db(voice_idx: int) const 🔗
返回给定 voice_idx 的增益,单位为分贝。
float get_voice_pan(voice_idx: int) const 🔗
返回指定 voice_idx(声部索引)的声像(Pan)位置。负值代表左声道,正值代表右声道。
float get_voice_rate_hz(voice_idx: int) const 🔗
返回指定 voice_idx(声部索引)的低频振荡器(low-frequency)的速率,单位为赫兹(Hz)。
void set_voice_cutoff_hz(voice_idx: int, cutoff_hz: float) 🔗
以赫兹(Hz)为单位,设置指定 voice_idx(声部索引)的低通滤波器的频率阈值。高于 cutoff_hz 的频率将会从该 voice_idx(声部)中被移除。该值的取值范围是 1 到 20500。
void set_voice_delay_ms(voice_idx: int, delay_ms: float) 🔗
设置指定 voice_idx 相对于原始音频的延迟,以毫秒为单位。取值范围为 0 到 50。
void set_voice_depth_ms(voice_idx: int, depth_ms: float) 🔗
以毫秒(ms)为单位,设置指定 voice_idx(声部索引)的低频振荡器(low-frequency oscillator)的深度。该值的取值范围是 0 到 20。
void set_voice_level_db(voice_idx: int, level_db: float) 🔗
设置指定 voice_idx 的增益,单位为分贝。取值范围为 -60 至 24。
void set_voice_pan(voice_idx: int, pan: float) 🔗
设置指定 voice_idx(声部索引)的声像(pan)位置。负值会将声音偏向左侧,正值会将声音偏向右侧。该值的取值范围是 -1 到 1。
void set_voice_rate_hz(voice_idx: int, rate_hz: float) 🔗
以赫兹(Hz)为单位,设置指定 voice_idx(声部索引)的低频振荡器(low-frequency oscillator)的速率。该值的取值范围是 0.1 到 20。