Mercurial > hg > multitrack-audio-matcher
view src/AudioEventMatcher.h @ 4:45b5cf9be377
checking through Bayesian update procedure - working without cross update method.
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Thu, 02 Feb 2012 12:13:44 +0000 |
parents | 5e188c0035b6 |
children | 746a5af43c02 |
line wrap: on
line source
/* * AudioEventMatcher.h * MultipleAudioMathcher * * Created by Andrew on 31/01/2012. * Copyright 2012 QMUL. All rights reserved. * */ #ifndef AUDIO_EVENT_MATCHER_H #define AUDIO_EVENT_MATCHER_H #include "ofMain.h" #include "ChromaOnset.h" #include "LiveAudioInput.h" #include "ofxWindowRegion.h" #include "BayesianArrayStructure.h" #include "RecordedMultitrackAudio.h" class AudioEventMatcher{ public: AudioEventMatcher(); void setArraySizes(); void draw(); void newPitchEvent(const double& pitchIn, const double& timeIn); void newKickEvent(const double& timeIn); void newSnareEvent(const double& timeIn); void matchNewPitchEvent(const int& channel, const double& pitchIn, const double& timeIn); void matchNewOnsetEvent(const int& channel, const double& timeIn); BayesianArrayStructure bayesianStruct;//hold the probability distriubtions LiveAudioInput liveInput;//hold the new events that come in RecordedMultitrackAudio recordedTracks; void windowResized(const int& w, const int& h); ofxWindowRegion bayesTempoWindow; ofxWindowRegion bayesPositionWindow; ofxWindowRegion bayesLikelihoodWindow; bool checkMatch(const double& recordedPitch, const double& livePitch); double getPitchDistance(const double& pitchOne, const double& pitchTwo, const double& scale); void updateBayesianDistributions(const double& newEventTime); void startPlaying(); bool usingRealTime; //tmp debug fn void printPostOffset(); }; #endif