compare
fun compare(reference: BreathFunction, student: BreathFunction, config: BreathConfig = BreathConfig.DEFAULT): Float?
Compare two breath functions and return the alignment score alone.
Uses FFT cross-correlation alignment and peak matching.
Return
Match score in 0, 1, or null when alignment is not possible — either recording is shorter than BreathConfig.minAlignmentDuration, or the reference itself has no detectable breath peaks (so there's nothing to align against).
Parameters
reference
Reference breath function
student
Student breath function
config
Breath analysis configuration
fun compare(reference: PitchContour, student: PitchContour, config: BreathConfig = BreathConfig.DEFAULT): Float?
Compare two pitch contours' breath patterns (convenience).
Return
Match score in 0, 1, or null when alignment is not possible.
Parameters
reference
Reference pitch contour (must have at least 2 samples)
student
Student pitch contour (must have at least 2 samples)
config
Breath analysis configuration