Un4seen.Bass.AddOn.FxBASS_BFX_COMPRESSOR2
Namespace: Un4seen.Bass.AddOn.Fx
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
[SerializableAttribute] [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public sealed class BASS_BFX_COMPRESSOR2
The BASS_BFX_COMPRESSOR2 type exposes the following members.
Name | Description | |
---|---|---|
BASS_BFX_COMPRESSOR2 |
Default constructor
| |
BASS_BFX_COMPRESSOR2(Single, Single, Single, Single, Single, BASSFXChan) |
Constructor already setting the members.
|
Name | Description | |
---|---|---|
Calculate0dBGain |
Calculates for the current threshold/ratio combination a gain value to roughly achieve a 0 dB peak line.
| |
Preset_Default |
Sets the instance members to a preset.
| |
Preset_Hard |
Sets the instance members to a preset.
| |
Preset_Hard2 |
Sets the instance members to a preset.
| |
Preset_HardCommercial |
Sets the instance members to a preset.
| |
Preset_Medium |
Sets the instance members to a preset.
| |
Preset_Soft |
Sets the instance members to a preset.
| |
Preset_Soft2 |
Sets the instance members to a preset.
|
Name | Description | |
---|---|---|
fAttack |
Time in ms before compression reaches its full value, in the range from 0.01 to 500. The default value is 20 ms.
| |
fGain |
Output gain in dB of signal after compression, in the range from -60 to 60. The default value is 5 dB.
| |
fRatio |
Compression ratio, in the range from 1 to 100. The default value is 3, which means 3:1 compression.
| |
fRelease |
Time (speed) in ms at which compression is stopped after input drops below fThreshold, in the range from 50 to 3000. The default value is 200 ms.
| |
fThreshold |
Point in dB at which compression begins, in decibels, in the range from -60 to 0. The default value is -15 dB.
| |
lChannel |
A BASSFXChan flag to define on which channels to apply the effect.
Default: -1 (BASS_BFX_CHANALL) - all channels. |
Compressors are commonly used in recording to control the level, by making loud passages quieter, and quiet passages louder. This is useful in allowing a vocalist to sing quiet and loud for different emphasis, and always be heard clearly in the mix. Compression is generally applied to guitar to give clean sustain, where the start of a note is "squashed" with the gain automatically increased as the not fades away. Compressors take a short time to react to a picked note, and it can be difficult to find settings that react quickly enough to the volume change without killing the natural attack sound of your guitar.
The fThreshold sets the level above which volume is reduced in level while quiet sound are untreated (downward compression). The fAttack controls how fast the unit responds to volume increases. The fRelease controls how slowly the unit responds to decreasing volume.
The compressor reduces the gain (level) of an audio signal if its amplitude exceeds a threshold (using RMS sensing with a hard knee). The amount of gain reduction is determined by a ratio. For example, with a ratio of 4:1, when the (time averaged) input level is 4 dB over the threshold, the output signal level will be 1 dB over the threshold. The gain (level) has been reduced by 3 dB. When the input level is 8 dB above the threshold, the output level will be 2 dB; a 6 dB gain reduction. A more specific example for a 4:1 ratio: Threshold = −10 dB; Input = −6 dB (4 dB above the threshold); Output = −9 dB (1 dB above the threshold)
With any threshold/ratio combination, you could calculate the gain for a 0dB peak like this: fGain=fThreshold*(1/fRatio-1)