Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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

1 Answer 1

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

<<JLink`
ReinstallJava[
 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

 
discard

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.