Reverb#
Reverb Stages emulate the natural reverberance of rooms.
- class audio_dsp.stages.reverb.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_size
parameter 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_pre_gain(pre_gain)
Set the pre gain of the reverb room stage. It is not advised to increase this value above the default 0.015, as it can result in saturation inside the reverb delay lines.
- Parameters:
- pre_gainfloat
Pre gain value. Must be less than 1 (default 0.015).
- 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_size
must instead be increased. Optimal memory usage occurs whenroom_size
is 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.
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 |