Create visuals from sound (wav file)

Hi, i’m new here and just using Processing a little bit. Started by “messing” with existing code. : ) Now, what i’d like to do is generate statics visuals form the data contained in sound files. For exemple amplitude and frequencies.

My wish is to :

  • load a sound
  • take its values
  • transform it to forms in 2D
  • export it at a PNG or SVG

That’s it !

I’m trying with the minim library but know if it’s a good way to realize it. Any tips are very welcome.

I do not understand why there are so many views but no reply, no questions. If i missed something, if you need some details, just tell me please. :slight_smile:


There are resources here including a sound library with examples:

There are tools there to get you started and help you realize and unleash your creative potential.

And there are examples that come with the Processing IDE. Check the menus.

One example:

We are all volunteers here and may be busy with our lives.
It is year end and that usually translates to a busy time for many.

Have fun!


Thanks @glv for the tips. I have already read the documentation (not all) as i already coded some stuff with Processing.
Of course i understand that everybody here act as a volunteer. My question was more to know if more explanations was needed.
I continue to work on my project and will tell you how it grows.

1 Like

Hi @Pyo. I just saw this and wanted to give you my perspective. The biggest hurdle of analyzing audio is choosing which features you are going to try to extract from the signal. Most P3 audio libs have FFT support but without a deeper dive into what the data means or patterns within the data, FFT only goes so far. So it depends on what you want to extract, for example, pitch, noise, rhythm, timbre, speech, etc.
Are you looking at certain features of your audio or just using the frequency domain (FFT) information? Knowing more about the feature extraction would help in providing more information.

Hello @robertesler. Thank you for your pertinent reflection. This is a project around experimental music. I would like to use the pitch and tone of each sound, which are mainly frequencies. So I will certainly have to calculate the average or maximum pitch and tone (peak?) of each of them. Then retrieve this data to turn it into a graph.
I don’t know if I’m clear enough? : )

Though most sound libraries have some sort of support for raw FFT, it is not always the best way to get pitch information from a signal because the harmonics of a fundamental may have more energy than the fundamental making your detection provide varied results.
I don’t think Minim provides pitch analysis other than typical FFT methods and the P3 sound library is similar. I have not used Beads, but there a few more options for analysis in that library.
Personally, I implement Miller Puckette’s algorithm used in Pd4P3’s Sigmund class when trying to detect pitch, or pitch energy in a signal. I have a Processing example here:
Pd4P3/examples/Analysis/SigmundDemo - GitHub
I don’t know exactly what you mean by tone, as that can also be interpreted as pitch. Do you mean timbre or something else?
Anyway, good luck with the project!

Hi, been a long time since i came here as i was busy. But still on the project, no real change a this time. Anyway, thanks for your reply. I mean “hauteur de note” in french. I don’t know if it’s more clear. : ) I’m gonna check your example, thanks. By the way, if you have any tips…