We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › how to plot/draw a sound file
Page Index Toggle Pages: 1
how to plot/draw a sound file? (Read 1346 times)
how to plot/draw a sound file?
Apr 21st, 2009, 7:17am
 
Hello everybody!

Anyone knows how can I draw a soundfile (in time or frequency) without the need of playing it?

What I want is just load a file, put everything in a buffer, plot it, I have tried with minim but without results, maybe I am misssing something or I have to use a different library...

Thanks in advance!

Smiley
Re: how to plot/draw a sound file?
Reply #1 - Jun 17th, 2009, 5:35am
 
Anyone have ideas on this? I'm looking to do a similar thing. I've done it rather simply with Ess using something along the lines of
Code:
 myChannel=new AudioChannel("file.aiff");
//println(myChannel.length());
noFill();
beginShape();
for (int i=0; i<800-1;i++) {
curveVertex(i, (int)(100+myChannel.samples[i*25]*100));
}
endShape();

but I would prefer to do it in minim. Any suggestions?
Page Index Toggle Pages: 1