Java has no library support for karaoke. That is too application specific. In this chapter, I give you code for a karaoke player that can play KAR files. The player will show two lines of the lyrics to be played, with words already played being highlighted in red. Along the top, it shows a simple piano keyboard with the notes that are played in channel 1 of the MIDI file. In the middle, it shows the melody line, with a vertical line in the middle to show the currently playing note.
The player looks like Figure 25-1.
Figure 25-1. User interface of karaoke player
Figure 25-2 ...