User guide5 min read

NCN Cursor File Specification (.cur) & Cursor-to-Tick Math

Binary structure of NCN .cur cursor files, 16-bit little-endian integer parsing, 24 PPQ reference scaling, and cursorToTick conversion mathematical formulas.

1. NCN Binary Cursor Track Specification (.cur)

The .cur (Cursor) file contains timing points for highlighting lyrics in NCN karaoke songs. Unlike text files, .cur is a raw binary file storing 16-bit unsigned integers representing compressed timing values based on a 24 PPQ (Pulses Per Quarter Note) reference standard.

2. Binary Decoding Algorithm

The parser iterates through the DataView array buffer 2 bytes at a time in Little-Endian byte order:

Binary Reading Formula & End-of-File Marker

3. Cursor to MIDI Tick Conversion Math

Because .cur values are scaled to a fixed 24 PPQ base, they must be converted to match the actual MIDI file's Division rate (ticksPerBeat / PPQ, such as 480 or 960 PPQ) using the following formula:

Cursor-to-Tick Mathematical Formula

Cursor-to-Tick Mathematical Formula

terminal
realTick = Math.round((cursorValue * ticksPerBeat) / 24)

4. Lyric Character to Timeline Mapping

After converting all cursor values into realTick numbers, the system maps each character from the .lyr text file 1-to-1 against the realTick array. As audio playback progresses, the WebGL/Canvas renderer highlights each character precisely as the current MIDI playback tick reaches its assigned realTick value.