diff AppCore.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 a223551fdc1f
children 91c3fba6e5b9
line wrap: on
line diff
--- a/AppCore.mm	Thu Oct 16 15:52:53 2014 +0100
+++ b/AppCore.mm	Fri Oct 17 14:50:50 2014 +0100
@@ -14,8 +14,8 @@
 void AppCore::setup(const int numOutChannels, const int numInChannels,
 				    const int sampleRate, const int ticksPerBuffer) {
 
-	ofSetFrameRate(60);
-	ofSetVerticalSync(true);
+//	ofSetFrameRate(60);
+//	ofSetVerticalSync(true);
 	//ofSetLogLevel(OF_LOG_VERBOSE);
 	
 	// double check where we are ...
@@ -29,11 +29,11 @@
 	
 	// subscribe to receive source names
 	pd.subscribe("toOF");
-	pd.subscribe("env");
+	pd.subscribe("onTickOF");
 
 	// add message receiver, disables polling (see processEvents)
 	pd.addReceiver(*this);   // automatically receives from all subscribed sources
-	pd.ignore(*this, "env"); // don't receive from "env"
+
     //pd.ignore(*this);             // ignore all sources
 	//pd.receive(*this, "toOF");	// receive only from "toOF"
 	
@@ -51,7 +51,7 @@
 
 	// open patch
     //patchName = "targetSynth6.pd";
-    patchName = "tweakathon_synth_pulse.pd";
+    patchName = "riftathon_synth.pd";
 	Patch patch = pd.openPatch(patchName);
 	cout << patch << endl;
 
@@ -173,6 +173,10 @@
 
 void AppCore::receiveFloat(const std::string& dest, float value) {
 	cout << "OF: float " << dest << ": " << value << endl;
+    
+    if (dest == "onTickOF"){
+        // call our on tick function
+    }
 }
 
 void AppCore::receiveSymbol(const std::string& dest, const std::string& symbol) {