Translate

Sunday 16 June 2013

How to create create karaoke videos in Linux from midi files created in the nted score editor

The pykaraoke utility can be used to generate karaoke videos in Linux from original midi files created using the nted score editor. Other score editors in Linux that I have tested do not appear to work (Denemo, Musescore, Rosegarden) as they don't produce a midi file with lyrics in a form which can be  processed by pykaraoke. Another solution is to use Noteworthy composer under wine. Noteworthy is an excellent score editor with a very user-friendly interface although not open source. Noteworthy produces tidier output because hyphens used to separate syllables in the lyrics do not show in the final video. In Noteworthy, midi files must be created a type 0 (there is a pick list in the midi export dialog). nted is a good solution for Linux. It has more advanced functionality in some areas than Noteworthy.


First create a midi file with lyrics using nted as explained in the documentation. Make sure the midi score  doesn't start with rests as this causes music/video synchronisation issues. Export the nted score you have created in midi format.

Download and unpack this script into your folder which contains the pykaraoke scripts and make the script executable. Run the script with the first argument as the midi file and the second argument as the soundfont e.g.:

karaoke /midi_files/my_midi_file.mid /my_soundfonts/soundfont.SF2

The script produces a standard video in mp4 format. You can also run the nted midi file directly using a progam such as kmid but the music won't be synchronised accurately with the lyrics in my experience and the output is not so easily shared as an mp4 video.  

The script assumes:

  • python 2, mjpegtools, mplayer, ffmpeg and fluidsynth are installed
  • you are running the script from the same folder into which you have downloaded the pykaraoke scripts (pykaraoke also has its own dependencies)
  • a soundfont is available on your system (such as FluidR3_GM.sf2)  

Any further information needed, please leave a comment.
Alert icon

No comments:

Post a Comment