To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / Event.h

History | View | Annotate | Download (1.06 KB)

1 6:02d388f98c23 Chris
/* -*- 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 13:0d4048bfadbb Chris
#include <list>
20 6:02d388f98c23 Chris
21
struct Event {
22
    double time;
23
    double beat;
24
    double salience;
25
26 7:3c11becfc81a Chris
    Event() : time(0), beat(0), salience(0) { }
27 6:02d388f98c23 Chris
    Event(double t, double b, double s) : time(t), beat(b), salience(s) { }
28 7:3c11becfc81a Chris
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 6:02d388f98c23 Chris
};
36
37 13:0d4048bfadbb Chris
typedef std::list<Event> EventList;
38 6:02d388f98c23 Chris
39
#endif