Reverb Stages¶
Reverb Stages emulate the natural reverberance of rooms.
ReverbRoom¶
- class audio_dsp.stages.ReverbRoom(max_room_size=1, predelay=10, max_predelay=None, **kwargs)
The room reverb stage. This is based on Freeverb by Jezar at Dreampoint, and consists of 8 parallel comb filters fed into 4 series all-pass filters.
- Parameters:
- max_room_size
Sets the maximum room size for this reverb. The
room_sizeparameter sets the fraction of this value actually used at any given time. For optimal memory usage, max_room_size should be set so that the longest reverb tail occurs whenroom_size=1.0.- predelayfloat, optional
The delay applied to the wet channel in ms.
- max_predelayfloat, optional
The maximum predelay in ms.
- Attributes:
- dsp_block
audio_dsp.dsp.reverb.reverb_room The DSP block class; see Reverb Room for implementation details.
- dsp_block
- set_damping(damping)
Set the damping of the reverb room stage. This controls how much high frequency attenuation is in the room. Higher values yield shorter reverberation times at high frequencies.
- Parameters:
- dampingfloat
How much high frequency attenuation in the room, between 0 and 1.
- set_decay(decay)
Set the decay of the reverb room stage. This sets how reverberant the room is. Higher values will give a longer reverberation time for a given room size.
- Parameters:
- decayfloat
How long the reverberation of the room is, between 0 and 1.
- set_dry_gain(gain_dB)
Set the dry gain of the reverb room stage. This sets the level of the unprocessed signal.
- Parameters:
- gain_dbfloat
Dry gain in dB, less than 0 dB.
- set_parameters(
- parameters: ReverbRoomParameters,
Update the parameters of the ReverbRoom stage.
- set_pre_gain(pre_gain)
Set the pre gain of the reverb room stage.
- Parameters:
- pre_gainfloat
Pre gain value. Must be less than 1.
- set_predelay(predelay)
Set the predelay of the wet channel.
- Parameters:
- predelayfloat
Predelay in ms, less than max_predelay.
- set_room_size(new_room_size)
Set the room size, will adjust the delay line lengths.
The room size is proportional to
max_room_size, and must be between 0 and 1. To increase the room_size above 1.0,max_room_sizemust instead be increased. Optimal memory usage occurs whenroom_sizeis set to 1.0.- Parameters:
- new_room_sizefloat
How big the room is as a proportion of max_room_size. This sets delay line lengths and must be between 0 and 1.
- set_wet_dry_mix(mix)
Set the wet/dry gains so that the mix of 0 results in a fully dry output, the mix of 1 results in a fully wet output.
- Parameters:
- mixfloat
The wet/dry mix, must be [0, 1].
- set_wet_gain(gain_dB)
Set the wet gain of the reverb room stage. This sets the level of the reverberated signal.
- Parameters:
- gain_dbfloat
Wet gain in dB, less than 0 dB.
- pydantic model audio_dsp.models.reverb.ReverbRoomParameters
Parameters for a ReverbRoom Stage.
- field damping: float = 0.4
This controls how much high frequency attenuation is in the room. Higher values yield shorter reverberation times at high frequencies. Range: 0 to 1
- Constraints:
ge = 0
le = 1
- field decay: float = 0.5
This sets how reverberant the room is. Higher values will give a longer reverberation time for a given room size. Range: 0 to 1
- Constraints:
ge = 0
le = 1
- field predelay: float = 15
Set the predelay in milliseconds.
- Constraints:
ge = 0
le = 30
- field pregain: float = 0.015
It is not advised to increase this value above the default 0.015, as it can result in saturation inside the reverb delay lines.
- Constraints:
ge = 0
le = 1
- field room_size: float = 1.0
This sets how reverberant the room is. Higher values will give a longer reverberation time for a given room size. Range: 0 to 1
- Constraints:
ge = 0
le = 1
- field wet_dry_mix: float = 0.5
The mix between the wet and dry signal. When the mix is 0, the output signal is fully dry, when 1, the output signal is fully wet.
- Constraints:
ge = 0
le = 1
ReverbRoom Control¶
The following runtime command ids are available for the ReverbRoom Stage. For details on reading and writing these commands, see the Run-Time Control User Guide.
Control parameter |
Payload length |
|---|---|
CMD_REVERB_ROOM_ROOM_SIZE |
|
How big the room is as a proportion of max_room_size. This sets delay line lengths and must be between 0 and 1. |
|
CMD_REVERB_ROOM_FEEDBACK |
|
feedback gain in Q0.31 format. Feedback can be calculated from decay as (0.28 decay) + 0.7. Use the function |
|
CMD_REVERB_ROOM_DAMPING |
|
High frequency attenuation in Q0.31 format. Use the function |
|
CMD_REVERB_ROOM_WET_GAIN |
|
Gain applied to the wet signal in Q0.31 format. Use the function |
|
CMD_REVERB_ROOM_DRY_GAIN |
|
Dry signal gain in Q0.31 format. Use the function |
|
CMD_REVERB_ROOM_PREGAIN |
|
The pregain applied to the signal before the reverb. Changing this value is not recommended. Use the function |
|
CMD_REVERB_ROOM_PREDELAY |
|
Predelay applied to the wet channel in samples. To convert a value in other units of time to samples, use |
|
ReverbRoomStereo¶
- class audio_dsp.stages.ReverbRoomStereo(max_room_size=1, predelay=10, max_predelay=None, **kwargs)
The stereo room reverb stage. This is based on Freeverb by Jezar at Dreampoint. Each channel consists of 8 parallel comb filters fed into 4 series all-pass filters, and the reverberator outputs are mixed according to the
widthparameter.- Parameters:
- max_room_size
Sets the maximum room size for this reverb. The
room_sizeparameter sets the fraction of this value actually used at any given time. For optimal memory usage, max_room_size should be set so that the longest reverb tail occurs whenroom_size=1.0.- predelayfloat, optional
The delay applied to the wet channel in ms.
- max_predelayfloat, optional
The maximum predelay in ms.
- Attributes:
- dsp_block
audio_dsp.dsp.reverb_stereo.reverb_room_stereo The DSP block class; see Reverb Room Stereo for implementation details.
- dsp_block
- set_damping(damping)
Set the damping of the reverb room stage. This controls how much high frequency attenuation is in the room. Higher values yield shorter reverberation times at high frequencies.
- Parameters:
- dampingfloat
How much high frequency attenuation in the room, between 0 and 1.
- set_decay(decay)
Set the decay of the reverb room stage. This sets how reverberant the room is. Higher values will give a longer reverberation time for a given room size.
- Parameters:
- decayfloat
How long the reverberation of the room is, between 0 and 1.
- set_dry_gain(gain_dB)
Set the dry gain of the reverb room stage. This sets the level of the unprocessed signal.
- Parameters:
- gain_dbfloat
Dry gain in dB, less than 0 dB.
- set_parameters(
- parameters: ReverbRoomStereoParameters,
Update the parameters of the ReverbRoomStereo stage.
- set_pre_gain(pre_gain)
Set the pre gain of the reverb room stage.
- Parameters:
- pre_gainfloat
Pre gain value. Must be less than 1.
- set_predelay(predelay)
Set the predelay of the wet channel.
- Parameters:
- predelayfloat
Predelay in ms, less than max_predelay.
- set_room_size(new_room_size)
Set the room size, will adjust the delay line lengths.
The room size is proportional to
max_room_size, and must be between 0 and 1. To increase the room_size above 1.0,max_room_sizemust instead be increased. Optimal memory usage occurs whenroom_sizeis set to 1.0.- Parameters:
- new_room_sizefloat
How big the room is as a proportion of max_room_size. This sets delay line lengths and must be between 0 and 1.
- set_wet_dry_mix(mix)
Set the wet/dry gains so that the mix of 0 results in a fully dry output, the mix of 1 results in a fully wet output.
- Parameters:
- mixfloat
The wet/dry mix, must be [0, 1].
- set_wet_gain(gain_dB)
Set the wet gain of the reverb room stage. This sets the level of the reverberated signal.
- Parameters:
- gain_dbfloat
Wet gain in dB, less than 0 dB.
- set_width(width)
Set the decay of the reverb room stage. This sets how reverberant the room is. Higher values will give a longer reverberation time for a given room size.
- Parameters:
- widthfloat
How much stereo separation between the channels. A width of 0 indicates no stereo separation (i.e. mono). A width of 1 indicates maximum stereo separation.
- pydantic model audio_dsp.models.reverb.ReverbRoomStereoParameters
Parameters for a ReverbRoomStereo Stage.
- field damping: float = 0.4
This controls how much high frequency attenuation is in the room. Higher values yield shorter reverberation times at high frequencies. Range: 0 to 1
- Constraints:
ge = 0
le = 1
- field decay: float = 0.5
This sets how reverberant the room is. Higher values will give a longer reverberation time for a given room size. Range: 0 to 1
- Constraints:
ge = 0
le = 1
- field predelay: float = 15
Set the predelay in milliseconds.
- Constraints:
ge = 0
le = 30
- field pregain: float = 0.015
It is not advised to increase this value above the default 0.015, as it can result in saturation inside the reverb delay lines.
- Constraints:
ge = 0
le = 1
- field room_size: float = 1.0
This sets how reverberant the room is. Higher values will give a longer reverberation time for a given room size. Range: 0 to 1
- Constraints:
ge = 0
le = 1
- field wet_dry_mix: float = 0.5
The mix between the wet and dry signal. When the mix is 0, the output signal is fully dry, when 1, the output signal is fully wet.
- Constraints:
ge = 0
le = 1
- field width: float = 1.0
How much stereo separation there is between the left and right channels. Setting width to 0 will yield a mono signal, whilst setting width to 1 will yield the most stereo separation.
- Constraints:
ge = 0
le = 1
ReverbRoomStereo Control¶
The following runtime command ids are available for the ReverbRoomStereo Stage. For details on reading and writing these commands, see the Run-Time Control User Guide.
Control parameter |
Payload length |
|---|---|
CMD_REVERB_ROOM_STEREO_ROOM_SIZE |
|
How big the room is as a proportion of max_room_size. This sets delay line lengths and must be between 0 and 1. |
|
CMD_REVERB_ROOM_STEREO_FEEDBACK |
|
feedback gain in Q0.31 format. Feedback can be calculated from decay as (0.28 decay) + 0.7. Use the function |
|
CMD_REVERB_ROOM_STEREO_DAMPING |
|
High frequency attenuation in Q0.31 format. Use the function |
|
CMD_REVERB_ROOM_STEREO_WET_GAIN1 |
|
Gain applied to obtain the wet signal in Q0.31 format. Use function |
|
CMD_REVERB_ROOM_STEREO_WET_GAIN2 |
|
Gain applied to obtain the wet signal in Q0.31 format. Use function |
|
CMD_REVERB_ROOM_STEREO_DRY_GAIN |
|
Dry signal gain in Q0.31 format. Use the function |
|
CMD_REVERB_ROOM_STEREO_PREGAIN |
|
The pregain applied to the signal before the reverb. Changing this value is not recommended. Use the function |
|
CMD_REVERB_ROOM_STEREO_PREDELAY |
|
Predelay applied to the wet channel in samples. To convert a value in other units of time to samples, use |
|
ReverbPlateStereo¶
- class audio_dsp.stages.ReverbPlateStereo(predelay=10, max_predelay=None, **kwargs)
The stereo room plate stage. This is based on Dattorro’s 1997 paper. This reverb consists of 4 allpass filters for input diffusion, followed by a figure of 8 reverb tank of allpasses, low-pass filters, and delays. The output is taken from multiple taps in the delay lines to get a desirable echo density.
- Parameters:
- predelayfloat, optional
The delay applied to the wet channel in ms.
- max_predelayfloat, optional
The maximum predelay in ms.
- Attributes:
- dsp_block
audio_dsp.dsp.reverb.reverb_plate_stereo The DSP block class; see Reverb Plate Stereo for implementation details.
- dsp_block
- set_bandwidth(bandwidth)
Set the bandwidth of the plate reverb stage. This sets the low pass cutoff frequency of the reverb input. Higher values will give a higher cutoff frequency.
- Parameters:
- bandwidthfloat
The bandwidth of the plate input signal, between 0 and 1.
- set_damping(damping)
Set the damping of the plate reverb stage. This controls how much high frequency attenuation is in the plate. Higher values yield shorter reverberation times at high frequencies.
- Parameters:
- dampingfloat
How much high frequency attenuation in the plate, between 0 and 1.
- set_decay(decay)
Set the decay of the plate reverb stage. This sets how reverberant the plate is. Higher values will give a longer reverberation time.
- Parameters:
- decayfloat
How long the reverberation of the plate is, between 0 and 1.
- set_dry_gain(gain_dB)
Set the dry gain of the reverb room stage. This sets the level of the unprocessed signal.
- Parameters:
- gain_dbfloat
Dry gain in dB, less than 0 dB.
- set_early_diffusion(diffusion)
Set the early diffusion of the plate reverb stage. This sets how much diffusion is present in the first part of the reverberation. Higher values will give more diffusion.
- Parameters:
- diffusionfloat
How diffuse the plate is, between 0 and 1.
- set_late_diffusion(diffusion)
Set the late diffusion of the plate reverb stage. This sets how much diffusion is present in the latter part of the reverberation. Higher values will give more diffusion.
- Parameters:
- diffusionfloat
How diffuse the plate is, between 0 and 1.
- set_parameters(
- parameters: ReverbPlateStereoParameters,
Update the parameters of the ReverbPlate stage.
- set_pre_gain(pre_gain)
Set the pre gain of the reverb room stage.
- Parameters:
- pre_gainfloat
Pre gain value. Must be less than 1.
- set_predelay(predelay)
Set the predelay of the wet channel.
- Parameters:
- predelayfloat
Predelay in ms, less than max_predelay.
- set_wet_dry_mix(mix)
Set the wet/dry gains so that the mix of 0 results in a fully dry output, the mix of 1 results in a fully wet output.
- Parameters:
- mixfloat
The wet/dry mix, must be [0, 1].
- set_wet_gain(gain_dB)
Set the wet gain of the reverb room stage. This sets the level of the reverberated signal.
- Parameters:
- gain_dbfloat
Wet gain in dB, less than 0 dB.
- set_width(width)
Set the decay of the reverb room stage. This sets how reverberant the room is. Higher values will give a longer reverberation time for a given room size.
- Parameters:
- widthfloat
How much stereo separation between the channels. A width of 0 indicates no stereo separation (i.e. mono). A width of 1 indicates maximum stereo separation.
- pydantic model audio_dsp.models.reverb.ReverbPlateStereoParameters
Parameters for a ReverbPlateStereo Stage.
- field bandwidth: float = 8000
Sets the low pass cutoff frequency of the reverb input.
- Constraints:
ge = 0
le = 24000
- field damping: float = 0.75
This controls how much high frequency attenuation is in the room. Higher values yield shorter reverberation times at high frequencies. Range: 0 to 1
- Constraints:
ge = 0
le = 1
- field decay: float = 0.4
This sets how reverberant the room is. Higher values will give a longer reverberation time for a given room size. Range: 0 to 1
- Constraints:
ge = 0
le = 1
- field early_diffusion: float = 0.75
Sets how much diffusion is present in the first part of the reverberation. Range: 0 to 1
- Constraints:
ge = 0
le = 1
- field late_diffusion: float = 0.7
Sets how much diffusion is present in the latter part of the reverberation. Range: 0 to 1
- Constraints:
ge = 0
le = 1
- field predelay: float = 15
Set the predelay in milliseconds.
- Constraints:
ge = 0
le = 30
- field pregain: float = 0.5
It is not advised to increase this value above the default 0.5, as it can result in saturation inside the reverb delay lines.
- Constraints:
ge = 0
le = 1
- field wet_dry_mix: float = 0.5
The mix between the wet and dry signal. When the mix is 0, the output signal is fully dry, when 1, the output signal is fully wet.
- Constraints:
ge = 0
le = 1
- field width: float = 1.0
How much stereo separation there is between the left and right channels. Setting width to 0 will yield a mono signal, whilst setting width to 1 will yield the most stereo separation.
- Constraints:
ge = 0
le = 1
ReverbPlateStereo Control¶
The following runtime command ids are available for the ReverbPlateStereo Stage. For details on reading and writing these commands, see the Run-Time Control User Guide.
Control parameter |
Payload length |
|---|---|
CMD_REVERB_PLATE_STEREO_DECAY |
|
The amount of decay in the plate in Q0.31 format. To convert a decay value between 0 and 1 to an |
|
CMD_REVERB_PLATE_STEREO_DAMPING |
|
The amount of high frequency attenuation in Q0.31 format. To convert a damping value between 0 and 1 to an |
|
CMD_REVERB_PLATE_STEREO_EARLY_DIFFUSION |
|
The amount of diffusion in the early part of the reverb. To convert a diffusion value between 0 and 1 to an |
|
CMD_REVERB_PLATE_STEREO_LATE_DIFFUSION |
|
The amount of diffusion in the late part of the reverb. To convert a diffusion value between 0 and 1 to an |
|
CMD_REVERB_PLATE_STEREO_BANDWIDTH |
|
The input low pass coefficient in Q0.31 format. A bandwidth in Hertz can be converted to an |
|
CMD_REVERB_PLATE_STEREO_WET_GAIN1 |
|
Gain applied to the wet signal in Q0.31 format. To calculate the wet gains based on a level in dB and a stereo width, use the function |
|
CMD_REVERB_PLATE_STEREO_WET_GAIN2 |
|
Gain applied to the wet signal in Q0.31 format. To calculate the wet gains based on a level in dB and a stereo width, use the function |
|
CMD_REVERB_PLATE_STEREO_DRY_GAIN |
|
Gain applied to the dry signal in Q0.31 format. To calculate the dry gain based on a level in dB, use the function |
|
CMD_REVERB_PLATE_STEREO_PREGAIN |
|
The pregain applied to the signal before the reverb. Changing this value is only required if saturation occurs in the reverb tank. To convert a linear gain value to an |
|
CMD_REVERB_PLATE_STEREO_PREDELAY |
|
The wet channel predelay value in samples. To convert a value in other units of time to samples, use |
|