![]() |
STEM-SDK
1.0
Native Instruments' Stem-SDK
|
The Stem Mastering Chain is composed of a Compressor followed by a Limiter to create the finalized sound required by the Stem File format. Both Compressor and Limiter can be turned on or off individually (and are bypassed in the off state). The Compressor's key input signal can optionally be highpass filtered. The highpass filter can be bypassed by setting its cutoff frequency lower than 20Hz. The Stem Mastering Chain has a 32 sample lookahead @ 44.1kHz sample rate, and the number of lookahead samples is scaled by sample rate. All parameters are set in natural values (dB, sedonds, etc.). Level and Gain Reduction meters are optional and can be activated or deactivated. They return display values in dB. More...
#include <stem_chain.h>
Public Member Functions | |
stem_chain (float sample_rate=44100.f) | |
Creates a Stem Mastering Chain with the specified sample rate. | |
void | process (stereo_in &, size_t frames, stereo_out &) |
Process a two channel input signal for the specified amount of frames. The resulting audio samples are written into stereo_out. | |
void | gain_reduction (stereo_in &, size_t frames, float *out_gain_reduction) |
Computes the gain reduction curve delayed by the Stem Mastering Chain's lookahead size for the specified amount of frames. The out_gain_reduction parameter contains the computed values. Note that if this gain reduction curve is to be applied to the input signal, the input signal needs to be delayed by the lookahead size to align it with the curve. The number of lookahead samples can be retrieved from lookahead_size(). | |
int | lookahead_size () const |
Returns the limiter's lookahead size in samples. Lookahead size is 32 samples @ 44.1kHz and gets scaled by sample rate. | |
void | sample_rate (float) |
Sets the desired sample rate. | |
float | sample_rate () const |
Returns the current sample rate. | |
void | compressor_active (bool) |
Activates or deactivates/bypasses the Compressor. | |
bool | compressor_active () const |
Returns true if the Compressor is activated. | |
void | compressor_input_gain (float) |
Set the Compressor's input gain in dB clamped to [-12.0f, 12.0f]. | |
float | compressor_input_gain () const |
Returns the Compressor's input gain in dB. | |
void | compressor_output_gain (float) |
Set the Compressor's output gain in dB clamped to [-12.0f, 12.0f]. | |
float | compressor_output_gain () const |
Returns the Compressor's output gain in dB. | |
void | compressor_threshold (float) |
Set the Compressor's threshold in dB clamped to [-40.0f, 0.0f]. | |
float | compressor_threshold () const |
Returns the Compressor's threshold in dB. | |
void | compressor_wet_dry_gain (float) |
Set the Compressor's dry/wet ratio in percent. The parameter specifies the wetness in percent and is clamped to [0.0f, 100.0f] percent. | |
float | compressor_wet_dry_gain () const |
Returns the Compressor's wetness in percent. | |
void | compressor_ratio (float) |
Set the Compressor's ratio. Valid ratio values are [1.5f (1:1.5), 2.0f (1:2), 3.0f (1:3), 4.0f (1:4), 5.0f (1:5), 10.0f (1:10)]. If a non-valid ratio value is entered, the ratio will be set to the next value above with a max value of 10.f. | |
float | compressor_ratio () const |
Returns the Compressor's ratio. | |
void | compressor_attack (float) |
Set the Compressor's attack time in seconds clamped to [0.0001f, 0.03f]. | |
float | compressor_attack () const |
Returns the Compressor's attack time in seconds. | |
void | compressor_release (float) |
Sets the Compressor's release time in seconds clamped to [0.1f, 1.6f]. | |
float | compressor_release () const |
Returns the Compressor's release time in seconds. | |
void | compressor_hp_cutoff (float) |
Sets the Compressor's key input highpass filter cutoff frequency in Hz. Valid values are in the range [20.0f, 500.0f]. A value below 20.0f will effectively disable the highpass filter. Highpass filter is applied to the sidechain signal fed into Compressor's gain computer. That is, it affects the gain reduction curve, but is not applied directly to the Compressor's audio output. | |
float | compressor_hp_cutoff () const |
Returns the Compressor's highpass filter cutoff frequency in Hz. A value of 0.f indicates that the highpass filter is disabled. | |
void | limiter_active (bool) |
Activates or deactivates/bypasses the Limiter. | |
bool | limiter_active () const |
Returns true if the Limiter is activated. | |
void | limiter_threshold (float) |
Sets the Limiter's threshold in dB clamped to [-40.0f, 0.0f]. | |
float | limiter_threshold () const |
Returns the Limiter's threshold in dB. | |
void | limiter_release (float) |
Sets the Limiter's release time in seconds clamped to [0.001f, 1.f]. | |
float | limiter_release () const |
Returns the Limiter's release time in seconds. | |
void | limiter_ceiling (float) |
Sets the Limiter's ceiling in dB clamped to [-40.f, -0.001f]. | |
float | limiter_ceiling () const |
Returns the Limiter's ceiling in dB. | |
void | meters_active (bool) |
Activate or deactivate the computation of the Level Meters. | |
bool | meters_active () const |
Returns true if the Level Meters are activated. | |
float | compressor_input_level_rms () const |
Returns the Compressor's input RMS level in dB. ~3dB offset is added such that meter level is at 0dB for a 1kHz input sine wave. Min supported meter range is -100dB. | |
float | compressor_output_level_rms () const |
Returns the Compressor's output RMS level in dB. ~3dB offset is added such that meter level is at 0dB for a 1kHz input sine wave. Min supported meter range is -100dB. | |
float | compressor_input_level_peak () const |
Returns the Compressor's input peak level in dB. Min supported meter range is -100dB. | |
float | compressor_output_level_peak () const |
Returns the Compressor's output peak level in dB. Min supported meter range is -100dB. | |
float | compressor_gain_reduction () const |
Returns the Compressor's gain reduction in positive dB values. | |
float | limiter_input_level_rms () const |
Returns the Limiter's input RMS level in dB. ~3dB offset is added such that meter level is at 0dB for a 1kHz input sine wave. Min supported meter range is -100dB. | |
float | limiter_output_level_rms () const |
Returns the Limiter's output RMS level in dB. ~3dB offset is added such that meter level is at 0dB for a 1kHz input sine wave. Min supported meter range is -100dB. | |
float | limiter_input_level_peak () const |
Returns the Limiter's input peak level in dB. Min supported meter range is -100dB. | |
float | limiter_output_level_peak () const |
Returns the Limiter's output peak level in dB. Min supported meter range is -100dB. | |
float | limiter_gain_reduction () const |
Returns the Limiter's gain reduction in positive dB values. | |
The Stem Mastering Chain is composed of a Compressor followed by a Limiter to create the finalized sound required by the Stem File format. Both Compressor and Limiter can be turned on or off individually (and are bypassed in the off state). The Compressor's key input signal can optionally be highpass filtered. The highpass filter can be bypassed by setting its cutoff frequency lower than 20Hz. The Stem Mastering Chain has a 32 sample lookahead @ 44.1kHz sample rate, and the number of lookahead samples is scaled by sample rate. All parameters are set in natural values (dB, sedonds, etc.). Level and Gain Reduction meters are optional and can be activated or deactivated. They return display values in dB.