Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
dsp.h File Reference

Optimized DSP functions. More...

#include "zrythm-config.h"
#include "utils/math.h"
#include "juce_wrapper.h"
Include dependency graph for dsp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  zrythm::utils
 String utilities.

Functions

void zrythm::utils::float_ranges::linear_fade_in_from (float *dest, int32_t start_offset, int32_t total_frames_to_fade, size_t size, float fade_from_multiplier)
 Calculate linear fade by multiplying from 0 to 1 for.
void zrythm::utils::float_ranges::linear_fade_out_to (float *dest, int32_t start_offset, int32_t total_frames_to_fade, size_t size, float fade_to_multiplier)
 Calculate linear fade by multiplying from 0 to 1 for.
void zrythm::utils::float_ranges::make_mono (float *l, float *r, size_t size, bool equal_power, bool optimize=true)
 Makes the two signals mono.

Detailed Description

Function Documentation

◆ linear_fade_in_from()

void zrythm::utils::float_ranges::linear_fade_in_from ( float * dest,
int32_t start_offset,
int32_t total_frames_to_fade,
size_t size,
float fade_from_multiplier )

Calculate linear fade by multiplying from 0 to 1 for.

Parameters
total_frames_to_fadesamples.
Note
Does not work properly when
Parameters
fade_from_multiplieris < 1k.
start_offsetStart offset in the fade interval.
total_frames_to_fadeTotal frames that should be faded.
sizeNumber of frames to process.
fade_from_multiplierMultiplier to fade from (0 to fade from silence.)

◆ linear_fade_out_to()

void zrythm::utils::float_ranges::linear_fade_out_to ( float * dest,
int32_t start_offset,
int32_t total_frames_to_fade,
size_t size,
float fade_to_multiplier )

Calculate linear fade by multiplying from 0 to 1 for.

Parameters
total_frames_to_fadesamples.
start_offsetStart offset in the fade interval.
total_frames_to_fadeTotal frames that should be faded.
sizeNumber of frames to process.
fade_to_multiplierMultiplier to fade to (0 to fade to silence.)

◆ make_mono()

void zrythm::utils::float_ranges::make_mono ( float * l,
float * r,
size_t size,
bool equal_power,
bool optimize = true )

Makes the two signals mono.

Parameters
equal_powerTrue for equal power, false for equal amplitude.
Note
Equal amplitude is more suitable for mono compatibility checking. For reference:
  • equal power sum = (L+R) * 0.7079 (-3dB)
  • equal amplitude sum = (L+R) /2 (-6.02dB)