-
Notifications
You must be signed in to change notification settings - Fork 0
/
MidiChannel.h
34 lines (28 loc) · 822 Bytes
/
MidiChannel.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
//
// Created by madsy on 22.03.17.
//
#ifndef MIDITEST_MIDICHANNEL_H
#define MIDITEST_MIDICHANNEL_H
#include <vector>
#include <memory>
#include "MidiEvent.h"
class MidiFile;
class MidiChannel {
friend class MidiFile;
public:
MidiChannel();
~MidiChannel();
std::vector<std::shared_ptr<MidiEvent>> getEventsWithinInterval(unsigned int startTick, unsigned int endTick) const;
unsigned int getStartTick() const;
unsigned int getEndTick() const;
void update();
const std::vector<std::shared_ptr<MidiEvent>>& getEvents() const;
void addEvent(const std::shared_ptr<MidiEvent>& evt);
private:
void sort();
std::vector<std::shared_ptr<MidiEvent>> pEvents;
unsigned int pChannelIndex;
unsigned int pStartTick;
unsigned int pEndTick;
};
#endif //MIDITEST_MIDICHANNEL_H