Wednesday, March 19, 2008

How to play karaoke files (*.kar, *.mid) in linux

I Love sing and i love computers,The good thing is there are karaoke files for pc. before, i usually use karaoke file in windows but i was happy that i found one for linux ^_^.

if youre the same as me these are the steps to follow:

Step 1:
Use Synaptic/Smart (or any package manager you have) and install: TiMidity++, timidity-patch-freepats, kdemultimedia-kmid

Step 2:
open a shell and become root by entering "su -" (without the quotes) and providing your root-password. Now in the root-shell do:
a) enter the command: modprobe snd-seq
b) use your favorite text editor and create a file called "MidWrapper" (without the quotes) and insert the following two lines:
#!/bin/sh
timidity -iA -Os
c) save and close the file, make it executable and move it to the right location:
chmod 755 MidWrapper & mv MidWrapper /usr/bin/
d) start it: /usr/bin/MidWrapper &

Step 3:
exit as root-user by pressing Ctrl-D. Now as normal user, use your favorite text editor and
a) create a file called "MidStart" (without the quotes) and insert the following two lines:
#!/bin/sh
MidWrapper &
b) save and close the file, make it executable and move it to the right location:
chmod u+x MidStart & mv MidStart ~/.kde/Autostart/
c) create a file called "MidExit" (without the quotes) and insert the following two lines:
#!/bin/sh
killall timidity &
d) save and close the file, make it executable and move it to the right location:
chmod u+x MidExit & mv MidExit ~/.kde/shutdown/

Step 4:
start kmid and verify that in "Settings - MIDI Setup..." you select e.g. "TiMidity TiMidity port 0 - ALSA device" (or another TiMidity port) instead of the default "Midi Through Midi Through Port-0 - ALSA device".


kmid is now functional and you can now play your .kar file by a double-click with the mouse or by entering the following command in the shell: kmid &
Note that the MidStart and MidExit needs to be copied into the home directory of each user who wants to use kmid.

Thanks to: Pinoc & Maik353 for showing me how to do it ^_^