2

Is it possible to play .mid files directly via some API, or one have to convert the midi file to e.g. AAC first?

OMH
  • 775
  • 1
  • 10
  • 23
  • Does anyone know any open source for playing midi files on iPhone? What we want to do is to add many(50 or more) 1-2 minute "jingles" to our iPhone game. We have the jingles as midi files. It is possible to convert them to AAC or similar, but then the game download would be very big. The midi files are relatively simple, but when I converted them to low bitrate AAC, they simply did not sound good enough. Can anyone suggest a solution for playing these music files on the iPhone, without using >100 megabytes? – OMH Feb 10 '10 at 15:55
  • 2
    This is a duplicate of this question: http://stackoverflow.com/questions/449057/midi-player-synthesizer-library-for-the-iphone – Brad Larson Feb 10 '10 at 16:12

2 Answers2

5

(2 years later…) You can use MusicPlayer and MusicSequence APIs. Available in iOS 5.

justin
  • 104,054
  • 14
  • 179
  • 226
0

There is no Apple API for this. You could write your own, which i think would depend on what you are hoping it is going sound like.

There is lots of available source code for reading midi files and there are a few open source synths for the iphone - or you could use openAl for triggering samples. It probably isn't going to sound like Garageband tho.

If you want it to sound as good as possible you will have to convert it first.