Programming language for sound manipulation Having had little experience in PHP, I moved to C++ in-order to create a spectrogram, I wanted to create probably the simplest/easiest one for my first project, so easy infact I don't need reading/write to files or add settings to it. 

But, as far as I have been learning C++ I was able to manipulate audio file, only to read and write, but the spectrogram works, by reading from a mic and this seems kind of hard to do. I have looked every link in Google, with the word spectogram and C++ in it, but I haven't gotten any useful page.

Now, if I am not mistaken, for the project I am working on, it may be good idea to use JAVA, because I read somewhere that JAVA is better than C++  1 in a way it manipulates sound, and 2 it is actually easier to learn than C++

So, I wanted to ask here, if JAVA is better for my project, which I will be doing in Windows7?
For the first few experiments I would recommend using a scripting language like Matlab or Python. They're much easier to understand and much quicker to write than "lower level programming languages" like C++.

Matlab has a signal processing toolbox and can read and write audio files, do windowing, FFTs etc. as well as a very simple playback mechanism. Basic 2D and 3D-plotting tools are also built right into the language itself.

For Python there is the SciPy library that does all kinds of scientific computing, including wavefile handling, windowing and FFT as well. Plus, there is the Matplotlib that does all of the plotting for you.

In C++, you would have to find a UI toolkit that works for your OS, write a drawing widget to plot stuff in and then fill it with data. Plus, obviously all the memory management; wich will probably become the biggest annoyance and time-sink if you're not experienced in doing it.

To implement live playback and recording I suggest using portaudio, a library written in C. There exists a Matlab .MEX utiliy called PlayRec and there are Python bindings called PyAudio.

From my experience, if you want to use portaudio I'd suggest using Python. Compiling the .mex utility is a huge pain while Python seemed to "just work".

If you manage to get it to work but still want to do it in C++ you can then port the codebase (just a couple of lines in both Matlab or Python) while still using portaudio for the audio input/output.

For a superficial comparison of the different code-complexities you can take a look at some work I wrote last year. Each implementation does the same thing, just in a different language:


FTM filter written in C/CUDA (plus some benchmarking stuff)
FTM filter written in Matlab (plus some plotting stuff)
FTM filter written in Python (just the filter, no extras)