From 7e99d4291172f4dadb59b81cf525817dd8a210e5 Mon Sep 17 00:00:00 2001 From: Comment Date: Tue, 4 Dec 2012 14:53:44 +0000 Subject: dress rehearsal version --- vfg/src/music.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'vfg/src/music.h') diff --git a/vfg/src/music.h b/vfg/src/music.h index 8733bb1..e4e8601 100755 --- a/vfg/src/music.h +++ b/vfg/src/music.h @@ -34,6 +34,11 @@ class levelscore { printf("time %i: level %i, nextleveltime %i\n",i,getLevel(i), nextLevelTime(i)); } } + void makePractice(int l){ + levels[0]=0; + levels[l]=0; + length=l; + } int getLives(int time) { map::iterator iter; int lives=0; @@ -160,6 +165,7 @@ class musicscore: public score { void drawNotes(float hOffs,levelscore *levels); void drawFlakes(float hOffs,levelscore *levels,float scale); void playerControl(int key); + void makeRandomNotes(int length,int startFreq,int endFreq); void makeFlakes(int threshStart,int threshEnd,levelscore *levels); void printNotes(); int missedFlakes; @@ -182,6 +188,8 @@ class musicscore: public score { //--------------------------------------------------------------------------------------------------------------------------------------------- class song { public: + song(); + virtual ~song(); song(string backfile,string melfile,string musfile,string lyricfile,string levelfile); void play(); void stop(); @@ -197,8 +205,9 @@ class song { void playerControl(int key); int getLevel(long time); int getCurrentTime(); + string getScoreString(); - musicscore notes; + musicscore notes; private: ofSoundPlayer backing; ofSoundPlayer melody; @@ -206,7 +215,7 @@ class song { levelscore levels; long startTime; - bool isPreroll; + bool isPreroll,isPractice; int fThreshStart,fThreshEnd; }; -- cgit v1.2.3