You need to generate a PCM sound form that matches the note you want to play, and save it to the sample buffer in memory. Then you send this buffer to the audio equipment.
Here is a tutorial on generating several types of waveforms. This article details many aspects of the note you need to consider, including frequency, volume, waveform, sample rate, etc. The article presents the source code of Flash, I think that you should not have problems with concepts and adapting them to iOS.
If you also need a library that you can use to play back generated buffers on iOS, I recommend open source Finch .
Hope this helps!
source share