Reverb#
Reverb Stages emulate the natural reverberance of rooms.
- class audio_dsp.stages.reverb.ReverbRoom(max_room_size=1, **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
.
- 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_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_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.
Control
The following runtime control parameters are available for the ReverbRoom Stage:
Command ID macro |
Payload length |
Description |
---|---|---|
CMD_REVERB_ROOM_SAMPLING_FREQ |
|
The sampling frequency of the reverb, can only be set at initialisation. |
CMD_REVERB_ROOM_MAX_ROOM_SIZE |
|
Sets the maximum size of the delay buffers, can only be set at initialisation. |
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. |
CMD_REVERB_ROOM_DAMPING |
|
High frequency attenuation in Q0.31 format. |
CMD_REVERB_ROOM_WET_GAIN |
|
Gain applied to the wet signal in Q0.31 format |
CMD_REVERB_ROOM_DRY_GAIN |
|
Dry signal gain in Q0.31 format. |
CMD_REVERB_ROOM_PREGAIN |
|
The pregain applied to the signal before reverb. Changing this value is not recommended. |