-
Notifications
You must be signed in to change notification settings - Fork 0
/
NoteStack.h
56 lines (41 loc) · 1.01 KB
/
NoteStack.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* NoteStack.h
*
* Created on: Jan 28, 2014
* Author: edwinrietmeijer
*/
#ifndef NOTESTACK_H_
#define NOTESTACK_H_
#include <vector>
#include <algorithm>
#include <iomanip>
#include "CustomTypes.h"
namespace notestack {
class NoteStack {
private:
std::vector<int> noteStackPitches_;
std::vector<double> noteStackDurations_;
std::vector<double> noteStackVelocities_;
double longestDur_;
public:
NoteStack();
// Add a single note via pitch( int ), duration( double ), velocity( double )
void addNote( const int &, const double &, const double & );
// Get the duration of the longest note in the stack
const double & getLongestDur();
int getPitchVecSize();
int getDurVecSize();
int getVelVecSize();
int getPitch( int );
double getDuration( int );
double getVelocity( int );
int getLowestNoteIndex();
void merge( notestack::NoteStack * );
// Clear note stack
void clear();
// Dump noteStack to console
void dump();
virtual ~NoteStack();
};
} // namespace noteStack
#endif /* NOTESTACK_H_ */