MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ normalize_together()

MAYAFLUX_API void MayaFlux::normalize_together ( std::vector< Kakshya::DataVariant > &  channels,
double  target_peak = 1.0 
)

Normalize multi-channel data relative to global peak (in-place)

Parameters
channelsVector of channel data (modified in-place)
target_peakTarget peak amplitude (default: 1.0)

Definition at line 581 of file Yantra.cpp.

582{
583 const double global_peak = peak(channels);
584 if (global_peak > 0.0)
585 apply_gain_channels(channels, target_peak / global_peak);
586}
void apply_gain_channels(std::vector< Kakshya::DataVariant > &channels, double gain_factor)
Apply gain to multi-channel data (in-place)
Definition Yantra.cpp:527
double peak(const std::vector< double > &data)
Find peak amplitude in single-channel data.
Definition Yantra.cpp:268

References apply_gain_channels(), and peak().

+ Here is the call graph for this function: