We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › Processing to Grasshopper via UDP
Page Index Toggle Pages: 1
Processing to Grasshopper via UDP (Read 1029 times)
Processing to Grasshopper via UDP
Dec 18th, 2009, 12:51am
 
Hello all,

I am quite new to processing, and have done visual basic scripting in Rhino 3D, let say i am an enthusiastic amateur.
I am currently trying to send audio data (with Ess lib) from processing to grasshopper, trying to make audio responsive geometry. In order to do that, i would use the UDP library from Stephane Cousot

here is the processing code

import krister.Ess.*;

FFT myfft;
AudioInput myinput;
int bufferSize=1024;

void setup() {
 size(1060,600);
 frameRate(30);
 stroke(1);
 fill(100,100,255);

 Ess.start(this);
 myinput=new AudioInput(bufferSize);
 myfft=new FFT(bufferSize*2);
 myinput.start();

 myfft.damp(.3);
 myfft.equalizer(true);
 myfft.limits(.005,.05);
}

void draw() {
 background(255);
 smooth();
 for (int i=0; i<bufferSize;i++) {
   rect(i+10,500,10,myfft.spectrum[i]*-300);
 }
}

public void audioInputData(AudioInput theInput) {
 myfft.getSpectrum(myinput);
}

Can someone basically explain how to connect the two platform.
thanks guys
Re: Processing to Grasshopper via UDP
Reply #1 - Dec 19th, 2009, 2:44pm
 
Allright I did it. Check out Luis fragada's example on the Grasshopper forum, really helpfull, you can download  a package with all you need to exchange data between the two platforms, using Cousot' UDP library.

Page Index Toggle Pages: 1