LyricsType
EnumTypes of granularity for lyric data.
- Available on all platforms
Since Lens Scripting v297
Types of granularity for lyric data. Accessible through Lyrics.type.
Index
Example
const externalMusicModule = require("LensStudio:ExternalMusicModule") as ExternalMusicModule;
@component
export class LyricsExample extends BaseScriptComponent {
// Make sure an AudioTrack asset is included in the scene. It determines the track that plays.
// If you see errors, make sure that "Bundled" is unchecked (disabled) on the AudioTrack.
@input audioAsset: AudioTrackAsset;
onAwake() {
const lyricsTracker = externalMusicModule.getLyricsTracker();
lyricsTracker.onLyricsAvailable.add(() => {
print("Is rich sync data available: " + (lyricsTracker.fullLyrics.type == LyricsType.RichSync));
});
}
}
Enumeration Members
LineSync
LineSync:
number
Lyrics data is only available for entire lines at a time. Each LyricsLine's syncs list will contain a single LyricsSync object, with its text property containing the entire line. This means that timing data is only available for entire lines of the song, and is not available for each individual word.
Since
Lens Scripting Version 297
RichSync
RichSync:
number
Lyrics data is available for each word and space between words. Each LyricsLine's syncs list will contain a LyricsSync object for each word and space between words in the line. This means that timing data is available for each word in the tracked music.
Since
Lens Scripting Version 297
Unset
Unset:
number
Type is not set.
Since
Lens Scripting Version 297