Enable MIDI playback in Web browsers for Mavericks and Mountain Lion

QuickTimeXIconXMIDI files are similar to digital sheet music, where notes on individual tracks are played with a selected instrument from a central sound library. This allows the relatively small MIDI file of only a few kilobytes to play anything from simple piano music, to full symphonic arrangements.

When Apple introduced QuickTime X in Mountain Lion, it unfortunately removed support for MIDI file playback. This limitation prevents these files from playing in the QuickTime Player; however, this also broke the ability to play or preview these files in the Finder and in Web browsers that use the QuickTime plugin.

QuickTIme MIDI error in Safar

Playing MIDI files in Safari will claim the content requires a missing plug-in.

While you can download QuickTime Players 7 or other media players and use them to play MIDI files locally on your computer (or open a URL that points to such files), this is less convenient than previewing the files directly.

Even though there are no direct fixes that will enable MIDI playback in QuickTime X, and subsequent associated programs like Finder and Safari, there is a way to at least get MIDI playback going again in your Web browsers. To do this, you will need a copy of the QuickTime plugin from a Snow Leopard or Lion system, and then modify its implementation to only handle the MIDI file types. This will allow QuickTime X to handle all the standard media files and formats, while the older plugin is used only for MIDI files.

These instructions were first provided by user “andyBall_uk” at the Apple Discussion forums:

1. Copy the “QuickTime Plugin.plugin” file from the Macintosh HD > Library > Internet Plug-Ins folder on a Snow Leopard or Lion machine, and place it into the username > Library > Internet Plug-Ins folder of your current Mac running Mountain Lion or Mavericks.

If you do not have access to another Mac, but do have an installer for Lion or Snow Leopard, then you can extract the QuickTime plugin using a package manager like Pacifist.

2. Open the Terminal and run the following commands to change the represented name of the plugin for programs that load it (copy and paste both or all three lines of each as-is from here into the Terminal):

defaults write ~/Library/Internet\ Plug-Ins/QuickTime\ Plugin.plugin/C\
ontents/Info.plist CFBundleName 'QuickTime Plugin.plugin2' 

defaults write ~/Library/Internet\ Plug-Ins/QuickTime\ Plugin.plugin/C\
ontents/Info.plist CFBundleIdentifier 'com.apple.QuickTime Plugin.plugin2' 

defaults write ~/Library/Internet\ Plug-Ins/QuickTime\ Plugin.plugin/C\
ontents/Info.plist WebPluginMIMETypesFilename com.apple.quicktime.plug\
in2.preferences.plist

3. Go to the username > Library > Preferences folder (use the Finder’s Go menu and hold the Option key to reveal the Library).

4. Duplicate the file com.apple.quicktime.plugin.preferences.plist and rename the duplicate to “com.apple.quicktime.plugin2.preferences.plist”

5. Open this new file in TextEdit

6. Locate the contents of the “WebPluginMIMETypes” dictionary, which is the listing of file types this plugin will be responsible for handling, and replace them with the following (copy and paste):

<key>audio/mid</key>
<dict>
     <key>WebPluginExtensions</key>
     <array>
          <string>mid</string>
          <string>midi</string>
          <string>smf</string>
          <string>kar</string>
     </array>
     <key>WebPluginTypeDescription</key>
     <string>MIDI</string>
     <key>WebPluginTypeEnabled</key>
     <true/>
</dict>
<key>audio/midi</key>
<dict>
     <key>WebPluginExtensions</key>
     <array>
          <string>mid</string>
          <string>midi</string>
          <string>smf</string>
          <string>kar</string>
     </array>
     <key>WebPluginTypeDescription</key>
     <string>MIDI</string>
     <key>WebPluginTypeEnabled</key>
     <true/>
</dict>

When done, the file should look something like the following (highlighted text is the replaced content):

Alternative QuickTime preferences

This new QuickTime plugin preferences file should only contain this text, so it will only be responsible for handling MIDI file types.

Now launch Safari and load a MIDI file from a Web site, or from your Mac. You will have to instruct Safari to trust the plug-in, but it should now load and play properly.

