4

I am creating a musical app which generate some music. I already used MIDI functions on Mac to create a MIDI file with MIDI events (unfortunately, I don't remember names of those functions).

I am looking for a way to create instrumental notes (MIDI's or anything else) programmatically in order to play them. I also would like to have multiple channels playing those notes at the same time.

I already tried 'SoundBankPlayer' but apparently, it can't play multiple instruments at the same time.

Have you got an idea?

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
Aladin
  • 115
  • 2
  • 10

3 Answers3

2

This answer might be a bit more work than you intended, but you can use PD on iOS to do this. More precisely, you can use libpd for iOS for the synthesis, and then use any number of community-donated patches for the sound you're looking for.

Nik Reiman
  • 39,067
  • 29
  • 104
  • 160
1

In iOS 5:

MusicSequence, MusicTrack, MusicPlayer will do what you want.

http://developer.apple.com/library/ios/#documentation/AudioToolbox/Reference/MusicSequence_Reference/Reference/reference.html#//apple_ref/doc/uid/TP40009331

Gene De Lisa
  • 3,628
  • 1
  • 21
  • 36
1

Check out AUSampler AudioUnit for iOS, you'll probably have to delve into Core Audio, which has some learning curve. ;)

lppier
  • 1,927
  • 3
  • 24
  • 62