Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

VLC and MIDI (SMF) file usage Apps
VLC has only limited support for MIDI-files due to several restrictions.

VLC is supporting MIDI to a degree on Linux and Windows by means of FluidSynth. However, on Mac OS X builds of VLC, the FluidSynth-Plugin is neither supplied nor built, rendering the How to inapplicable.

Fortunately, the plugin is part of the VLC source tree and can be built easily. You'll need to have the Developer Tools installed to do the software build.

The following shell script will take care of:
  • Downloading the current (1.1.5) VLC source.
  • Extracting and building the fluidsynth plugin.
  • Moving the Plugin to the App's Plugin folder.
  • Downloading and activating the GeneralUser GS soundfont.
Execute the script in a temporary folder. Note that it will leave behind the downloaded and extracted files as well as the files of the build process. You'll have to remove them manually.

You need to have installed:
  • fluidsynth (by means of Homebrew, MacPorts, Fink, sources, etc.)
  • pkg-config, to "find" the fluidsynth installation. (sources as above)
The script is named generateFluidSynthPluginVLC.sh.
#!/bin/sh

APP=/Applications/VLC.app
VER=1.1.5
VLC=vlc-$VER
MIDI=$VLC-midi


echo 'Fetching sources.'
curl -s -S -O http://kent.dl.sourceforge.net/project/vlc/$VER/$VLC.tar.bz2
tar xjf $VLC.tar.bz2

mkdir -p $MIDI
cd $MIDI

echo 'Preparing plugin.'
cat >config.h <Makefile </dev/null
make install >/dev/null

echo 'Fetching soundfont.'
curl -s -S -O http://www.schristiancollins.com/soundfonts/GeneralUser_GS_1.43-FluidSynth.zip
unzip -p GeneralUser_GS_1.43-FluidSynth.zip 'GeneralUser GS 1.43 FluidSynth/GeneralUser GS FluidSynth v1.43.sf2' >$APP/Contents/Resources/'GeneralUser GS FluidSynth v1.43.sf2'

echo 'Activating soundfort'
cat >>~/Library/Preferences/org.videolan.vlc/vlcrc <


[crarko adds: I haven't tested this one. The script is mirrored here.]
    •    
  • Currently 5.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[14,144 views]  

VLC and MIDI (SMF) file usage | 3 comments | Create New Account
Click here to return to the 'VLC and MIDI (SMF) file usage' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
VLC and MIDI (SMF) file usage
Authored by: asmeurer on Nov 17, '10 08:27:11AM

The "several restrictions" pages don't really explain why there is so little support. Does MIDI have a licensing issue?



[ Reply to This | # ]
VLC and MIDI (SMF) file usage
Authored by: marksch on Nov 17, '10 02:46:19PM

Perhaps there is simply no need for another midi plugin, as midi is supported by QuickTime.

---
Mark

Economy-x-Talk
Have your own custom software created
http://economy-x-talk.com



[ Reply to This | # ]
VLC and MIDI (SMF) file usage
Authored by: RMo on Nov 19, '10 09:05:09AM

I can't view the links either (timeouts?), but, as I recall, there are a few reasons:

  • As you know, MIDI files do not actually contain any sound information; they are instructions for how to play sounds (a collection of "events," like what type of sound to play, the pitch, length, volume, tempo, etc).
  • VLC needs a synthesizer that can take the MIDI instructions and "play" them.
  • Most good sound cards have a built-in synthesizer, but something about the way VLC is written (probably because it's primarily designed to give the sound card WAV-ish to play) prevents it from easily accessing these capabilities. Some cheap sound cards might not even have one, although I'd imagine the drivers would at least fake a software solution. I really don't know, but this probably isn't the case on a Mac, anyway.
  • FluidSynth is an OSS synthesizer, and it's license is apparently GPL/VLC-compatible. However, it is a software synthesizer and needs "soundfonts" to actually produce sounds.
  • It is questionable whether there are decent soundfonts that are GPL-compatible.

In short, VLC needs a software synthesizer, but the biggest problem seems to be licensing issues for including it pre-bundled.



[ Reply to This | # ]