comparison src/AudioEventMatcher.h @ 7:33dedfe32893

kick, snare and bass windowed. Likelihoods in dedicated screen regions
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Thu, 02 Feb 2012 21:55:51 +0000
parents 746a5af43c02
children 572564b7cb85
comparison
equal deleted inserted replaced
6:746a5af43c02 7:33dedfe32893
17 #include "ChromaOnset.h" 17 #include "ChromaOnset.h"
18 #include "LiveAudioInput.h" 18 #include "LiveAudioInput.h"
19 #include "ofxWindowRegion.h" 19 #include "ofxWindowRegion.h"
20 #include "BayesianArrayStructure.h" 20 #include "BayesianArrayStructure.h"
21 #include "RecordedMultitrackAudio.h" 21 #include "RecordedMultitrackAudio.h"
22 #include "DynamicVector.h"
22 23
23 class AudioEventMatcher{ 24 class AudioEventMatcher{
24 25
25 public: 26 public:
26 AudioEventMatcher(); 27 AudioEventMatcher();
27 28
28 void setArraySizes(); 29 void setArraySizes();
29 30
30 void draw(); 31 void draw();
31 void drawBayesianDistributions();; 32 void drawBayesianDistributions();;
33 void setWindowDimensions();
32 34
33 void newPitchEvent(const int& channel, const double& pitchIn, const double& timeIn); 35 void newPitchEvent(const int& channel, const double& pitchIn, const double& timeIn);
34 void newKickEvent(const double& timeIn); 36 void newKickEvent(const double& timeIn);
35 void newKickEvent(const int& channel, const double& timeIn); 37 void newKickEvent(const int& channel, const double& timeIn);
36 void newSnareEvent(const double& timeIn); 38 void newSnareEvent(const double& timeIn);
39 void newSnareEvent(const int& channel, const double& timeIn);
37 40
38 void matchNewPitchEvent(const int& channel, const double& pitchIn, const double& timeIn); 41 void matchNewPitchEvent(const int& channel, const double& pitchIn, const double& timeIn);
39 void matchNewOnsetEvent(const int& channel, const double& timeIn); 42 void matchNewOnsetEvent(const int& channel, const double& timeIn);
40 43
41 BayesianArrayStructure bayesianStruct;//hold the probability distriubtions 44 BayesianArrayStructure bayesianStruct;//hold the probability distriubtions
53 double getPitchDistance(const double& pitchOne, const double& pitchTwo, const double& scale); 56 double getPitchDistance(const double& pitchOne, const double& pitchTwo, const double& scale);
54 57
55 void startPlaying(); 58 void startPlaying();
56 59
57 bool usingRealTime; 60 bool usingRealTime;
61 double recentPitch, recentTime;
62
63 DynamicVector likelihoodVisualisation[3];
64 DynamicVector recentPrior;
58 65
59 }; 66 };
60 #endif 67 #endif