We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm new at processing and am having difficulties figuring out how to make a very basic music visualization using beat detect or being time based. I want to incorporate a random line for every beat. Anyone able to help? So far, this is all I've got (I'm brand new at this).
import ddf.minim.*; import ddf.minim.analysis.*;
Minim minim; AudioPlayer song; BeatDetect beat;
void setup() { size(1000,550); minim = new Minim(this); song = minim.loadFile("Breeze.mp3"); song.play();
}
void draw() { background(0);
}
Answers
Having never done beat detecting myself, I did a quick google search to see what I could find. This came up:
http://code.compartmental.net/minim/javadoc/ddf/minim/analysis/BeatDetect.html
So you're in the right area. With a little finagling, I got this working! YEAH! Here:
This is great! Thank you! I wasn't trying to go for the heart detect, but this is getting much closer to what I'm trying to get.
Instead of the heart detect, is there a way to just generate random lines all over the sketch with random x & y points?
Well yeah. I assumed your problem was getting the detecting to work. The random lines bit is easy. Just pick two random x values using random(width), and two random Y values using random(height), and draw a line using line() (and possibly coloring it with stroke()).
Post the code of your attempt at it for more help.