view DrumTimingLoader_OF/src/testApp.cpp @ 3:303edbbcf1bd tip

updated ofxAubioOnsetDetection file
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Sun, 24 Nov 2013 08:15:17 +0000
parents 50ba55abea8c
children
line wrap: on
line source
#include "testApp.h"

//--------------------------------------------------------------
void testApp::setup(){
	drumTimer.initialise();
}

//--------------------------------------------------------------
void testApp::update(){
	drumTimer.update();//recordedTracks.updatePosition();
}

//--------------------------------------------------------------
void testApp::draw(){
	drumTimer.draw();
}

//--------------------------------------------------------------
void testApp::keyPressed(int key){

	
	if (key == OF_KEY_UP){
		drumTimer.recordedTracks.zoomOut();
		
	}
	
	if (key == OF_KEY_DOWN){
		drumTimer.recordedTracks.zoomIn();
	}

	if (key == OF_KEY_RIGHT){
		drumTimer.recordedTracks.drumTimingAnalyser.widenDrawWindow();
		
	}
	
	if (key == OF_KEY_LEFT){
		drumTimer.recordedTracks.drumTimingAnalyser.narrowDrawWindow();
	}
	

	if (key == ' '){
		drumTimer.recordedTracks.togglePlay();
	}
			
}

//--------------------------------------------------------------
void testApp::keyReleased(int key){

}

//--------------------------------------------------------------
void testApp::mouseMoved(int x, int y ){

}

//--------------------------------------------------------------
void testApp::mouseDragged(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::mousePressed(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::mouseReleased(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::windowResized(int w, int h){
	drumTimer.windowResized(w, h);
}

//--------------------------------------------------------------
void testApp::gotMessage(ofMessage msg){

}

//--------------------------------------------------------------
void testApp::dragEvent(ofDragInfo dragInfo){ 

}