Mercurial > hg > multitrack-audio-matcher
comparison src/AudioEventMatcher.h @ 50:93d21c20cfbc
Added Markers and the ability to switch to these points in the file when playing
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Thu, 14 Jun 2012 20:04:49 +0100 |
parents | d23685b9e766 |
children | e359b9bad811 |
comparison
equal
deleted
inserted
replaced
49:8df911733fdc | 50:93d21c20cfbc |
---|---|
21 #include "BayesianArrayStructure.h" | 21 #include "BayesianArrayStructure.h" |
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 | 27 |
27 static const int numberOfChannels = 4; | 28 static const int numberOfChannels = 4; |
28 | 29 |
29 class AudioEventMatcher{ | 30 class AudioEventMatcher{ |
30 | 31 |
34 void setArraySizes(); | 35 void setArraySizes(); |
35 | 36 |
36 void updatePosition(); | 37 void updatePosition(); |
37 void updateBestAlignmentPosition(); | 38 void updateBestAlignmentPosition(); |
38 | 39 |
40 | |
39 void draw(); | 41 void draw(); |
40 void drawBayesianDistributions(); | 42 void drawBayesianDistributions(); |
41 void drawPositionWindow(); | 43 void drawPositionWindow(); |
42 void drawTrackLikelihoods(); | 44 void drawTrackLikelihoods(); |
43 void drawInfo(); | 45 void drawInfo(); |
44 void drawAlignmentTimes(); | 46 void drawAlignmentTimes(); |
47 void drawMarkers(); | |
45 | 48 |
46 void setWindowDimensions(); | 49 void setWindowDimensions(); |
47 int getScreenWidthIndexOfEventTime(const double& time); | 50 int getScreenWidthIndexOfEventTime(const double& time); |
48 int getTimeNow(); | 51 int getTimeNow(); |
52 | |
53 void addMarkerNow(); | |
54 void deleteMarkers(); | |
55 void deleteNearestMarker(); | |
56 void moveToNextMarker(); | |
57 void moveToPreviousMarker(); | |
58 void goToMarker(const int& markerID); | |
59 void setToPosition(const double& position);//for Bayesian distbn | |
60 void setPlaybackPosition(const double& millis); | |
61 void mousePressed(const int& x); | |
49 | 62 |
50 void newPitchEvent(const int& channel, const double& pitchIn, const double& timeIn); | 63 void newPitchEvent(const int& channel, const double& pitchIn, const double& timeIn); |
51 void newKickEvent(const double& timeIn); | 64 void newKickEvent(const double& timeIn); |
52 void newKickEvent(const int& channel, const double& timeIn); | 65 void newKickEvent(const int& channel, const double& timeIn); |
53 void newSnareEvent(const double& timeIn); | 66 void newSnareEvent(const double& timeIn); |
130 void drawPlayingTempo(); | 143 void drawPlayingTempo(); |
131 void setSpeedRatioDistribution(const double& speedRatio); | 144 void setSpeedRatioDistribution(const double& speedRatio); |
132 | 145 |
133 double euclideanMaximumDistance; | 146 double euclideanMaximumDistance; |
134 bool printingData; | 147 bool printingData; |
148 | |
149 bool drawLikelihoods; | |
150 bool drawPosterior; | |
151 | |
152 MatchMarkers markedPoints; | |
153 double markerPlaybackPosition; | |
154 | |
135 }; | 155 }; |
136 #endif | 156 #endif |