Can't get audio frequency at phone

Hello,

I am trying to get frequency of sound from outside, but I can’t get it on my android phone.

The code is as below:

function Timer500msListener() freq = recording:getTunerFrequency() title.text = freq print(freq) timer1sec = timer.performWithDelay(500, Timer500msListener) end recording = media.newRecording() recording:startTuner() recording:startRecording() timer1sec = timer.performWithDelay(500, Timer500msListener)

What may be the problem?

Sorry, okay, there is no problem with the code at the moment now.

I am testing the frequency I get, and I compared it with a guitar tuner app.

I tested the E string at guitar, with my code I get around 450 Hz, but when I

test it with a guitar tuner program, I get around 88 Hz, that is the correct one

actually.

What is the reason of this difference? Does anybody have any idea?

Thanks.

No idea?

I found a audio frequency generator and I generated 440 Hz sound, and I measured it with my code I get around 2440 Hz.

I also tried to measure it with the corona sdk example Simple Tuner, and I again get 2440 Hz. But when I measure it with a tuner app I get the correct 440 Hz. value.

Is there anybody who has an idea about this issue?

Let me ask an engineer. 

What we discovered is, the frequency we measure is about 5.5454 times the real frequency.

did you ask?

They have been pretty busy getting the public release out, let me ask again.

There are issues with the frequency input on devices. We are looking into improving this in the future. We don’t have a time table for the fix.

I have a question about this. Using the OPs example using

recording = media.newRecording()

recording:getTunerFrequency() works(I can see the freq change).

But using 

local dateTime = os.time(t ) newAudio = tostring(dateTime) local filePath = system.pathForFile( newAudio, system.DocumentsDirectory ) recording = media.newRecording( filePath )

recording:getTunerFrequency() doesn’t seem to work? The freq never changes from 0.0. This shouldn’t happen correct? My expectation is for the recording:getTunerFrequency() to work like in the OPs example.

Sorry, okay, there is no problem with the code at the moment now.

I am testing the frequency I get, and I compared it with a guitar tuner app.

I tested the E string at guitar, with my code I get around 450 Hz, but when I

test it with a guitar tuner program, I get around 88 Hz, that is the correct one

actually.

What is the reason of this difference? Does anybody have any idea?

Thanks.

No idea?

I found a audio frequency generator and I generated 440 Hz sound, and I measured it with my code I get around 2440 Hz.

I also tried to measure it with the corona sdk example Simple Tuner, and I again get 2440 Hz. But when I measure it with a tuner app I get the correct 440 Hz. value.

Is there anybody who has an idea about this issue?

Let me ask an engineer. 

What we discovered is, the frequency we measure is about 5.5454 times the real frequency.

did you ask?

They have been pretty busy getting the public release out, let me ask again.

There are issues with the frequency input on devices. We are looking into improving this in the future. We don’t have a time table for the fix.

I have a question about this. Using the OPs example using

recording = media.newRecording()

recording:getTunerFrequency() works(I can see the freq change).

But using 

local dateTime = os.time(t ) newAudio = tostring(dateTime) local filePath = system.pathForFile( newAudio, system.DocumentsDirectory ) recording = media.newRecording( filePath )

recording:getTunerFrequency() doesn’t seem to work? The freq never changes from 0.0. This shouldn’t happen correct? My expectation is for the recording:getTunerFrequency() to work like in the OPs example.