# An Avant-Garde Jazz Album Cover Generator

Here’s a web-compatible version of the Processing noodles that were the initial cause of my Algo-Jazz Series of algorithmically inspired jazz and associated visualizations. The particular sketch shown here was done last year, so I’m rather late posting it here. And yes, it’s extremely simple – no big algorithmic advances to be found here, just playing with colors, lines, and circles. If memory serves me right, this sketch was the result of boredom while waiting for a delayed flight at an airport. Somehow, it ultimately resulted in several music visualizations, one of which was used in a live performance of mine this month. Funny how things work out like that.

Click the doodle below to make a new one. Best appreciated while listening to my algo-jazz playlist on SoundCloud.

Source code if you’d like to run it yourself:

/*
Doodle generator
Donya Quick
*/

int shapes = 10;
float padding = 80;
float minW = 0;
float maxW = 0;
float minH = 0;
float maxH = 0;
boolean curves = true;

void setup() {
size(500,500);
maxW = width - padding;
maxH = height - padding;
newDoodle();
}

void draw() {
// do nothing - things only happen at start & on mouse press
}

void mousePressed() {
newDoodle();
curves = !curves;
}

/*
Make a new algorithmic squiggle
*/
void newDoodle() {
background(0);
shapes = round(random(5,10));
for (int i=0; i<shapes; i++) {
stroke(randomBrightColor());
strokeWeight(random(3,10));
float r = random(0,1.0);
if (r<0.25) { // 25% chance to draw a circle
fill(random(0,255), random(0,255), random(0,255), random(0,255));
float size = random(width/8, width/4);
ellipse(random(minW,maxW), random(minH,maxH), size, size);
} else { // otherwise draw a 2-4 vertex line
int vertices = round(random(5.0,10.0));
beginShape();
fill(0,0); // transparent fill
for (int j=0; j<vertices; j++) {
if (curves) {
curveVertex(random(minW,maxW), random(minH,maxH));
} else {
vertex(random(minW,maxW), random(minH,maxH));
}
}
endShape();
}
}
}

color randomBrightColor() {
float r = random(0,255);
float g = random(0,255);
float b = random(0,255);

// boost colors to be brighter if over a threshold
if (r > 70) {
r = r+50;
}
if (g > 70) {
g = g+50;
}  if (b > 70) {
b = b+50;
}
return color(r,g,b);
}