/** * Type definitions for KAR Player */ export interface KarFileLyricLine { time: number; text: string; track: number; parts?: KarFileLyricPart[]; } export interface KarFileLyricPart { time: number; text: string; } export interface KarFileMidiData { format: number; trackCount: number; timeDivision: number; ticksPerBeat?: number; frames?: number; ticksPerFrame?: number; } export interface MIDISong { duration: number; tracks: MIDITrack[]; beats: MIDIBeat[]; } export interface MIDITrack { notes: MIDINote[]; program: number; volume: number; } export interface MIDINote { when: number; duration: number; pitch: number; slides?: any[]; } export interface MIDIBeat { notes: MIDIBeatNote[]; n: number; volume: number; } export interface MIDIBeatNote { when: number; } export interface LyricLine { time: number; text: string; track: number; parts: LyricPart[]; } export interface LyricPart { time: number; text: string; } export interface KaraokePlayerConfig { /** AudioContext instance (optional, will create if not provided) */ audioContext?: AudioContext; /** * SpessaSynth processor (AudioWorklet) URL * Required for SpessaSynth to work * Example: '/spessasynth_processor.min.js' * Can be set via environment variable in your app */ processorUrl: string; /** * SoundFont file URL or ArrayBuffer * If string URL is provided, the library will fetch it * Example: '/assets/sounds/GeneralUserGS.sf3' * Can be set via environment variable in your app */ soundFont?: string | ArrayBuffer; /** SoundFont bank name (default: 'main') */ soundBankName?: string; /** Enable debug logging */ debug?: boolean; } export interface KaraokePlayerState { isPlaying: boolean; currentTime: number; duration: number; volume: number; } export interface LoadKarFileResult { lyrics: KarFileLyricLine[]; title?: string; artist?: string; } export type { LyricDisplayMode, LyricHighlightMode, LinePosition, LyricDisplayOptions, HighlightedLine, LyricHighlightState, LyricTheme, LyricRenderOptions } from './components';