MayaFlux 0.1.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 583 of file Yantra.cpp.

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

References apply_gain_channels(), and peak().

+ Here is the call graph for this function: