Chris@6: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@6: Chris@6: /* Chris@6: Vamp feature extraction plugin for the BeatRoot beat tracker. Chris@6: Chris@6: Centre for Digital Music, Queen Mary, University of London. Chris@6: This file copyright 2011 Simon Dixon, Chris Cannam and QMUL. Chris@6: Chris@6: This program is free software; you can redistribute it and/or Chris@6: modify it under the terms of the GNU General Public License as Chris@6: published by the Free Software Foundation; either version 2 of the Chris@6: License, or (at your option) any later version. See the file Chris@6: COPYING included with this distribution for more information. Chris@6: */ Chris@6: Chris@6: #ifndef _EVENT_H_ Chris@6: #define _EVENT_H_ Chris@6: Chris@13: #include Chris@6: Chris@6: struct Event { Chris@6: double time; Chris@6: double beat; Chris@6: double salience; Chris@6: Chris@7: Event() : time(0), beat(0), salience(0) { } Chris@6: Event(double t, double b, double s) : time(t), beat(b), salience(s) { } Chris@7: Chris@7: bool operator==(const Event &e) { Chris@7: return (time == e.time && beat == e.beat && salience == e.salience); Chris@7: } Chris@7: bool operator!=(const Event &e) { Chris@7: return !operator==(e); Chris@7: } Chris@6: }; Chris@6: Chris@13: typedef std::list EventList; Chris@6: Chris@6: #endif Chris@6: