diff options
Diffstat (limited to 'futuregael/src/ofApp.h')
| -rw-r--r-- | futuregael/src/ofApp.h | 60 |
1 files changed, 2 insertions, 58 deletions
diff --git a/futuregael/src/ofApp.h b/futuregael/src/ofApp.h index d656bf1..20bf7d6 100644 --- a/futuregael/src/ofApp.h +++ b/futuregael/src/ofApp.h @@ -2,59 +2,7 @@ #include "ofMain.h" -#include "ofxCsv.h" - -class scriptLine{ -public: - scriptLine(string audiofile,string cols,string wrds){ - if (audio.load(audiofile)){ - //requires https://github.com/arturoc/openFrameworks/tree/feature-soundPlayerDuration - duration = ((float)audio.getDurationMS())/1000.0f; - - vector<string> words=ofSplitString(wrds," "); - - avgWordDuration = duration / words.size(); - - ofLog()<<"loaded "<<audiofile<<", duration "<<duration<<"s, avg "<<avgWordDuration; - } - else duration=0.0f; - - text=wrds; - vector<string> colours=ofSplitString(cols,","); - for (auto c: colours){ - palette.push_back(ofColor::fromHex(ofHexToInt(c))); - } - - bisPlaying=false; - - } - void play(){ - if (audio.isLoaded()){ - audio.play(); - startTime=ofGetElapsedTimef(); - } - } - bool isPlaying(){ - return audio.isPlaying(); - } - void stop(){ - if (isPlaying()){ - audio.stop(); - } - } - void update(){ - if (isPlaying()){ - //if (ofGetElapsedTimef()){} - } - } - vector<ofColor> palette; - string text; - ofSoundPlayer audio; - float duration; - float avgWordDuration; - bool bisPlaying; - float startTime; -}; +#include "show.h" class ofApp : public ofBaseApp{ @@ -74,9 +22,5 @@ class ofApp : public ofBaseApp{ void windowResized(int w, int h); void dragEvent(ofDragInfo dragInfo); - ofxCsv csv; - - vector<scriptLine> script; - - vector<scriptLine>::iterator playline; + Show show; }; |
