From: mzincali on
Hi. With limited resources such as slower CPUs, code size and RAM, how
best to detect the pitch of a musical note, similar to what a tuner would
do?

Should I use:

- Kiss FFT
- FFTW
- autocorrelation
- zero crossing analysis
- octave-spaced filters

other?

Thank you in advance.

-mz


From: Vladimir Vassilevsky on


mzincali wrote:

> Hi. With limited resources such as slower CPUs, code size and RAM, how
> best to detect the pitch of a musical note, similar to what a tuner would
> do?
>
> Should I use:
>
> - Kiss FFT
> - FFTW
> - autocorrelation
> - zero crossing analysis
> - octave-spaced filters
>
> other?
>
> Thank you in advance.


A young guy and young girl came to the rabbi to ask for his advice.

A girl:

"Tomorrow is my first night with my fiance. What kind of night dress
should I put on? Should it be a long dress, or a short dress, or an open
dress, or a closed dress, or whatever?"

A boy:

"I got some money. Will you please give me an advice what to do with it:
maybe, invest into something, or buy some real estate, or gold, or put
it in a bank?"

The rabbi:

"My dear children, I have one answer for both of you: whatever you do,
you will certainly be fucked."



Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
From: Jimmy J on
Vladimir Vassilevsky <nospam(a)nowhere.com> wrote in
news:OvGdnUIafaakaCXXnZ2dnUVZ_tqdnZ2d(a)giganews.com:

>
>
> mzincali wrote:
>
>> Hi. With limited resources such as slower CPUs, code size and RAM,
>> how best to detect the pitch of a musical note, similar to what a
>> tuner would do?
>>
>> Should I use:
>>
>> - Kiss FFT
>> - FFTW
>> - autocorrelation
>> - zero crossing analysis
>> - octave-spaced filters
>>
>> other?
>>
>> Thank you in advance.
>
>
> A young guy and young girl came to the rabbi to ask for his advice.
>
> A girl:
>
> "Tomorrow is my first night with my fiance. What kind of night dress
> should I put on? Should it be a long dress, or a short dress, or an
> open dress, or a closed dress, or whatever?"
>
> A boy:
>
> "I got some money. Will you please give me an advice what to do with
> it: maybe, invest into something, or buy some real estate, or gold, or
> put it in a bank?"
>
> The rabbi:
>
> "My dear children, I have one answer for both of you: whatever you do,
> you will certainly be fucked."
>

> Vladimir Vassilevsky
> DSP and Mixed Signal Design Consultant
> http://www.abvolt.com


Since it is clear that neither age nor experience have brought you any
wisdom, the rabbi's answer applies to you as well.
From: ok1iak on
Hi mz.

You cannot use FFTW, smartphones do not run on processors with
floating point unit. Emulation is just too slow to be usable on slower
devices.
Kiss FFT could be configured to use fixed point arithmetics.
You may get an exaple of the fft and spectrogram code for Pocket PC
platform at http://pocketdigi.sourceforge.net It uses some fixed point
real valued FFT.
The real valued fixed point FFT will certainly work and you may use
the phase differences between the FFT bins of successive FFT
transforms to calculate more precise estimate of the tone captured by
the FFT bin.

Zero crossing will be sensitive to noise. I suppose you want to detect
tone from internal microphone?

Vojtech
From: R.Nicholson on
On Oct 1, 10:15 am, ok1iak <bubn...(a)seznam.cz> wrote:
> You cannot use FFTW, smartphones do not run on processors with
> floating point unit. Emulation is just too slow to be usable on slower
> devices.

This is not true on many current smartphones. I've benchmarked
a short float FFT on an iPhone as faster than a scaled integer FFT
(actual milage will depend on how much you optimize each).
The newer Android smartphones use similar ARM CPUs which
includes a VFP pipelined or NEON vector floating point unit.

The real problem is that musical pitch is very often not related to
peak frequency bin results from an FFT at all.


Disclaimer: I have several musical pitch estimation and tuning
assist apps in the iPhone App store. Search for "HotPaw".

IMHO. YMMV.
--
rhn A.T nicholson d.0.t C-o-M
http://www.nicholson.com/rhn/dsp.html