**DEPRECATED:** Use the R6 interface instead: `formant$get_value_at_time()`
Arguments
- formant
A legacy
praat_formant-shaped list: a plain list with avalueselement (a data.frame with columnstime,formant_number,frequency,bandwidth) and aclassattribute of"praat_formant".extract_formants()no longer produces this (it now returns an R6Formantobject instead — see itsextract_formantsdocumentation); build one by hand for this legacy function, or useformant$get_value_at_time()on an R6Formantobject directly instead of this deprecated wrapper.- formant_number
Which formant (1 = F1, 2 = F2, etc.)
- time
Time in seconds
- interpolate
Logical; if TRUE, interpolate between frames
Examples
# A praat_formant-shaped list (see the @param formant description
# above); built directly here for a self-contained example.
formant <- structure(
list(
values = data.frame(
time = c(0.1, 0.1, 0.2, 0.2),
formant_number = c(1, 2, 1, 2),
frequency = c(500, 1500, 520, 1480),
bandwidth = c(80, 120, 85, 110)
),
n_frames = 2,
n_formants = 2
),
class = "praat_formant"
)
get_formant_at_time(formant, formant_number = 1, time = 0.15)
#> Warning: get_formant_at_time() is deprecated and will be removed in v6.0.0. Use the R6 interface: formant$get_value_at_time(formant_number, time)
#> [1] 500