Segment
data class Segment(val index: Int, val startSeconds: Float, val endSeconds: Float, val lyrics: String = "", val studentStartSeconds: Float? = null, val studentEndSeconds: Float? = null)
A segment of a song or exercise with timing and optional lyrics.
Supports both singalong (student sings with reference) and singafter (student sings after reference) modes via optional student timing fields.
Constructors
Properties
Link copied to clipboard
Duration of the segment in seconds
Link copied to clipboard
Effective student end time (falls back to segment end for singalong)
Link copied to clipboard
Effective student start time (falls back to segment start for singalong)
Link copied to clipboard
Reference audio end time in seconds
Link copied to clipboard
Zero-based index of the segment
Link copied to clipboard
True if this is a singafter segment (student starts after reference)
Link copied to clipboard
Reference audio start time in seconds
Link copied to clipboard
Duration of the student recording portion in seconds
Link copied to clipboard
When student recording ends (null = same as endSeconds)
Link copied to clipboard
When student recording starts (null = same as startSeconds)