view DrumTimingLoader_OF/src/DrumTimingLoader.cpp @ 2:50ba55abea8c

updating files to newer version
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Sat, 23 Nov 2013 15:49:27 +0000
parents 82352cfc0b23
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);
}