SonixParser

Parser for pitch, notes, and transcription data files.

Music education apps store reference data in three formats:

  • .pitchPP — whitespace-separated time_seconds pitch_hz per line

  • .notes — tab-separated start end frequency label per 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)

Swift

let pitchData = SonixParser.parsePitchString(content: fileContent)
let transData = SonixParser.parseTransString(content: jsonContent)
let notesData = SonixParser.parseNotesString(content: tsvContent)

See also

Parsed pitch contour data

Parsed note transcription data

Parsed JSON transcription data

Uses parsed data for evaluation

Functions

Link copied to clipboard

Parse HPCP chroma frames from binary HPCP chroma bytes.

Link copied to clipboard

Parse notes data from a string (.notes format).

Link copied to clipboard

Parse pitch data from a string (.pitchPP format).

Link copied to clipboard

Parse transcription data from a string (.trans JSON format).