Sonix Parser
object SonixParser
Parser for pitch, notes, and transcription data files.
Music education apps store reference data in three formats:
.pitchPP — whitespace-separated
time_seconds pitch_hzper line.notes — tab-separated
start end frequency labelper line.trans — JSON array of segment objects with timing and lyrics
All parsers accept a String (file content) and return a typed result or null if parsing fails.
Quick Start
Kotlin
val pitchData = SonixParser.parsePitchString(fileContent)
val transData = SonixParser.parseTransString(jsonContent)
val notesData = SonixParser.parseNotesString(tsvContent)Content copied to clipboard
Swift
let pitchData = SonixParser.parsePitchString(content: fileContent)
let transData = SonixParser.parseTransString(content: jsonContent)
let notesData = SonixParser.parseNotesString(content: tsvContent)Content copied to clipboard
See also
Parsed pitch contour data
Parsed note transcription data
Parsed JSON transcription data
Uses parsed data for evaluation