#pragma once #include "ofMain.h" #include "ofxXmlSettings.h" //event times are absolute integer milliseconds //--------------------------------------------------------------------------------------------------------------------------------------------- class note { public: note(int n,int v,int d=0); int num; int velocity; int duration; //may be needed another time? int updown; //-1 0 1 used for 3-button interaction }; //--------------------------------------------------------------------------------------------------------------------------------------------- class score { //basics of timelime public: long startTime; protected: ofxXmlSettings XML; }; //--------------------------------------------------------------------------------------------------------------------------------------------- class lyricscore: public score { //draws lyrics to screen for a certain time public: }; //--------------------------------------------------------------------------------------------------------------------------------------------- class musicscore: public score { //draws notes to screen for a certain time and certain parameters, checks when they become ready public: musicscore(); void parseMidi(string filename); void setTimeframe(int millis); void draw(); private: map notes; int timeframe; ofImage flake; }; //--------------------------------------------------------------------------------------------------------------------------------------------- class song { public: song(string backfile,string melfile,string musfile); void play(); void stop(); void preRoll(long preroll); void setTimeframe(int millis); void draw(); bool isPlaying; private: ofSoundPlayer backing; ofSoundPlayer melody; lyricscore lyrics; musicscore notes; long startTime; bool isPreroll; }; //---------------------------------------------------------------------------------------------------------------------------------------------