iOS tone generator

2.4k Views Asked by At

I'm working on a musical app and I would like to generate tones. Off course I did download the http://www.cocoawithlove.com/2010/10/ios-tone-generator-introduction-to.html that seems to be a good start.

But I also read the Apple documentation and a lot of stuff about Audio Units and I figure out that there is a type of Audio Units called : "kAudioUnitType_Generator".

The description of this one is:

"A generator unit provides audio output but has no audio input. This audio unit type is appropriate for a tone generator. Unlike an instrument unit, a generator unit does not have a control input.". https://developer.apple.com/documentation/audiotoolbox/kaudiounittype_generator

That seems to be exactly what I need. So my questions are:

  1. I'm searching for a few days about tone generating in iOS, why nobody seems to be aware of Apple's tone generator and always refers to the "tone generator" from cocoawithlove? And why this one doesn't use the "kAudioUnitType_Generator type" of audio units ?

  2. Do you have any clue, web site or github project to help me using the kAudioUnitType_Generator from Apple?

3

There are 3 best solutions below

0
On
1
On

Judging from the (outdated) Audio Unit Hosting Guide for iOS, this post about iOS 5, and this post about iOS 6, the kAudioUnitType_Generator audio unit is not available in iOS. iOS has always had a pretty limited set of audio units, unfortunately.

1
On

Audio units with kAudioUnitType_Generator type does not generate tones (like sine-wave and etc.). They can be as a sound-source for other Audio Units. Audio units of this type can "play" file, receive sound from network (only on OS X) and play slices of audio.