view DrumTimingLoader_OF/src/DrumTimingLoader.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
/*
 *  DrumTimingLoader.cpp
 *  DrumTimingLoader
 *
 *  Created by Andrew on 09/08/2012.
 *  Copyright 2012 QMUL. All rights reserved.
 *
 */

#include "DrumTimingLoader.h"

DrumTimingLoader::DrumTimingLoader(){

}


void DrumTimingLoader::initialise(){
	
	recordedTracks.loadTestAudio();
	/*
		calculateRecordedTempoData();
		printf("\n audioeventmatcher\nFIRST PASS: FINAL recorded tempo is %f\n", recordedTempoData.playingTempo);
		setTempoPrior(recordedTempoData.playingTempo);
		calculateRecordedTempoData();//now calculate again using better prior
		
		printf("\n audioeventmatcher\nSECOND PASS: FINAL recorded tempo is %f\n", recordedTempoData.playingTempo);
		printf("GLOBAL TEMPO of RECORDED FILES\n");
	*/
	
}

void DrumTimingLoader::update(){
	recordedTracks.updatePosition();
}



void DrumTimingLoader::draw(){
	bool drawTracks = false;
	if (drawTracks)
		recordedTracks.drawTracks();
	else 
		recordedTracks.drumTimingAnalyser.drawTempoCurve();
	
	ofSetColor(0);
	ofDrawBitmapString("play pos sec: "+ofToString(recordedTracks.playPositionSeconds, 2), 20, 20);
}

void DrumTimingLoader::windowResized(int w, int h){
	recordedTracks.windowResized(w, h);
}