4
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ This is of interest to me. and perhaps $\endgroup$
    – Ghersic
    Commented Jun 27, 2013 at 0:59

1 Answer 1

4
$\begingroup$

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

<<JLink`
ReinstallJava[
 CommandLine -> 
  "/Library/Internet\\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java"]

Now SoundNote sounds will play fine.

$\endgroup$
1
  • $\begingroup$ 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. $\endgroup$
    – Szabolcs
    Commented Jun 26, 2013 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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