Frequency Analyzer

Frequency Analyzer operator properties for Script Engine. Verifies that the incoming audio is a clean sine wave at a specific target frequency, without changing the audio. Useful as an automated test signal verifier — for example confirming that a 1 kHz reference tone is making it through the audio chain at the right frequency, with the right shape, and at a sufficient level. Reports the measured frequency, a match flag, and a consistency percentage.

Property Type Access Description
Frequency int get/set Target frequency to verify, in Hz. [min=50, max=5000, default=1000]. 1000 Hz is the standard EBU/SMPTE reference tone. Set to whatever pitch your test signal is supposed to have.
FrequencyTolerance int get/set How many Hz the measured frequency may deviate from Frequency and still count as a match. [min=1, max=100, default=20]. Tighter tolerances catch small drift but can flag a perfectly good source if its frequency isn't perfectly stable.
ShapeTolerance float get/set Strictness of the sine-wave shape check. [min=0.1, max=20, default=0.1]. Lower values demand a near-perfect sine; higher values accept some distortion. Use stricter values when verifying a clean test tone.
MinAmplitudeDb float get/set Lowest signal level that counts as a real signal, in decibels. [min=-36, max=0, default=-12]. Audio quieter than this is treated as silence or background noise and ignored. Stops the analyzer from reporting a "sine wave" detection on a near-silent input.
AnalysisWindowSeconds int get/set Time window over which consistency and average frequency are calculated, in seconds. [min=1, max=60, default=1]. Shorter windows respond faster to changes in the input; longer windows give a more stable consistency reading at the cost of slower reaction.
ActualFrequency int get Average frequency detected on the input, in Hz (read-only). Averaged over AnalysisWindowSeconds. Compare against Frequency to see how close the input is to the target.
IsMatch bool get True when the input matches the target frequency, shape, and level (read-only). Useful from a script to react to verification — for example, log an alert when the expected tone disappears or fails to meet quality.
ConsistencyPercentage int get Percentage of the analysis window that matched the target, 0–100 (read-only). 100 means every measurement in the window was a match; lower values indicate the signal drifted in and out of spec during the window.
SeamPhaseToleranceDegrees int get/set The largest phase step, in degrees, that is not counted as a seam. [min=1, max=90, default=10]. At 1 kHz one sample is 7.5°, so the default catches a splice of two samples or more. A splice of a whole number of cycles leaves the phase unchanged and cannot be seen. Set it above WorstPhaseStepDegrees on a known-clean path.
SeamLevelToleranceDb float get/set The largest level drop, in dB below the recent level, that is not counted as a seam. [min=1, max=20, default=3]. Catches gaps and dropouts. Judged against the tone's own recent level, so the gain it arrives at does not matter. At 3 dB, a gap shorter than about 3 ms is not seen.
SeamCount int get Seams found since the last clear (read-only). Meaningful only alongside ContinuityJudgedPercent: a meter that could judge nothing also finds nothing.
ContinuityJudgedPercent int get Share of the audio since the last clear that was actually checked, 0–100 (read-only). Silence, a tone below MinAmplitudeDb and the first 30 ms after a tone starts are not judged.
ContinuitySecondsObserved float get Seconds of audio seen since the last clear (read-only).
WorstPhaseStepDegrees float get The largest phase step seen since the last clear, seam or not, in degrees (read-only). On a clean path this is the noise floor, which is what SeamPhaseToleranceDegrees should sit above.
SeamLog string get The most recent seams, oldest first, as sample:kind:magnitude separated by ; (read-only). sample counts from the last clear, like ContinuitySecondsObserved; kind is Phase (magnitude in degrees) or Level (magnitude in dB). Keeps the last 64.
ClearContinuityCommand Command get Start counting seams afresh. The tone's history is kept, so the next block is judged as usual.
ResetCommand Command get Reset all settings to their defaults (1000 Hz, ±20 Hz, strict shape, −12 dB minimum, 1 s window).

Inherits from: AbstractAudioOperator, AbstractOperator, AbstractAudioMetering, NamedModel.

See also: Frequency Analyzer in Operators — user-facing introduction, screenshots, and section summaries.