Note that this modification should not affect the handling of movies and images by QuickTime X, and should only route the handling of files of type MID, MIDI, SMF, or KAR, to the older QuickTime plugin. In addition, since the modified plugin is placed in your user library, this modification will only be available to your user account, and not to others on the system. To do so for other accounts, you will need to re-do these instructions while in those accounts.

To undo this modification, simply delete the modified QuickTime Plugin from your user library, and remove the “com.apple.quicktime.plugin2.preferences.plist” file from your preferences folder.

19 thoughts on “Enable MIDI playback in Web browsers for Mavericks and Mountain Lion

  1. xAirbusdriver

    I *think* there is an erer in your Terminal entry text. OTOH, I don’t have a Snow Leopard user Library to look at… All your Terminal input have the following:
    defaults write ~/Library/Internet\ Plug-Ins/QuickTime\ Plugin.plugin/C\
    ontents/Info.plist… and then slightly different code.

    The first two instances of “\ ” are used to insert a space so “Internet Plug-ins” and “QuickTime Plugins” will work. I’m not sure what is between “C\” and “ontents/”. I’m thinking this is simply the name of a directory (Contents) that will contain the “Info.plist” file?

    1. Topher Kessler Post author

      Backslashes are not only to escape spaces, but can do so for most other characters as well. The slash at the end of each line prior to the last one just escapes the carriage return, allowing the command (which is generally on a single line) to be issued in multiple lines. You can do this in the Terminal for any command. Just start typing it out and then type a backslash followed by Enter, and then continue typing the rest of the command.

      For instance, the following is the same as “ls ~/Library” to list the contents of the user library:

      Tophers-Laptop:~ tkessler$ l\
      > s\
      > ~/\
      > Libr\
      > ar\
      > y

      I only do this for commands that will extend beyond the bounds of the blog posting, where they may either be cut off or auto-wrapped to a new line. In this way, people can copy and paste the entire two or more lines of the command, and still get the same effect.

  2. xAirbusdriver

    I knew\
    that!\
    8+P

    Besides, “/\
    Contents/” would have been even more strange looking! Just one of the joys of displaying ‘code’ in different web apps (most forums have a “code” tag, WordPress probably not?). Since I didn’t actually paste the text into Terminal, the problem is on my end. (Again?!) Thanks for finding a way to get the code from WP into Terminal! :clap:

  3. Elijah

    Hi, I followed your instruction step by step, but trying to open a midi file on a website still get that notification (I need an Internet plugin). Have you mentioned all actions that should be performed? Is FORMATTING of the text that duplicated .plist file important because after I copy pasted the text you provided I got some slight changes?

    1. Topher Kessler Post author

      The formatting of the plist file will matter, so ensure it looks exactly like what is posted above. You should be able to copy and paste the content from above into a text editor program that you have the file opened with, and then simply save the file, and the formatting should be preserved properly.

  4. vozmusic

    it did not work until I did the next :

    I copied a QuickTime Plugin.plugin from Snow Leopard to the Home/Library/Internet Plug-Ins folder & renamed it QuickTime Plugin2.plugin.

    Ctrl-click on that ‘new’ file & choose ‘show package contents’… open the ‘Contents’ folder & edit the file ‘info.plist’ (Textedit works, but the file must not be saved as rich text).

    Change the keys : CFBundleName, CFBundleIdentifier and WebPluginMIMETypesFilename – adding ‘2’ after ‘plugin’ in each case. Save the file.

    1. Rudolph Zahlmann (@rudolphzahlmann)

      same for me, only worked after i followed your instructions – thanks for the tip!

  5. Jeremy Leffler

    HEEEEELLLLPPPP!

    I recognise the language this is written in as English, but I don’t understand a word of it.

    I just want to be able to listen to midi files in Safari now that I am on Mavericks 10.9.4. Nothing in the installation told me I would not be able to play midi files and I have no idea what this tech stuff means.

    I migrated from PC to Mac because “it just works” — but now I find that in this case, it just doesn’t. On PC you meddled with registries and the like at your peril and in my experience meddling meant instability and a computer that got shouted at.

    I was SOOO pleased to discover that Mac relieved me of that stress. 8 years later I am still faithful to this wonderful brand of computers and software. This will not send me back to PC. I’m not daft! I still use them from time to time and the stress involved is many orders of magnitude greater than with Mac.

    BUT

    Right now all the discussion threads on the apple forums are out of action — I managed to find the instructions posted by andyBall_uk once, then when they didn’t make sense and I signed in to post my request for a non-techie explanation, none of the pages were available.

    There are people who drive cars without knowing how anything works, people who have a fair idea what goes on under the bonnet but leave actual mechanics’ work to mechanics in case they do it wrong, and then there are mechanics who can do things to cars without making them go wrong.

    Now relate that to computers. I’ve always thought of myself as being in the middle category, but reading this post made me feel like the “driving only” category.

    So, can anyone explain to a “driving only” Mac user how to persuade Safari to allow me to click on a link to a midi file and have Safari collect an app/plug-in from somewhere that will cause the midi file to play from within the web page, without me having to download it and play it using quicktime as a standalone item?

    1. Jeremy Leffler

      Follow-up to above post — I just fed back to Apple in these terms:

      Dear Apple

      I love your computers and OS, but there is one thing that I have just run into today that is bugging me. It’s so simple and yet so annoying.

      I use Safari as my browser, and it’s great. BUT when I want to listen to a midi file linked on a website I get a “missing plug-in” placemarker and nothing happens. The only way to listen to the file is to two-finger-tap the link, “Download linked file”, and then open the file separately in Quicktime.

      That is just so clunky, and so un-Mac.

      Why on earth would you remove this functionality from your system? It’s so simple, and it used to be there. Your software used to be so cool you could get frostbite just using it. Is midi now so old it’s just too warm to survive in your ice-cool environment? Come on, play fair and give it back!

      1. Tom Hutchinson

        Thank you so much for the “two-finger-tap” on the link suggestion. You’re right, it is clunky but it does work. I was afraid I’d never again be able to hear these web midi files now that I am using Mountain Lion OS. It took me a while to figure out what a “two-finger-tap” means on my computer. I use an old fashion one button mouse with my iMac. So what I do is point my mouse to the midi link and while holding down the Control button I click the mouse. From the menu that comes up I select “Download Linked File” . The file goes into my downloads folder. I click on the downloads folder. I see the file there and I double click it. It automatically launches one of my music programs (either Amadeus Pro or Encore in my case, but Quicktime is also possible).

  6. Kasey Galligan

    I have seen references to the workaround by user “andyBall_uk” in multiple places. Then there are other little bits and pieces of you and other people posting “oh, don’t forget…..” I’m wondering if you can synthesize the steps for those of us who have some skills, but you kind of have to treat us like dummies. I found the 7.7 version and downloaded it. I kind of get what to do, but a little better step by step guide would be great.

  7. Kasey Galligan

    Success! I have a very good friend who has made two files for me that is a MUCH easier process than anything I have seen. No opening terminal and typing in or anything. Literally, it’s drag and drop in the internet plug-ins and preferences of your hard drive Library folder. Email me at and I’ll send the files right to you. I can now play MIDI files right in Safari (6.1.5) with OS 10.8.5.

  8. Claude le francais

    Thanks a lot ! It works with my Mavericks ! I didn’t seen that QT 10 have until my surf came me

  9. Claude le Francais

    Sorry :
    … I didn’t seen that QT 10 have no midi support until my browser tell me it. I update my MacBook Snown Leopard > Mavericks

  10. Uli

    Thank you very much !!!
    I replaced

    C\
    ontent

    with

    Content

    and it works well.

    Do you know a hack to enable Midi in Quicklook?

    Regards
    Uli

  11. Cory Martin

    Has anyone gotten this to work in browsers other than Safari? In Firefox, it shows up in Plugins as QuickTime Plug-in 7.7.1, but when I visit the url of a midi file, I just get a blank white page.

  12. martinkaptein242

    It’s really sad, but I actually ended up using Internet Explorer through Parallels (Win 8.1). No other browsers worked (even Chrome on Windows!).

  13. registred

    You could also download quicktime 7.6.6. It’s less geekier but easier 🙂
    http://support.apple.com/kb/dl923

  14. delicious.com

    Awesome! Its genuinely remarkable piece of
    writing, I have got much clear idea on the topic of from this piuece of writing.

Comments are closed.