Calculate F0 Statistic in Single Call (Tier 4 Ultra)
Source:R/batch-queries.R
calculate_f0_stats_ultra.RdPerforms pitch extraction AND statistic calculation entirely in C++, avoiding intermediate R6 object creation and the separate `to_pitch_cc()` and `get_maximum()` calls.
This is a **Tier 4 "Ultra"** function for batch DSI (Dysphonia Severity Index) calculations where maximum F0 is the FH (Highest Frequency) component.
Usage
calculate_f0_stats_ultra(
sound,
stat,
min_pitch = 75,
max_pitch = 600,
time_step = 0,
voicing_threshold = 0.45
)API Tier
This is a **Tier 4 "Ultra"** function. The entire pitch extraction and statistic computation happens in C++ with no intermediate R6 objects.
Algorithm choice
Pitch is always extracted with `Sound_to_Pitch_rawCc()`, `veryAccurate = TRUE`, `silenceThreshold = 0.03` (matching DSI201.praat's `To Pitch (cc)...` step). Only `voicing_threshold` is configurable; the AC/CC choice and `veryAccurate` are not. See the Tier 4 Ultra algorithm table in `inst/agents/AGENT_GUIDE.md` for how this compares to the other Ultra functions.