Documentation Index
Fetch the complete documentation index at: https://mintlify.com/TextAliveJp/textalive-app-api/llms.txt
Use this file to discover all available pages before exploring further.
IChord extends TimedObject and represents a single chord (e.g., C, Am, G7) and the time span over which it sounds in the song. Chord data comes from Songle’s harmonic analysis and is available after onVideoReady via player.data.songMap.chords or the player.getChords() helper.
Use IChord to build chord display overlays, reactive backgrounds, or any visual that should respond to harmonic changes in the music.
IChord properties
TimedObject base
When this chord starts, in milliseconds.
When this chord ends, in milliseconds.
Chord-specific
Duration of this chord in milliseconds (
endTime - startTime). Read-only.The chord name string as identified by Songle’s harmonic analysis, e.g.
"C", "Am", "G7", "Bm7b5".Zero-indexed position of this chord in the full chord sequence for the song.
The chord immediately before this one.
null for the first chord.The chord immediately after this one.
null for the last chord.Methods
Maps the given playback position
time (in ms) to a [0, 1] value representing how far through this chord the song currently is.0.0— at the very start of this chord1.0— at the end of this chord
Current playback position in milliseconds.
Player query methods
getChords
startTime. Returns an empty array if no song map is loaded.
findChord
time in milliseconds. Returns null if not found.
Playback position in milliseconds.
Optional search parameters.
PlayerFindOptions is an alias for FindTimedObjectOptions:findChordChange
TimedObjectsInRange<IChord> describing which chords were entered, left, or are currently active.
Start of the time range in milliseconds.
End of the time range in milliseconds.
Example: displaying the current chord
Update a label to show the current chord name as the song plays:Example: changing background color based on chord
Map chord names to colors and animate a background transition:Iterating all chords
You can also walk the linked list viaprevious / next rather than using the array: