SonixParser

Parser for pitch, notes, and transcription data files.

These files are used in music education apps to store:

  • Pitch contours (.pitchPP) - time-pitch pairs

  • Note transcriptions (.notes) - tab-separated start, end, frequency, label

  • JSON transcriptions (.trans) - JSON format with segments and notes

Usage

// Parse a pitch file
val pitchData = SonixParser.parsePitchString(fileContent)
if (pitchData != null) {
for (i in 0 until pitchData.count) {
println("Time: ${pitchData.times[i]}, Pitch: ${pitchData.pitchesHz[i]}")
}
}

// Parse a notes file (.notes format)
val notesData = SonixParser.parseNotesString(fileContent)

// Parse a trans file (.trans JSON format)
val transData = SonixParser.parseTransString(fileContent)

Functions

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).