New Library

edited November 2015 in Library Questions

So i'm trying to put this text moving with the music, but i'm not getting it

Answers

  • edited November 2015

    <

    pre> import geomerative.*; import ddf.minim.*;

    RFont tipoLetra; String texto = "EVA";

    Minim minim; AudioPlayer som; void setup() { size(1280, 720);

    frameRate (1);

    RG.init(this); tipoLetra = new RFont("C:/Users/Vasco/Desktop/sketch_151124a/data/tipoLetra/FreeSans.ttf", 250, CENTER);

    minim = new Minim(this); som = minim.loadFile("C:/Users/Vasco/Desktop/sketch_151124a/data/som/Current Value - Dark Rain.mp3"); som.play(); }

    void draw() { background (0);

    stroke(255, 0, 0); translate(width/2, height/1.8);

    RGroup myGoup = tipoLetra.toGroup(texto); RPoint[] myPoints = myGoup.getPoints();

    beginShape(TRIANGLE_STRIP); for (int i=0; i<myPoints.length; i++) {

    vertex(myPoints[i].x, myPoints[i].y);
    

    } endShape(); }

    void keyPressed() { if (key == 't' || key =='T') save("C:/Users/Vasco/Desktop/sketch_151124a/data/ImageTiff.tiff"); }

Sign In or Register to comment.