/* * Los Angeles Electric 8 * Imagined Overtures Album Cover * music data visualizer * @author jtnimoy * @date 2011 * */ #include "Art.h" #include "testApp.h" #include "jtofkit.h" #include "ControlVals.h" using namespace jtofkit; Art *Art::instance = NULL; //-------------------------------------------------------------- //constructor Art::Art(){ //char c[256]; //wxString filepath; ofSetDataPathRoot(""); data_size = 3851457; data = new float[data_size]; int fp = 0; char fname[64]; for(int i=1;i<13;i++){ sprintf(fname,"data/fftoutput/%02i.txt",i); ifstream infile(fname); while(infile.good()){ float a; infile >> a; if(infile.good()){ data[fp] = a; fp++; } } markers[i-1] = fp/64; } ofEnableAlphaBlending(); } //-------------------------------------------------------------- void Art::update(){ } //-------------------------------------------------------------- void Art::draw(){ float s = 1; glScalef(s,s,s); //glTranslatef(-data_size/128,0,0); for(int i=0;i