Apr 20, 2017 - 0 Comments - Festival Miracle, Miracle Exhibition!, Uncategorized -

Pablo Cavero

Pablo Cavero sera présent au Festival Miracle pour présenter Musique Machine une installation générative écrite en Processing!

Né en 1986 à Oloron-Sainte-Marie, France. Vit et travaille à Paris.
Travaille à DOC !
www.doc.work

Lab Color Pickers 2014. Impressions pigmentaires contrecollées. 100 x 100 cm.

Lab Color Pickers 2014. Impressions pigmentaires contrecollées. 100 x 100 cm.

//Musique Machine, Pablo Cavero, 2017
import processing.sound.*;
SinOsc sinOsc;
Env env;
float attackTime = 0.001;
float sustainTime = 0.004;
float sustainLevel = 0.3;
float releaseTime;
int runTime;
int periodTime;
boolean doNewPeriod = true;
int addedTimes = 0 ;
int rdmFreq;
int rdmR, rdmG, rdmB;
void setup() {
size(displayWidth,displayHeight);
sinOsc = new SinOsc(this);
env  = new Env(this);
noCursor();
}
void draw() {
runTime= millis();
if (doNewPeriod) {
periodTime=floor(random(800,2000));
addedTimes += periodTime;
println(“new !”);
doNewPeriod = false;
rdmR = floor(random(255));
rdmG = floor(random(255));
rdmB = floor(random(255));
background(rdmR,rdmG,rdmB);
rdmFreq=floor(random(110,880));
releaseTime = random(periodTime/float(1000));
releaseTime= (int(releaseTime)<0.8) ? 0.8 : releaseTime ;
sinOsc.play();
sinOsc.freq(rdmFreq);
env.play(sinOsc, attackTime, sustainTime, sustainLevel, releaseTime);
}
if (runTime > addedTimes){
doNewPeriod = true;
}
}