comparison src/AudioEventMatcher.h @ 19:1a62561bd72d

Added in tempo follower class that models the tempo of played events
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Thu, 09 Feb 2012 18:09:34 +0000
parents 4ded82fe318d
children 4f6006cac9de
comparison
equal deleted inserted replaced
18:4ded82fe318d 19:1a62561bd72d
10 10
11 11
12 #ifndef AUDIO_EVENT_MATCHER_H 12 #ifndef AUDIO_EVENT_MATCHER_H
13 #define AUDIO_EVENT_MATCHER_H 13 #define AUDIO_EVENT_MATCHER_H
14 14
15 #define NUMBER_OF_CHANNELS 3
15 16
16 #include "ofMain.h" 17 #include "ofMain.h"
17 #include "ChromaOnset.h" 18 #include "ChromaOnset.h"
18 #include "LiveAudioInput.h" 19 #include "LiveAudioInput.h"
19 #include "ofxWindowRegion.h" 20 #include "ofxWindowRegion.h"
20 #include "BayesianArrayStructure.h" 21 #include "BayesianArrayStructure.h"
21 #include "RecordedMultitrackAudio.h" 22 #include "RecordedMultitrackAudio.h"
22 #include "DynamicVector.h" 23 #include "DynamicVector.h"
23 #include "AccompanimentSynchroniser.h" 24 #include "AccompanimentSynchroniser.h"
25 #include "TempoFollower.h"
24 26
25 class AudioEventMatcher{ 27 class AudioEventMatcher{
26 28
27 public: 29 public:
28 AudioEventMatcher(); 30 AudioEventMatcher();
66 bool startedPlaying; 68 bool startedPlaying;
67 69
68 bool usingRealTime; 70 bool usingRealTime;
69 double recentPitch, recentTime; 71 double recentPitch, recentTime;
70 72
71 DynamicVector likelihoodVisualisation[3]; 73 DynamicVector likelihoodVisualisation[NUMBER_OF_CHANNELS];
72 DynamicVector recentPriors[3]; 74 DynamicVector recentPriors[NUMBER_OF_CHANNELS];
73 //DynamicVector recentPrior; 75 //DynamicVector recentPrior;
74 DynamicVector projectedPrior; 76 DynamicVector projectedPrior;
75 77
76 double currentAlignmentPosition; 78 double currentAlignmentPosition;
77 double lastAlignmentTime; 79 double lastAlignmentTime;
78 80
79 double recentEventTime[3]; 81 double recentEventTime[NUMBER_OF_CHANNELS];
80 int startTime; 82 int startTime;
81 int currentAlignmentTime; 83 int currentAlignmentTime;
82 84
83 double screenStartTimeMillis, screenEndTimeMillis, screenWidthMillis; 85 double screenStartTimeMillis, screenEndTimeMillis, screenWidthMillis;
84 bool followingLiveInput; 86 bool followingLiveInput;
91 double onsetLikelihoodToNoise; 93 double onsetLikelihoodToNoise;
92 double pitchLikelihoodToNoise;//more noise 94 double pitchLikelihoodToNoise;//more noise
93 95
94 double pitchOfNearestMatch;//for viz purposes 96 double pitchOfNearestMatch;//for viz purposes
95 double distanceOfNearestMatch; 97 double distanceOfNearestMatch;
98
99
100
101 TempoFollower temporal;
96 }; 102 };
97 #endif 103 #endif