Graphic sound analyzer of microphone - android

I am building on an app which has a function which records the sound which comes in the microphone. It would be handy to give a graphical view of the incoming sound, like http://www.filebuzz.com/software_screenshot/full/10920-Audio_Edit.gif for example.
I searched a little bit for a tutorial online, but the only thing I found was Audalyzer, but it is difficult for me to get a grip on it, it also is using the whole interface and not clear how to implement it as a widget...
Maybe somebody knows a good tutorial or example code on this?

You'd probably want to use a Fast Fourier Transform for this.
I'd try jTransforms: https://sites.google.com/site/piotrwendykier/software/jtransforms
The blog here: http://trueharmoniccolours.co.uk/Blog/ gives a good introduction into what the FFT does and how you can turn it into a chart. I fear that by the end of this you'll understand FFTs though...

Related

Android AudioView

Is there a library similar to VideoView, but just for plain audio? I need to do something similar looking as the audio view in WhatsApp. I couldn't really find any good library for this, especially to work ok with RecyclerView. I have found some hard solutions with a lot of code, and i'm thinking, it can't really be that no one needed something like this. There are a lot of solutions for video based on ExoPlayer that really elegant, nut not for only audio.
Any hint would be really appreciated

Matching two audio files

I want to record a dog bark, save the file and compare with several files containing different types of bark (warning bark, crying bark, etc..).
How could i do that comparison in order to get a match? What is the process to follow in this type of apps?
Thank you for the tips.
There is no simple answer to your problem. However, for starters, you might look into how audio fingerprinting works. This paper is an excellent start written by the creators of shazam:
http://www.ee.columbia.edu/~dpwe/papers/Wang03-shazam.pdf
I'm not sure how well that approach would work for dog barking, but there are some concepts there that might prove useful.
Another thing to look into is how the FFT works. Here's a tutorial with code that I wrote for pitch tracking, which is one way to use the FFT. You are looking more at how the tone and pitch interact with the formant structure of a given dog. So parameters you'll want to derive might include fundamental pitch (which, alone, might be enough to distinguish whining from other kinds of barks), and ratio of fundamental pitch to higher harmonics, which would help identify how agressive the bark is (I'm guessing a bit here):
http://blog.bjornroche.com/2012/07/frequency-detection-using-fft-aka-pitch.html
Finally, you might want to do some research into basic speech recognition and speech processing, as there will be some overlap. Wikipedia will probably be enough to get you started.
EDIT: oh, also, once you've identified some parameters to use for comparison, you'll need a way to compare your multiple parameters to your database of sounds with multiple parameters. I don't think the techniques in the shazam article will work. One thing you could try is Logistic Regression. There are other options, but this is probably the simplest.
I'd check out Google's open source lib musicg API: http://code.google.com/p/musicg/
It's Java so it works in Android and it gives similarity metrics for two audio files.
But it's compatible only with .wav files.

Android AudioRecorder with UI

I want to create an audio recorder I have tried the code I get from http://developer.android.com/guide/topics/media/audio-capture.html and it works fine; it records and it plays back what I have said. But right now I want to create an audio recorder with a UI like in recognizerIntent which Google has provided so that you can see or monitor that your voice has been recorded(sorry I can't find a right term but I'm hoping you can understand what I am trying to say). Do you know any tutorial or links that can help me?thanks for you help!
I think you mean that you want some feedback that your voice is being picked up? If so, perhaps this project, Audalyzer might be a good place to start looking?
Libraries within the package offer you a dB reading, a one and two-dimensional wave form, and an FFT plot.
(source: googlecode.com)
There is a simpler WaveformControl you may find easier to understand and modify for your needs.

Page Curl Animation on Android with OpenGL-ES

I want to achieve a nice 3D page curl animation in Android. I read some articles and found that nice effect can be achieved by OpenGL-ES so I started to learn OpenGL-ES (I did some of tutorials of OpenGL-ES and am still continuing) but I found it too complex for me to achieve this functionality. Also I got some examples which are available on StackOverflow and on the net, they work but I am not able to understand it, can someone guide me to achieve this functionality?
Based on the question comments I have an answer to this question.
YES, you can do that with OpenGL, BUT you need a deep understanding of math and graphics. This is a lot to learn, this will cost you at least a couple of weeks and it's definitely a hard path to go if you do it only because of this single animation (all of this applies if you don't take code which you probably won't understand and another human being put his whole effort into).
Nevertheless there might a ready to use implementation but unfortunately I can't present you one because I don't know if there's any out there.
Update
You callenged me, so I was eger to know whether there is something out there (because I saw that before and couldn't believe that there isn't a project out there which already does that for you).
And actually I found this question which seems to address the very same issue. And yes, there's someone who published his results here. And I have to admit: I looks awesome. It's also a pure java implementation.
But still: Having some background knowledge about OpenGL would enhance your whole attitude as developer. I'm not saying it's a must because not every one will succeed in OpenGL programming because it's quite hard to learn and implies a lot of math. But I think it's worth it because you will gain some deep understanding of current and all future graphical interfaces.

Sound processing in Android

I know there is a similar question to this floating around stackoverflow. What I would like to know is if there's a simple way to do beat mapping for a song in Android? I don't need to do anything as complicated as beat matching between different varieties of songs, as the other question requests; at least I don't think it's anymore complicated, more experienced programmers please feel free to comment.
I simply would like to map the beat of a single song to be able to use it later in my program. I'm very new to both Android programming and sound processing in programs, so any suggestions or comments are appreciated.
Check out the open source (actually made by a member of the Android team) project RingDroid...there's some pretty basic sound processing there, so that should give you a start.
Here's the RingDroid site.

Categories

Resources