Get all common pitch statistics in a single call, bypassing R6 dispatch.
Usage
get_pitch_stats_direct(
pitch,
from_time = 0,
to_time = 0,
unit = c("hertz", "semitones", "mel", "erb", "loghertz")
)Examples
sound <- Sound$create_tone(frequency = 150, duration = 0.5, sampling_rate =
16000)
pitch <- sound$to_pitch_cc()
# Direct call
stats <- get_pitch_stats_direct(pitch)
# Equivalent R6 calls, one boundary crossing per statistic:
min_val <- pitch$get_minimum(0, 0, "hertz")
max_val <- pitch$get_maximum(0, 0, "hertz")