diff testApp.mm @ 6:92850a2b099c

set up preset slots from init file. PD synth has metronome, recieves ticks but doesn't do anything with them.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Fri, 17 Oct 2014 14:50:50 +0100
parents 213df0baed47
children 4e00f92567d9
line wrap: on
line diff
--- a/testApp.mm	Thu Oct 16 15:52:53 2014 +0100
+++ b/testApp.mm	Fri Oct 17 14:50:50 2014 +0100
@@ -1,9 +1,8 @@
 #include "testApp.h"
 #include "ofAppiOSWindow.h"
-
+#include "ExplorePresetManager.h"
 extern EventLogger eventLogger;
-extern PresetManager presetManager;
-
+extern ExplorePresetManager expPresetManager;
 // static members inited here. not my choice.
 int SynthParam::mappingUID = 88000;
 //--------------------------------------------------------------
@@ -21,7 +20,11 @@
     
     
     testController = new TestController;
-    presetManager.startLoadAll();
+    
+    expPresetManager.onAppLoad();
+    
+    //presetManager.startLoadAll();
+    
     
     messageOrganiser.init(&core, testController);
     timeController.init();
@@ -113,22 +116,28 @@
 }
 
 //--------------------------------------------------------------
-void testApp::setupUIElements(){
-
-    // eventually: sliderpanel, topbuttonpanel, submitbuttonpanel, countdown panel,
+// GUI for finding and saving presets to express concepts
+void testApp::setupExpressViewPanels(){
     
-    // --------------------- BUTTONS
+}
+//--------------------------------------------------------------
+// gui for the main training stage
+void testApp::setupTrainingViewPanels(){
+    
+}
+//--------------------------------------------------------------
+// gui for the old style tweakathlon  stage
+void testApp::setupSearchViewPanels(){
+    
     UIProps p;
-    ofBackground(p.generalBackground);
-
     ButtonPanel* bottomButtonPanel = new ButtonPanel(1,160+p.sliderPanelHeight,ofGetWidth(),250,p);
-
+    
     Buttron* playTargetButton = new Buttron(p.buttonWidth*0.2,680, p);
     playTargetButton->setLabel("Target");
     messageOrganiser.mapButtonToAction(playTargetButton, TRIGGER_TARGET_ID);
     bottomButtonPanel->addButton(playTargetButton);
     messageOrganiser.setTargetButton(playTargetButton);
-
+    
     Buttron * playCandidateButton = new Buttron(p.buttonWidth*1.4,680, p);
     playCandidateButton->setLabel("Current");
     messageOrganiser.mapButtonToAction(playCandidateButton, TRIGGER_CANDIDATE_ID);
@@ -146,18 +155,28 @@
     saveButton->setLabel("SAVE");
     messageOrganiser.mapButtonToAction(saveButton, SAVE_PRESET_HIT);
     bottomButtonPanel->addButton(saveButton);
-    saveButton->show();
+    saveButton->hide();
     
     Buttron * recallButton = new Buttron(ofGetWidth()*0.5 - p.buttonWidth*0.5,680, p);
     recallButton->setLabel("RECALL");
     messageOrganiser.mapButtonToAction(recallButton, RECALL_PRESET_HIT);
     bottomButtonPanel->addButton(recallButton);
-    recallButton->show();
+    recallButton->hide();
     
     messageOrganiser.setBottomPanel(bottomButtonPanel);
     UIElements.push_back(bottomButtonPanel);
     bottomButtonPanel->showBorder(false);
+    
 
+}
+//--------------------------------------------------------------
+void testApp::setupUIElements(){
+
+    // eventually: sliderpanel, topbuttonpanel, submitbuttonpanel, countdown panel,
+    
+    // --------------------- BUTTONS
+    UIProps p;
+    ofBackground(p.generalBackground);
 
 
     // ------------------------------------ SLIDERS