view src/AudioEventMatcher.cpp @ 1:852173ca8365

Added class to hold recorded mulitracks
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Tue, 31 Jan 2012 17:35:30 +0000
parents c4f9e49226eb
children 179c09199b3c
line wrap: on
line source
/*
 *  AudioEventMatcher.cpp
 *  MultipleAudioMathcher
 *
 *  Created by Andrew on 31/01/2012.
 *  Copyright 2012 QMUL. All rights reserved.
 *
 */

#include "AudioEventMatcher.h"


const int matchWindowWidth = 1200;

AudioEventMatcher::AudioEventMatcher(){

	bayesTempoWindow.setToRelativeSize(0, 0.6, 1, 0.2);
	bayesPositionWindow.setToRelativeSize(0, 0.8, 1, 0.2);

	setArraySizes();
}


void AudioEventMatcher::setArraySizes(){
	bayesianStruct.resetSpeedSize(200);
	bayesianStruct.setRelativeSpeedScalar(0.01);
	bayesianStruct.setSpeedPrior(1.0);
	bayesianStruct.relativeSpeedPrior.getMaximum();
	
	bayesianStruct.resetSize(matchWindowWidth);
	bayesianStruct.setPositionDistributionScalar(1);
	
}

void AudioEventMatcher::draw(){
	//ofRect(20, 20, 300, 200);
	
	recordedTracks.drawTracks();
	bayesianStruct.relativeSpeedPrior.drawVector(0, 200, bayesTempoWindow);
	
}


void AudioEventMatcher::newPitchEvent(const double& pitchIn, const double& timeIn){
	liveInput.addPitchEvent(pitchIn, timeIn);
	//matchNewPitchEvent();
}


void AudioEventMatcher::windowResized(const int& w, const int& h){
	recordedTracks.windowResized(w,h);
}