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

◆ detect_onsets_per_channel()

MAYAFLUX_API std::vector< std::vector< double > > MayaFlux::detect_onsets_per_channel ( const std::vector< Kakshya::DataVariant > &  channels,
double  sample_rate = 48000.0,
double  threshold = 0.1 
)

Detect onset times per channel for multi-channel signal.

Parameters
channelsVector of channel data
sample_rateSample rate for time calculation (default: 48000 Hz)
thresholdEnergy threshold for onset detection (default: 0.1)
Returns
Vector of onset times for each channel

Definition at line 503 of file Yantra.cpp.

504{
505 std::vector<std::vector<double>> all_onsets;
506 all_onsets.reserve(channels.size());
507
508 for (const auto& channel : channels)
509 all_onsets.push_back(detect_onsets(channel, sample_rate, threshold));
510 return all_onsets;
511}
uint32_t channel
std::vector< double > detect_onsets(const std::vector< double > &data, double sample_rate, double threshold)
Detect onset times in single-channel signal.
Definition Yantra.cpp:476

References channel, and detect_onsets().

+ Here is the call graph for this function: