MayaFlux 0.3.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 585 of file Yantra.cpp.

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

References apply_gain_channels(), and peak().

+ Here is the call graph for this function: