diff SequenceController.h @ 36:146033869165

ISSR fixed colors for stages more repetitions
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Tue, 02 Dec 2014 13:25:48 +0000
parents 3b10a26da293
children 52dbd5b4cfa9
line wrap: on
line diff
--- a/SequenceController.h	Wed Nov 26 18:18:20 2014 +0000
+++ b/SequenceController.h	Tue Dec 02 13:25:48 2014 +0000
@@ -13,14 +13,21 @@
 #include "ofMain.h"
 #include "presetManager.h"
 #include "TrainingScoreManager.h"
+
 #define MIN_TARGETS_IN_SEQUENCE 1
+#define NUM_REPETITIONS_AT_LEVEL 2
 #define MAX_TARGETS_IN_SEQUENCE 7
-#define MIN_TEMPO   60
-#define MAX_TEMPO   500
-#define NUM_TEMPO_STEPS 15
+#define MIN_TEMPO   70
+#define MAX_TEMPO   480
+#define TEMPO_RANDOM_AMOUNT
+#define MAX_TIME 2800
+#define MIN_TIME 200
+#define NUM_TEMPO_STEPS 17
+
 #define NUM_PRESETS 8
 #define SPACER_BARS false
 #define NO_GUIDES_LEVEL false
+
 class AnimStep{
 
     
@@ -38,9 +45,19 @@
                 stepType;
     
     stepType type;
-    
+    int getTimeAllowed(){
+        return timeAllowedMs;
+    }
     float getTimeBetweenTicks(){
-        return 1000* (60.0/tempo);
+        //return 1000* (60.0/tempo);
+        return timeAllowedMs/4.0;
+    }
+
+    void setTempoFromTime(){
+        tempo = 60.0 / (4* timeAllowedMs*1000.0);
+    }
+    void setTimeFromTempo(){
+        timeAllowedMs = 4*1000* (60.0/tempo);
     }
     int presetIndex;
     Preset * currentTargetPreset;
@@ -49,6 +66,8 @@
     bool isLastOfAll;
 
     int tempo;
+    int tempoLevel;
+    int timeAllowedMs;
     int seqNumber;
     int runNumber;
     int difficulty;
@@ -107,11 +126,6 @@
     void setAsMatchingInteraction();
     void setAsMatchingFeedback();
 
-    
-    float getTimeBetweenTicks(){
-        return 1000. * (60.0/tempo);
-    }
-
 };
 
 class SequenceController{
@@ -138,6 +152,7 @@
     vector<AnimStep> steps;
     vector<AnimStep>::iterator currentStep;
     float tempoInc;
+    int timeInc;
     bool soundOnlyMode;
     int totNumRuns;
 };