summaryrefslogtreecommitdiff
path: root/vfg/src/music.h
diff options
context:
space:
mode:
authorTim Redfern <tim@gray.(none)>2012-11-05 11:35:50 +0000
committerTim Redfern <tim@gray.(none)>2012-11-05 11:35:50 +0000
commitf4719e4e997a05bb423e9ca691de50bcbf1cb375 (patch)
tree85fdaee33456c294f41bdf8fdf1b3fc92c462c64 /vfg/src/music.h
parent93bcffd919104a69535d31d325026a37bcf0901d (diff)
flake interaction
Diffstat (limited to 'vfg/src/music.h')
-rwxr-xr-xvfg/src/music.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/vfg/src/music.h b/vfg/src/music.h
index aa38f46..39ffd95 100755
--- a/vfg/src/music.h
+++ b/vfg/src/music.h
@@ -12,6 +12,8 @@ class note {
int velocity;
int duration; //may be needed another time?
int updown; //-1 0 1 used for 3-button interaction
+ bool activated;
+ void playerActivated() { activated=true; }
};
//---------------------------------------------------------------------------------------------------------------------------------------------
class score {
@@ -34,11 +36,21 @@ class musicscore: public score {
void parseMidi(string filename);
void setTimeframe(int millis);
void draw();
+
+ void playerControl(int key);
+ //in wrong object?
+ int missedTime;
private:
map<int,note*> notes;
map<int,note*> stars;
int timeframe;
ofImage flake;
+
+ //in wrong object?
+ int interactionThresh;
+
+
+ int playerKey;
};
//---------------------------------------------------------------------------------------------------------------------------------------------
class song {
@@ -50,6 +62,7 @@ class song {
void setTimeframe(int millis);
void draw();
bool isPlaying;
+ void playerControl(int key);
private:
ofSoundPlayer backing;
ofSoundPlayer melody;
@@ -57,6 +70,9 @@ class song {
musicscore notes;
long startTime;
bool isPreroll;
+
+ int missedInterval;
+
};
//---------------------------------------------------------------------------------------------------------------------------------------------