Mercurial > hg > beatroot-vamp
comparison Event.h @ 7:3c11becfc81a
Add tempo induction class as well
author | Chris Cannam |
---|---|
date | Tue, 27 Sep 2011 19:05:27 +0100 |
parents | 02d388f98c23 |
children | 0d4048bfadbb |
comparison
equal
deleted
inserted
replaced
6:02d388f98c23 | 7:3c11becfc81a |
---|---|
21 struct Event { | 21 struct Event { |
22 double time; | 22 double time; |
23 double beat; | 23 double beat; |
24 double salience; | 24 double salience; |
25 | 25 |
26 Event() : time(0), beat(0), salience(0) { } | |
26 Event(double t, double b, double s) : time(t), beat(b), salience(s) { } | 27 Event(double t, double b, double s) : time(t), beat(b), salience(s) { } |
28 | |
29 bool operator==(const Event &e) { | |
30 return (time == e.time && beat == e.beat && salience == e.salience); | |
31 } | |
32 bool operator!=(const Event &e) { | |
33 return !operator==(e); | |
34 } | |
27 }; | 35 }; |
28 | 36 |
29 typedef std::vector<Event> EventList; | 37 typedef std::vector<Event> EventList; |
30 | 38 |
31 #endif | 39 #endif |