Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
chrismous
chrismous's Profile
2
Posts
3
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Question about Processing and MAX/MSP
[1 Reply]
10-Mar-2011 04:28 PM
Forum:
General Discussion
I developed a program and I am using Processing for the visuals and MAX/MSP for sound. I would like to upload this program to my webpage. Is there any way to upload both these and run together?
Ess sound library problem "out of memory error"
[2 Replies]
28-Feb-2011 12:18 PM
Forum:
Contributed Library Questions
Hello!!
I have a problem with Ess. Any idea about that? thanks!!
import processing.opengl.*;
import krister.Ess.*; //sound library
boolean nl1,nl2,nl3,nl4,nl5,nl6;
boolean rec;
float rotx = 0;
float roty = 0;
int num = 120;//Arithos Sformon se kathe Sforma
int free=0,colorL=255,megethos = 400,k = 0,j=100,i=200;
float x,y,z;
float r,th=0,step=.1,epi=200;
float m = 1,n1=-1,n2=0,n3=0;
float b=1,a=1;
int counter1=158,counter2=0;
//audio
//call audiofilters/channels
AudioChannel ac;
SineWave sine;
Envelope myEnvelope;
int envelopeLength = 1000;
void setup()
{
//size(screen.width,screen.height,OPENGL);//screen.height
size(400, 300,OPENGL);
background(0);
frameRate(30);
smooth();
rectMode(CENTER);
Ess.start(this);
}
void draw()
{
counter1++;
if (counter1 == 160) {
m=int(random(3,40));
n1=random(.5);
n2=random(6.);
n3=int(random(0,10));
epi=int(random(50,150));
step=random(.01,10);
colorL = 255;
colorL = colorL*int(random(0.4,1.99));
counter1=0;
}
translate(width/2,height/2);
stroke(colorL,5);
noFill();
beginShape();
for(int i=1; i < num; i++) {
r = epi*pow(((pow(abs(cos(m*th/4)/a),n2))+(pow(abs(sin(m*th/4)/b),n3))),(-1/n1));
th = th + step;
x = r*cos(th);
y = r*sin(th);
curveVertex(x,y);
curveVertex(x+random(free),y+random(free));
soundSynthesis(x+y);
}
endShape();
noCursor();
}
void soundSynthesis(float x) {
ac = new AudioChannel();
ac.initChannel(ac.frames(envelopeLength));
sine=new SineWave(x, 0.1);
sine.generate(ac, 0, ac.frames(envelopeLength));
//gain envelope
EPoint[] env=new EPoint[3];
env[0]=new EPoint(0,0);
env[1]=new EPoint(0.1,0.1);
env[2]=new EPoint(envelopeLength/1000,0);
myEnvelope=new Envelope(env);
myEnvelope.filter(ac);
ac.play();
}
«Prev
Next »
Moderate user : chrismous
Forum