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.

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
2  
It's a limitation of MIDI: en.wikipedia.org/wiki/MIDI#Technical_specifications –  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
add comment

1 Answer

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
add comment

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.