find Segments
fun findSegments(pitchesHz: FloatArray, mask: BooleanArray, minGapMs: Float = 0.0f, hopMs: Int = 10): List<IntRange>
Find contiguous segments where a mask is true.
Return
List of IntRange representing segment bounds (inclusive)
Parameters
pitches Hz
Pitch values in Hz (-1 for unvoiced)
mask
Criteria mask
min Gap Ms
Minimum gap between segments to keep separate
hop Ms
Hop size between frames in milliseconds