617
Bearbeitungen
Fake (Diskussion | Beiträge) (geshi!) |
Fake (Diskussion | Beiträge) (better plugin) |
||
=== Code des gezeigten Processing Audio Visualizers ===
<
float x, y, z;
float vx, vy, vz;
alive = true;
}
public Particle( float x, float y, float z, float vx, float vy, float vz, PImage tex ) {
this( x, y, z, vx, vy, vz, tex, color( 255, 255, 255 ));
return alive;
}
</syntaxhighlight >
<
import ddf.minim.analysis.*;
for ( int i = 0; i < args.length; i ++ ) {
if ("--present".equals(args[i])) {
in = minim.getLineIn( Minim.MONO, 512 );
fft = new FFT( in.bufferSize(), in.sampleRate());
background(0);
alph += 0.01f;
PGraphicsOpenGL pgl = (PGraphicsOpenGL) g;
gl.glEnable(GL.GL_BLEND);
gl.glBlendFunc(GL.GL_SRC_ALPHA,GL.GL_ONE);
pushMatrix();
translate( width, 0, -300 );
scale( min( width, height) /150 );
rotateY( alph );
fft.forward( in.mix );
p.remove( i.next());
}
for( int i = 0; i < burst.length; i ++ ) {
if ( burst[i] != null && burst[i].isAlive()) {
pgl.endGL();
popMatrix();
PGraphics res = createGraphics( r * 6, r * 6, P2D);
res.beginDraw();
return res;
</syntaxhighlight >
[[Category:Workshops]]
|