lunes, 23 de julio de 2012

The Quest of Getting Midi and Karaoke to Work in Mandriva 2010.2 and Mageia 2

There are times in which a seemingly simple task becomes a challenge.  For me, this happened when I was called to substitute a Japanese teacher and wanted to use a .kar file in the class to practice.

To solve this problem, I resorted to several programs: Pykaraoke, Timidity, VLC, Audacious, and Kmid2.  Here is the story.

Chapter 1.  The adventure of enabling midis/.kar files in a Mandriva 2010.2 PowerPack Desktop PC and a Mandriva ONE 2010.2 netbook


When I realized that I was not ready to play .kar files (nor any midi), I checked Megatotoro's entry here on how he had done it in Mepis.  The process seemed pretty straighforward, so I started by downloading Pykaraoke.  However, it would not run.  Pykaraoke was not my winning card. 

Then I remembered that Timidity was not installed, so I grabbed it from the Mandriva repos.  To my despair, although the installation was successful, Timidity simply refused to launch.

In my search for answers, I saw several plugins for midi in VLC and Audacious.  I gave those programs a try, too.  Concerning the latter, I installed first:
fluidsynth, fluid-soundfont-gm, audacious-fluidsynth, and whatever dependency that the system required.

Audacious playing a midi
With everything in place, I  ran Audacious and hit CTRL+P for the preferences dialog.  I navigated to "PLUGINS" and selected the tab "input".   There, I selected AMIDI-PLUG and clicked on the "preferences" button at the bottom.  Then I selected "Fluidsynth backend" for the AMIDI plugin and clicked on the Fluidsynth button next.  there, I used the add button to go to /usr/share/soundfonts and select the 2FluidR3_GM.sf2 file.  With that, Audacious started to play the midi sound, but no lyrics could be displayed yet.



The next candidate was VLC, which stubbornly gave me a warning that MIDI playback was not supported and that "there was no way to fix the problem", a pretty discouraging message that I chose to ignore because I had seen a plugin to that purpose in the PLF repositories (vlc-plugin-fluidsynth). So, I installed it, ran VLC and clicked on the Tools menu and went to "Preferences".  That gave me a window.  To the left, I saw the "INPUT AND CODECS" button.  However, before I clicked on it, I went down and selected "ALL" for the adjustments.   That converted the panel to the left in a tree-like structure with more options.  I selected "INPUT/CODECS", audio codecs, Fluidsynth and wrote the following path in the panel:   /usr/share/soundfonts/FluidR3_GM.sf2.  That enabled midi playback with VLS alright, but still no lyrcs were displayed.

Then I installed Kmid2 and all its dependencies.  When I ran it, I went to the Preferences menu and then "Configure Kmid".  When I clicked the button "synthetizers" and then went to the Timidity tab, I finally discovered what the problem with Timidity was: Kmid2 reported a missing timidity.cfg file in /etc/timidity/

My Mandriva PowerPack 2012.2 PC running Kmid
The reason why the file was not there eluded me, but I installed Timidity on the netbook from the repos and the program launched perfectly: the .kar file started to play and displayed the lyrics.  That took care of my work situation, but I wanted the Desktop PC to do the same.  So, in the netbook, I went to /etc/timidity/, snatched the timidity.cfg file, and dropped it to the same directory in the desktop PC.  That got Timidity running at last and Kmid2 could also play and display the lyrics in the desktop PC. 
 
Chapter 2.  Getting the Elusive Kmid to Cooperate in a Mageia 2 laptop

With all this learning, I turned on my Mageia 2 laptop and tried to install Kmid2.  At first, I did not find it in the repositories, so I enabled all the repositories I could and tried again.  The Mageia control center displayed it, so I selected it with all the dependencies (fluidsynth and its own).  After the installation, I started Kmid2 but it failed to lauch, reporting that the machine could not play midis or that snd_seq was missing in the modules (something about permission denied).  As the latter problem sounded unsurmountable to a non-technical user like me, I decided to rule out the former first.  Thus, I repeated the steps to enable midi playback in VLC and Audacious and, to my relief, both programs played the sound of the.kar file.

Without a lot of confidence in my ability to fix the missing module problem, I searched the Web and found that this had been reported as bug 5892 in Mageia.  According to the report, a user had solved the problem by going to /etc/module and simply adding the line
snd_seq

Although I followed the path, I saw no file called module, so I got the most similar one (/etc/modules.load.d) and edited the file modules.conf with Kwrite, adding the line to it.  That got Kmid2 to work in Mageia 2 as well.

I hope this experience helps those with some karaoke woes in Mageia and Mandriva.

1 comentario:

  1. Congratulations! That was a pretty good learning experience, wasn't it?

    I installed Kmid in Mepis 8 but unfortunately, it won't play sound.

    Mepis 11 doesn't seem to have Kmid...so I'll stick with Pykaraoke for the time being.

    ResponderEliminar