Inspiration

My inspiration is dance figures of "Sema" which is part of the inspiration of Mevlana Celaleddin-i Rumi (1207- 1273) as well as of Turkish custom, history, beliefs and culture.

My Approach

Spinning circles-using random RGB values as stroke color in black background. Each circle represents an individual but all become one as the mouse moves to the center of the applet. As you move the mouse outside the applet figures will split. The spinning sound incorporate the motion. Live audio input will change attributes of the circles.

Resources

Concept: Spinning dance figures of Sema.

Programming Language: Fractals to draw circles in different sizes, perlin noise and rotate to create smooth spinning illusion, random RGB for different stroke colors in Processing.

Sound: Ess is used for the spinning sound and Sonia is used for live audio input to control attributes of the circles.

Ess Code

import krister.Ess.*;
Channel myChannel;
void setup() {
Ess.start(this);
myChannel=new Channel("spin.wav");
void mousePressed() {
myChannel.play(Ess.FOREVER);
void keyPressed() {
myChannel.stop();
}
public void stop() {
Ess.stop();
super.stop();
}

Sonia Code

import pitaru.sonia_v2_9.*;
void setup(){
Sonia.start(this);
LiveInput.start(256);
}
void draw(){
getMeterLevel();
}
void getMeterLevel(){
float meterDataLeft = LiveInput.getLevel();
float meterDataRight = LiveInput.getLevel();
fill(0,100,0);
float left = meterDataLeft*height;
float right = meterDataRight*height;
}
public void stop(){
Sonia.stop();
super.stop();
}

Final Code

import pitaru.sonia_v2_9.*;
import krister.Ess.*;
Channel myChannel;
int MAX = 13;
float angle;
float cosine;
float jitter;
float level;
boolean spinning = false;
int counter = 0;
float[] xx = new float[MAX];
float[] yy = new float[MAX];
color[] colors = new color[MAX];
float[] d = new float[MAX]; // array d
float change = 5;
void setup() {
Ess.start(this);
myChannel=new Channel("spin.wav");
size (500, 500);
background(0);
smooth();
ellipseMode(CENTER);
Sonia.start(this); // Start Sonia engine.
LiveInput.start(256); // Start LiveInput and return 256 FFT frequency bands.
for (int i = 0; i<xx.length; i++) {
xx[i] = random(width);
yy[i] = random(height);
colors[i] = color(random(255), random(255), random(255),
random(40));
d[i] = random(0,2); // array d
}
}
void draw() {
level = LiveInput.getLevel();
//println(level);
fill(0,30);
rect(0,0,width,height);
if (spinning){
noFill();
for (int i=0; i< counter; i++) {
strokeWeight(1);
stroke(colors[i]);
pushMatrix();
translate(xx[i], yy[i]);
rotate(angle);
circle(3,1,d[i]*2*level); // array d
popMatrix();
// if (level > 1.0) {
d[i] = d[i] + 1;//array for d value
}
angle += 0.5;
}
}
void circle(float x,float y,float r) {
if(r>15) {
ellipse(x,y,r,r);
circle(x,y,r/2);
circle(x,y,r/3);
circle(x,y,r/4);
circle(x,y,r/5);
}
}
void mouseDragged() {
for (int i=0; i< counter; i++) {
d[i] = 0;//reset to 0 if it is too large
}
float distance = dist(mouseX,mouseY,width/2,height/2);
if (distance < 50) {
println("center");
for (int i = 0; i<xx.length; i++) {
xx[i] = width/2;
yy[i] = height/2;
}
}
else {
for (int i = 0; i<xx.length; i++) {
xx[i] = random(width);
yy[i] = random(height);
}
}
}
void mousePressed() {
myChannel.play(Ess.FOREVER);
spinning = true;
counter = counter + 1;
if (counter > xx.length-1) {
counter = xx.length-1;
}
xx[counter] = mouseX;
yy[counter] = mouseY;
}
void keyPressed() {
myChannel.stop();
}
public void stop() {
Ess.stop();
super.stop();
}