ToneAnalysis
Measures how much of one frequency a block of decoded audio carries.
A mix test needs to say which source a level belongs to, and two sources at different frequencies are told apart here by their own frequency, where peak amplitude only reports the sum. The measurement is one Goertzel recurrence for the one frequency wanted, a single pass with three accumulators.
Every backend's export test shares this, so four measurements of one fade cannot disagree about what they measured.
Properties
Functions
Link copied to clipboard
The amplitude of frequencyHz in samples, on the same scale the samples are.
Link copied to clipboard
fun amplitudeOver(samples: FloatArray, from: Int, length: Int, frequencyHz: Int, sampleRate: Int): Float
The amplitude of frequencyHz over the length samples starting at from.
Link copied to clipboard
Interleaved channels samples reduced to mono by averaging.