| 1 |
// Copyright 2007 "Gilles Degottex" |
| 2 |
|
| 3 |
// This file is part of "Music" |
| 4 |
|
| 5 |
// "Music" is free software; you can redistribute it and/or modify |
| 6 |
// it under the terms of the GNU Lesser General Public License as published by |
| 7 |
// the Free Software Foundation; either version 2.1 of the License, or |
| 8 |
// (at your option) any later version. |
| 9 |
// |
| 10 |
// "Music" is distributed in the hope that it will be useful, |
| 11 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
// GNU Lesser General Public License for more details. |
| 14 |
// |
| 15 |
// You should have received a copy of the GNU Lesser General Public License |
| 16 |
// along with this program; if not, write to the Free Software |
| 17 |
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 18 |
|
| 19 |
#ifndef _Note_h_ |
| 20 |
#define _Note_h_ |
| 21 |
|
| 22 |
#include <QString> |
| 23 |
#include <deque> |
| 24 |
using namespace std; |
| 25 |
|
| 26 |
class Note |
| 27 |
{ |
| 28 |
public: |
| 29 |
int ht; |
| 30 |
QString factor; |
| 31 |
|
| 32 |
// error to ht |
| 33 |
float min_err; |
| 34 |
float max_err; |
| 35 |
float avg_err; |
| 36 |
deque<float> errors; |
| 37 |
|
| 38 |
// volume |
| 39 |
deque<float> volumes; |
| 40 |
|
| 41 |
// ctor |
| 42 |
void init(); |
| 43 |
Note(int h); |
| 44 |
Note(int h, int num, int den); |
| 45 |
Note(int h, float cents); |
| 46 |
|
| 47 |
void addAnalysis(float err, float volume); |
| 48 |
QString getName() const; |
| 49 |
}; |
| 50 |
|
| 51 |
#endif |