comparison src/AudioEventMatcher.h @ 52:e359b9bad811

Added exporting of image and text data
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Tue, 17 Jul 2012 22:12:20 +0100
parents 93d21c20cfbc
children 5274e3b5479d
comparison
equal deleted inserted replaced
51:6f6461b0d07f 52:e359b9bad811
22 #include "RecordedMultitrackAudio.h" 22 #include "RecordedMultitrackAudio.h"
23 #include "DynamicVector.h" 23 #include "DynamicVector.h"
24 #include "AccompanimentSynchroniser.h" 24 #include "AccompanimentSynchroniser.h"
25 #include "TempoFollower.h" 25 #include "TempoFollower.h"
26 #include "MatchMarkers.h" 26 #include "MatchMarkers.h"
27
28 #include "OutputDataWriter.h"
27 29
28 static const int numberOfChannels = 4; 30 static const int numberOfChannels = 4;
29 31
30 class AudioEventMatcher{ 32 class AudioEventMatcher{
31 33
74 void matchNewChromaEvent(const int& channel, float* chroma, const double& timeIn); 76 void matchNewChromaEvent(const int& channel, float* chroma, const double& timeIn);
75 77
76 double getChromaDotProductDistance(float* chromaOne, float* chromaTwo); 78 double getChromaDotProductDistance(float* chromaOne, float* chromaTwo);
77 double getChromaEuclideanDistance(float* chromaOne, float* chromaTwo); 79 double getChromaEuclideanDistance(float* chromaOne, float* chromaTwo);
78 bool useChromaDotProduct; 80 bool useChromaDotProduct;
81 float quantisedChromagramReceived[12];
82 void makeQuantisedChroma(float* chromaIn);
79 83
80 BayesianArrayStructure bayesianStruct;//hold the probability distriubtions 84 BayesianArrayStructure bayesianStruct;//hold the probability distriubtions
81 85
82 LiveAudioInput liveInput;//hold the new events that come in 86 LiveAudioInput liveInput;//hold the new events that come in
83 RecordedMultitrackAudio recordedTracks; 87 RecordedMultitrackAudio recordedTracks;
149 bool drawLikelihoods; 153 bool drawLikelihoods;
150 bool drawPosterior; 154 bool drawPosterior;
151 155
152 MatchMarkers markedPoints; 156 MatchMarkers markedPoints;
153 double markerPlaybackPosition; 157 double markerPlaybackPosition;
154 158
159 OutputDataWriter testDistributionOutput;
160 void writeAllDistributions();
161 void writeDistribution(DynamicVector& distribution, std::string filename);
162 ofImage img;
155 }; 163 };
156 #endif 164 #endif