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 › Display Image in regards to sound
Page Index Toggle Pages: 1
Display Image in regards to sound (Read 1649 times)
Display Image in regards to sound
Oct 11th, 2009, 9:44am
 
I am trying to create a program that will take the microphone input and translate that to display images. I created a maxpatch that worked and am now trying to recreate it in processing. What I would like to know is how to combine:
//Minim
 for(int i = 0; i < in.bufferSize() -1; i++)
 {
   line(i, 50 + in.left.get(i)*50, i+1, 50 + in.left.get(i+1)*50);
   line(i, 150 + in.right.get(i)*50, i+1, 150 + in.right.get(i+1)*50);
 }

//and the array display
  for (int i=0; i<images.length; i++) {
   images[0] = loadImage("l01.png");
   images[1] = loadImage("l02.png"); ...etc

I can't for the life of me figure out how to connect the two. If anyone has any ideas, they'd be greatly appreciated.
Re: Display Image in regards to sound
Reply #1 - Oct 11th, 2009, 12:50pm
 
how do you want the signal to translate into images?

you can blit (transfer) an image onto the canvas with the image()-method like this:

Code:

PImage im;
im = loadImage("picture.png");
image(im, 20, 30);


Re: Display Image in regards to sound
Reply #2 - Oct 11th, 2009, 2:20pm
 
the images are representative of decibel bars seen on an old ghetto blaster. there are fifteen images for the left stereo input and fifteen for the right. in MaxMSP i was easily able to translate that ratio of decibel to image. In processing I can't find a way to make that same translation.
Re: Display Image in regards to sound
Reply #3 - Nov 29th, 2009, 10:44am
 
Check out Ash Oakenfold's example on his site conceptual inertia.

Do a search for "Ash Oakenfold" and "OSC"
Page Index Toggle Pages: 1