Skip to content
A system for tracking and sending the state of ofApps over OSC
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A system of tracking and sending the state of apps also using ofxHeartbeat over OSC

Requires ofxOSC , ofxXmlSettings


Add heartbeatSettings.xml to data folder of your app and specifiy the - send port(s) , receive port and broadcast address

  • Create ofxHeartbeat object

    ofxHeartbeat _heartbeat;

  • Set up event listeners


void onStoppedHeart 		(string & id);
void onRestartedHeart 	(string & id);
void onSleep 			(bool & state);

void ofApp::onStoppedHeart (string & id) {
	// do something here

void ofApp::onRestartedHeart(string & id) {
	// do something here

void ofApp::onSleep(bool & state) {
	// do something here

  • Initialise
// ofApp.cpp

// (id (string), heartrate (float), send (bool), receive(bool)

ofAddListener(_heartbeat._onStoppedHeart,this, &ofApp::onStoppedHeart);
ofAddListener(_heartbeat._onStoppedHeart,this, &ofApp::onStoppedHeart);
ofAddListener(_heartbeat._onSleep,this, &ofApp::onSleep);
  • sending sleep message
You can’t perform that action at this time.