Re: Core Audio Beginner Help
Re: Core Audio Beginner Help
- Subject: Re: Core Audio Beginner Help
- From: Ariel Elkin <email@hidden>
- Date: Sat, 24 Dec 2011 20:23:37 +0100
Start by taking a look at how to setup an Audio Session and the Remote IO Audio Unit:
http://www.subfurther.com/blog/2010/04/30/what-you-missed-at-360idev/
On those slides, take a look at Chris' example of a ring modulator to process microphone input at sample level.
Unlike iOS4, iOS5 provides Audio Units that can perform DSP filters and effects, including high-pass, low-pass, reverbs, compressors, etc. Their details are here:
http://developer.apple.com/library/ios/#documentation/AudioUnit/Reference/AudioUnitParametersReference/Reference/reference.html
And as you said, the Core Audio documentation tells you everything about Audio Units, except how to get them to work. And understanding the related sample code is as beginner-friendly as solving the graph isomorphism problem in polynomial time.
But there are indeed Core Audio programmers on this list, and even magnanimous ones too, who care to show how to use the force:
http://lists.apple.com/archives/coreaudio-api/2011/Dec/msg00020.html
On 23 Dec 2011, at 9:02pm, <email@hidden>
wrote:
> Send Coreaudio-api mailing list submissions to
> email@hidden
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.apple.com/mailman/listinfo/coreaudio-api
> or, via email, send a message with subject or body 'help' to
> email@hidden
>
> You can reach the person managing the list at
> email@hidden
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Coreaudio-api digest..."
>
>
> Today's Topics:
>
> 1. Re: "early" anti-alias rolloff on the iPhone 4S ADC (Keith Lazuka)
> 2. Core Audio Beginner Help (Phil Hystad)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 22 Dec 2011 13:26:45 -0800
> From: Keith Lazuka <email@hidden>
> Subject: Re: "early" anti-alias rolloff on the iPhone 4S ADC
> To: Andrew Smith <email@hidden>
> Cc: coreaudio <email@hidden>
> Message-ID:
> <email@hidden>
> Content-Type: text/plain; charset=ISO-8859-1
>
> I tried that. Unless there's a problem with my methodology, the
> anti-alias filter's transition band starts at 19khz regardless of
> whether the iPhone is sampling at 44.1 or 48.
>
> -keith
>
> On Thu, Dec 22, 2011 at 12:52 PM, Andrew Smith
> <email@hidden> wrote:
>> Hi,
>>
>> Why not run the iPhone at 48k? Presumably that will push the filter knee
>> upwards.
>>
>> Best regards,
>> Andrew Smith
>>
>> Hello,
>>
>> Our application relies on a relatively flat frequency response around
>> 20kHz. This is no problem on the iPhone 4 and the 3GS, but on the
>> iPhone 4S we are seeing severe attenuation in this band. I did some
>> measurements, and it appears that the transition band for the iPhone
>> 4S ADC anti-alias filter is more gradual than the iPhone 4 but it starts
>> significantly lower (about 2700Hz lower).
>>
>> This image shows the magnitude frequency response curves for both the
>> iPhone 4 and the 4S given an input sine sweep from 0kHz to 24kHz over
>> the course of 10 seconds:
>> http://dl.dropbox.com/u/441716/iPhone_4s_early_rolloff/iphone_4_vs_4s_sine_sweep.png
>>
>> Test Setup:
>> I generated a sine sweep from 0-24kHz using Baudline running on an
>> iMac. Baudline was attached to the iPhone-under-test via an Edirol
>> UA-25 USB audio capture box sampling at 48khz. I connected the output
>> of the Edirol to the iPhone's linein using an iRig harness and then
>> connected the iRig's/iPhone's lineout to the Edirol's linein, completing the
>> loopback. The iPhone-under-test was sampling at 44.1kHz and was
>> running a custom pass-through app using the RemoteIO audio unit with
>> the PlayAndRecord audio session active and Measurement mode enabled.
>>
>> (While in this test I did a full duplex test, I have also done a
>> separate test of
>> just the iPhone 4S's ADC and saw similar results.)
>>
>> Now I understand that there are no guarantees regarding the iPhone's
>> frequency response above 20kHz, but I was wondering if there was a way
>> to configure CoreAudio such that the anti-alias filter transition band
>> starts higher? I'm already setting the kAudioSessionMode_Measurement
>> flag, which--according to the headers--should minimize the effect of
>> system-supplied DSP. But are there any other flags that need to be set
>> to get closer to the raw input from the ADC? ?Or am I out-of-luck?
>>
>> I also tried running the iPhone 4S at 48khz sample rate, but despite
>> the increased distance from Nyquist, the anti-alias filter transition
>> band starts at the same frequency as when I ran the iPhone 4S at 44.1khz.
>> The only difference I saw with 48kHz is that the filter's transition
>> band is about 2x wider, resulting in gentler rolloff, but still not
>> gentle enough
>> for our application.
>>
>> Any help would be much appreciated.
>> Thank you,
>> Keith Lazuka
>>
>>
>>
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 23 Dec 2011 09:58:45 -0800
> From: Phil Hystad <email@hidden>
> Subject: Core Audio Beginner Help
> To: email@hidden
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset=us-ascii
>
> I have been reading the Core Audio documentation at the Apple Developer site and I am not sure I know any more today then when I started. Are there any Core Audio programmers on this list or is there a better spot.
>
> Basically, I am planning to experiment with various DSP filters on an input audio signal. So, take in the audio analog signal which then goes through ADC via the hardware then I want the stream of numbers. Of course, there are a lot of details on the way.
>
> What I need is help in pointing me in the right direction. That is, what are the important parts of Core Audio where I need to focus my attention.
>
> Thanks,
> phil
>
>
> ------------------------------
>
> _______________________________________________
> Coreaudio-api mailing list
> email@hidden
> http://lists.apple.com/mailman/listinfo/coreaudio-api
>
> End of Coreaudio-api Digest, Vol 8, Issue 392
> *********************************************
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden