To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / Event.h @ 13:0d4048bfadbb
History | View | Annotate | Download (1.06 KB)
| 1 |
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
|---|---|
| 2 |
|
| 3 |
/*
|
| 4 |
Vamp feature extraction plugin for the BeatRoot beat tracker.
|
| 5 |
|
| 6 |
Centre for Digital Music, Queen Mary, University of London.
|
| 7 |
This file copyright 2011 Simon Dixon, Chris Cannam and QMUL.
|
| 8 |
|
| 9 |
This program is free software; you can redistribute it and/or
|
| 10 |
modify it under the terms of the GNU General Public License as
|
| 11 |
published by the Free Software Foundation; either version 2 of the
|
| 12 |
License, or (at your option) any later version. See the file
|
| 13 |
COPYING included with this distribution for more information.
|
| 14 |
*/
|
| 15 |
|
| 16 |
#ifndef _EVENT_H_
|
| 17 |
#define _EVENT_H_
|
| 18 |
|
| 19 |
#include <list> |
| 20 |
|
| 21 |
struct Event {
|
| 22 |
double time;
|
| 23 |
double beat;
|
| 24 |
double salience;
|
| 25 |
|
| 26 |
Event() : time(0), beat(0), salience(0) { } |
| 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 |
} |
| 35 |
}; |
| 36 |
|
| 37 |
typedef std::list<Event> EventList;
|
| 38 |
|
| 39 |
#endif
|
| 40 |
|