@karaplay/karaoke-demo
v1.0.0
Published
Demo application using @karaplay/karaoke-player library
Downloads
3
Readme
@karaplay/karaoke-demo
Demo application showcasing the usage of @karaplay/karaoke-player library.
Installation
npm installUsage
npm startThen open http://localhost:3000 in your browser.
Features
This demo shows how to:
- Initialize MIDI player
- Parse lyrics and CUR timestamps
- Render karaoke with A/B swapping
- Use calibration UI
Requirements
- Node.js 18+
- WebAudioTinySynth (loaded via CDN)
Project Structure
karaoke-demo/
├── src/
│ └── app.js # Main application logic
├── public/
│ └── index.html # HTML page
├── server.mjs # Simple HTTP server
└── package.json # DependenciesUsing the Library
import {
initMidiPlayer,
parseLyrics,
parseCurTimestamps,
normalizeTimestamps,
getCurrentCharByTime,
renderABSwap,
computeBaseMs,
safeGetStatus,
playMidi,
pauseMidi,
stopMidi,
setSongDuration,
injectCalibrationUI,
getLyricSpeed,
getTimeOffsetMs
} from '@karaplay/karaoke-player';License
MIT
