• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Simplest way to generate audio tones?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simplest way to generate audio tones?


  • Subject: Re: Simplest way to generate audio tones?
  • From: Graham Cox <email@hidden>
  • Date: Sun, 29 May 2016 15:44:33 +1000

Probably should have mentioned this is Mac, not iOS.

Yes, there are Audio Units, but they’re not really what I’m after. You can’t simply create a generator audio unit and use it in an app to generate tones (as far as I’m aware) - it has to be part of the whole Core Audio signal chain. I’m looking for a much higher level approach if possible. I’m thinking perhaps AVAudioPlayer might be suitable, as it has an init method that takes an NSData object that is a sound buffer. I can definitely make one filled with sine values, but as usual the documentation lets me down - it states that the buffer must be formatted according to the supported formats listed in "Multimedia Programming Guide”, but I can find no such guide and the mention on the page isn’t a link.


—Graham



> On 29 May 2016, at 3:36 PM, Jonathan Hull <email@hidden> wrote:
>
> This is way out of my area of expertise, but it appears you want AudioUnits:
> http://www.cocoawithlove.com/2010/10/ios-tone-generator-introduction-to.html
>
> Thanks,
> Jon
>
>
>> On May 28, 2016, at 8:24 PM, Graham Cox <email@hidden> wrote:
>>
>> Hi all,
>>
>> I’m looking for general pointers to the simplest/quickest way to generate an audio tone (sine wave) of a given frequency and duration. Most of the audio APIs seem concerned with playing samples rather than generating tones, so it’s not immediately obvious where to look.
>>
>> —Graham


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Simplest way to generate audio tones?
      • From: Jonathan Hull <email@hidden>
References: 
 >Simplest way to generate audio tones? (From: Graham Cox <email@hidden>)
 >Re: Simplest way to generate audio tones? (From: Jonathan Hull <email@hidden>)

  • Prev by Date: Re: Simplest way to generate audio tones?
  • Next by Date: Re: Simplest way to generate audio tones?
  • Previous by thread: Re: Simplest way to generate audio tones?
  • Next by thread: Re: Simplest way to generate audio tones?
  • Index(es):
    • Date
    • Thread