Aladin
Aladin

Reputation: 115

How can I generate musical notes on iOS and play them?

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?

Upvotes: 4

Views: 4913

Answers (3)

lppier
lppier

Reputation: 1987

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

Upvotes: 1

Nik Reiman
Nik Reiman

Reputation: 40430

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.

Upvotes: 2

Related Questions