Alex Rivera | Logout

How to prevent iPhone 3GS from filtering low frequencies ( < 150Hz )

Asked 2011-07-19T09:52:44.143
18

I'm developing a bass guitar pitch detection app on iphone 3GS. I found I can't get sound data lower than 150Hz with RemoteIO. However bass guitar may generate tones lower than 50hz. According to the report "iPhone 4 Headset Input Frequency Response", http://blog.faberacoustical.com/2010/iphone/iphone-4-audio-and-frequency-response-limitations/ There is a sharp drop-off below 150 Hz.

Here shows how I setup the AudioUnit.

// set audio unit
{
    // create AudioUnit
    {
        AudioComponentDescription desc;
        desc.componentType = kAudioUnitType_Output;
        desc.componentSubType = kAudioUnitSubType_RemoteIO;
        desc.componentManufacturer = kAudioUnitManufacturer_Apple;
        desc.componentFlags = 0;
        desc.componentFlagsMask = 0;

        AudioComponent comp = AudioComponentFindNext(NULL, &desc);
        OSAssert(AudioComponentInstanceNew(comp, &m_AudioUnit));
    }

    //enable input on the remote I/O unit (output is default enabled, but input is not)
    {
        UInt32 one = 1;
        OSAssert(AudioUnitSetProperty(m_AudioUnit, kAudioOutputUnitProperty_EnableIO,
                                      kAudioUnitScope_Input, 1, &one, sizeof(one)));
    }

    //set render callback function
    {
        AURenderCallbackStruct callbackInfo;
        callbackInfo.inputProc=staticPerformThru;
        callbackInfo.inputProcRefCon=this;

        OSAssert(AudioUnitSetProperty(m_AudioUnit,
                                      kAudioUnitProperty_SetRenderCallback,
                                      kAudioUnitScope_Input, 
                                      0, &callbackInfo, sizeof(callbackInfo)));

    }

    //set in/output format
    {
        CAStreamBasicDescription outFormat;
        outFormat.SetAUCanonical(channels, false);
        outFormat.mSampleRate = sampleRate;
  
Edit
Report

2 Answers

0

Interesting question. I am not aware of any such filter... you can set an input callback on the remote IO unit and get a stream of floats.

I haven't seen any documentation that this float stream is in some way already processed.

I have written a pitch detector which successfully picks up notes at the low end of my singing range (~80Hz)

Maybe post code -- what are you doing inside this callback?

answered 2011-07-26T23:57:31.493
0

Can I recommend you re-ask this question, with an appropriate title ( Maybe something like ' how to prevent iPhone from filtering low frequencies ( < 150Hz ) ' ) and containing all of the necessary information, also stick in that picture, that is an important part of the question. it's very easy to embed a picture.

you haven't even stated what it is you are trying to accomplish.

It looks like you're new to the site, and it looks like a very interesting question.

But you are not being at all clear.

Firstly, this is an issue with record or playback or both?

Now, what exactly are you doing in your experiment? Western scientific method... lay it out.

You are generating static in your remoteIO render callback? No, it sounds like you are using passthrough, you say you are putting white noise into the iPhone. how are you setting up your audio unit?

so the white noise goes into the iPhone, straight out, and... now what does that graph represent? FFT / Spectral analysis of the output of the iPhone? how are you doing that? You're feeding this into some OSX graphing software that can take input from the line in?

also, you could do with narrowing it down. If you are indeed passing sound right through the device, you have no idea where the filtering is occurring. for all you know there could be filtering occurring in the device that generates the white noise, as well as the device that graphs the iPhone output.

how about generating your white noise from inside the remote I/O render callback?

and then generating it externally and analysing the data that arrives from within this callback -- you could perform an FFT.

anyway, for input wouldn't you do better to feed in sine waves of different frequencies?

answered 2011-07-30T08:32:23.543

Your Answer