This library is a repository of code snippets I often use in courses or workshops. They simplify the code to access "not-so-direct" functionalities.
The class (code here) was made to retrieve data provided by FaceOSC in a simple way. It is a direct composition of Dan Shiffman FaceOSCTriangleMesh & Dan Wilcox FaceOSCReceiverGraph code.
import v3ga.vision.*;
import oscP5.*;
FaceOSC face;
void setup()
{
size(800,600);
face = new FaceOSC(this);
}
void draw()
{
face.update();
if (face.found>0)
{
ellipse(face.getEyeLeftPosition().x,face.getEyeLeftPosition().y,20,20);
ellipse(face.getEyeRightPosition().x,face.getEyeRightPosition().y,20,20);
}
}
A simple class to connect to an input device (code)
import v3ga.sound.*;
import ddf.minim.*;
Micro mic;
void setup()
{
size(300,300);
mic = new Micro(this);
}
void draw()
{
mic.update();
background(0);
fill(255);
ellipse(150,150,mic.get()*200,mic.get()*200);
}
A simple class to load sounds in Processing in a PImage / PFont fashion (code)
import v3ga.sound.*;
import ddf.minim.*;
Sound sound;
void setup()
{
sound = Sound.load(this, "Processing.wav");
}
void mousePressed()
{
sound.play();
}