Tuesday, December 22, 2009

MIDI on Linux is not easy

I've put a little tutorial in the KDE userbase wiki about MIDI on Linux because Linux users have very little help setting up their systems for MIDI usage.

First, I would like to apologize for a joke, that was not my original idea. I've found it at the renaissance music web site of Alain Naigeon. He says that MP3 is like fast food, WAV is tasting the meal, and MIDI is cooking the recipe. He also says that playing a MIDI file is not reproducing a performance, it's a new performance. I agree, but on the other hand each MIDI file is a recording of a musical performance. Even more than a MP3 or a CD, because it contains no sound, only the musician actions. For instance, the folks at the Minnesota International Piano e-Competition distribute MIDI files of the competitors' performances, recorded in Yamaha Disklavier concert grand pianos, as standard MIDI files. And you can play these files in KMid2. Try this one: Igor Stravinsky's, Petrouchka played by Alessandro Taverna, first prize winner of this year's contest.

Returning to the subject. I would like to show you a screenshot of the about dialog from the software synth included (and ready to be used out of the box) in all MS Windows operating systems:



The Roland Sound Canvas samples are also included in Mac OSX. In both cases it is a small sound font  file in DLS format. It is not the full and great Roland Virtual Sound Canvas, but a light version. Anyway, the point is that both software manufacturers provide resources to the users wanting MIDI support out of the box. If you download and install VMPK in any Windows version, you can start playing and getting sound at once without having to configure anything at all, and without reading a single word of system documentation.

What is the situation on Linux? There are MIDI applications. There are many operating system MIDI drivers (ALSA). Some software synths and free SoundFonts are also available. What is missing? Distributions gathering all the required pieces, putting them together and easing the task of setting up Linux for MIDI usage out of the box. It is their job, after all.

9 comments:

  1. How do you suggest doing that? I am part of the multimedia team in Debian, and always wanted things to work out of the box, but I do not have that much midi experience with Linux, and I don't think starting a timidity server for each user is practical...

    ReplyDelete
  2. A big question to answer in a single comment, Felipe. As a starting point: I think that a MIDI synth would be preferred as a session service, optional per user, instead of a system wide service. A system wide service is currently provided by the Debian package timidity-daemon.

    ReplyDelete
  3. Actually you are only half-right :)
    What you are right about is that there is very little help available in terms of MIDI on Linux, but once you know how - it's as easy at 1-2-3
    More over, according to my experience, setting up MIDI under Linux is much easier then under Windows Vista, or 7 (where MS decided to remove MIDI support).
    All you really need are:
    1. fluidsynth - available prepackaged for all major distros
    2. soundfont - many distros do package fluidsynth's default soundfont, called "fluid" which sounds significantly better then MS's GM table.
    3. qsynth - a qt4 based frontend to control fluid.
    That's all :) Once all is installed, simply type "qsynth" into Kickoff search field and start it up. From there on you have a full MIDI support available to each and every app (including Wine based) that requires it :)
    I myself am a big MIDI fan, and have a huge collection of karaoke. That's how I know about all this.
    Hope this helps.
    Regards,
    it-s

    ReplyDelete
  4. I'm terribly sorry about my previous post, but it seems I have made a mistake there :/ 'Fluid' is not packaged with Fluidsynth, nor has anything to do with the later. But it's avalable under Ubuntu "fluid-soundfont-gs", or from here http://soundfonts.homemusician.net/
    It's quite large, but fluidsynth handles it quite well, and it produces amazing sound.
    Regards,
    it-s

    ReplyDelete
  5. But how easy is it to set up external MIDI devices as playback? For example, I've got a pile of hardware synthesizers next to my desk. How do I configure things to play through one of those instead of via fluid/timidity/... ?

    ReplyDelete
  6. @it-s: You have not bothered to look at the linked tutorial. And that's the problem: How is it supposed that a new user knows the names of all those packages you need to install? Not to mention the soundfont. FluidR3 weighs no less than 140 megabytes! And it is the only SF2 packaged in Debian and Ubuntu! Users of SB Live! or Audigy cards can't load it. Indeed, the package "awesfx" in Debian does not include the scripts and udev rules to load automatically SF2 files at startup, and the packaged version is old. FluidSynth just released a new version 1.1.1 a few days ago, let's see how much time takes to be accepted. The last published version of TiMidity++ is five years old. QSynth is labeled as an "orphan" package, which can not be good ...

    ReplyDelete
  7. @ocularsinister: it is pretty easy, it is mentioned in the linked tutorial. I use several USB MIDI interfaces, well supported by ALSA. Edirol um-1 is prized under $60, and M-Audio midisport uno is around $40. Those small adapters are ideal for laptops, but there are also bigger devices with 2,3,4 MIDI ports. ALSA module for all of them is snd-usb-audio, and it is auto-loaded when the interface is plugged in.

    ReplyDelete
  8. @Pedro Thanks for posting this. I've got those M-Audio midisport uno devices, and they're indeed recognized without any hassle (Debian Sid here). I am only looking for a good OSS sequencer that handles both MIDI and audio recordings properly.
    I've often run into issues with several programs (crashes, problems with multi-track recording, ..). If anyone has good experience in that, that's always welcome info!
    Best regards
    Chris.

    ReplyDelete
  9. The way you have written the blog was interesting. It was just the quality based blog among the all bloggers. With great content and awesome winding of words all I can say it was a good blog.

    thanks
    Vocal removal software

    ReplyDelete