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

It seems to be impossible to play more than 15 different instruments simultaneously with the Sound[{Soundnote[...],...}] construct. Any guesses why it is so?

With up to 15 instruments it works well:

Sound[ Table[ SoundNote[ i, {i - 1, i}, i], {i, 1, 15}]]

(* I would put an image of the output here if it weren't for the "stackexchange reputation system" *)

But with 16 or more different instruments this yields no playable result.

Sound[ Table[ SoundNote[ i, {i - 1, i}, i], {i, 1, 16}]] 

Does anyone know whether there is any way to instruct the Sound function to play more than 15 instruments?

share|improve this question
It's a limitation of MIDI: – Xerxes Feb 27 '13 at 19:31
@Xerxes My knowledge of MIDI is sparse, but anyway do you mean than the Sound Function is built on top of MIDI, and that it inherited its limitations? So there is no way around it? I expected more from the guys that made the Sound function ;) – Labareda Feb 27 '13 at 19:52
Yes, that's correct. If you have some kind of external program that can convert MIDI to a sampled sound format, you could export Sounds in batches of 15 and then remix them in Mathematica. As far as I can tell, Mathematica does not have any built-in capability to do that conversion, though. – Xerxes Feb 27 '13 at 20:05
@Xerxes Thank you! I guess that answers my question. – Labareda Feb 27 '13 at 20:12

The answer was already given by Xerxes. It is a limitation of MIDI, which only supports 16 channels. That Mathematica really uses MIDI is described in the docs. For instance in the tutorial The Representation of Sound:

At the lowest level, all sounds in Mathematica are represented as a sequence of amplitude samples, or as a sequence of MIDI events.

share|improve this answer

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.