From f4719e4e997a05bb423e9ca691de50bcbf1cb375 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Mon, 5 Nov 2012 11:35:50 +0000 Subject: flake interaction --- vfg/src/music.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'vfg/src/music.h') 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 notes; map 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; + }; //--------------------------------------------------------------------------------------------------------------------------------------------- -- cgit v1.2.3