Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Sometimes sounds specified using SoundNote (i.e. things played using MIDI) don't play properly on OS X. Some notes are missing and some are stuck.

At least this is what happens on my system with Mathematica 9.0.1 on OS X 10.8.4 and Apple Java 1.6.0_51.

How can I fix this and have Mathematica play MIDI properly?

Note: this code is affected as well.

share|improve this question
This is of interest to me. and perhaps – Ghersic Jun 27 '13 at 0:59
up vote 4 down vote accepted

This seems to happen because of a problem or incompatibility with Apple's version of Java, which Mathematica uses by default. (Mathematica does not ship with Java on OS X.)

I believe this could be fixed by changing the default Java of the system to be Oracle's Java 7, but I did not want to do that for various reasons (Java 7 doesn't have retina support).

The following solution worked for me: if you install the Java 7 internet plugin, it won't change the version of Java used to run applications (the default version). It will only change the Java used for the browser plugin. You can still ask Mathematica to use this Java installation using something like

 CommandLine -> 
  "/Library/Internet\\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java"]

Now SoundNote sounds will play fine.

share|improve this answer
Some of this was already explained by Arnoud, but I ran into the problem again, so I thought it would be good to put the solution into its own QA. – Szabolcs Jun 26 '13 at 19:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.