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

◆ estimate_pitch() [1/2]

MAYAFLUX_API double MayaFlux::estimate_pitch ( const Kakshya::DataVariant data,
double  sample_rate,
double  min_freq,
double  max_freq 
)

Definition at line 740 of file Yantra.cpp.

741{
742 auto a = std::make_shared<Yantra::StandardEnergyAnalyzer>();
743 a->set_energy_method(Yantra::EnergyMethod::HARMONIC);
744 a->set_parameter("sample_rate", sample_rate);
745 a->set_parameter("min_freq", min_freq);
746 a->set_parameter("max_freq", max_freq);
747 auto result = a->analyze_energy({ data });
748 return result.channels.empty() ? 0.0 : result.channels[0].mean_energy * sample_rate / 1000.0;
749}
size_t a

References a, and MayaFlux::Yantra::HARMONIC.