On Apr 8, 1:49 pm, wurp <bobbymart...@gmail.com> wrote:
> I agree, Fourier analysis is the way to go.

I doubt you need to calculate the STFT. Here are some simpler
approaches that probably will work - experiment!

1. Detect clipping. Talking probably doesn't clip much but blowing
into the mic definitely will. You should implement some kind of
threshold so that flute_volume =
sigmoid_function_of(number_of_clipped_samples_in_last_0.1_seconds).
2. Use the power of your signal (sum of the samples squared) as the
output volume. I.e. calculate the average power for every 0.1 second
segment, and I'd probably make this decay exponentially too.
3. Just use a single Fourier coefficient. Much quicker and simpler
than calculating the entire FFT. To do this really properly, record
some non-blowing noises (i.e. talking) and blowing, and find the
frequency which has the biggest difference between the two. Use a few
different phones.

Tim

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to