synthberry
Software MIDI synthesizer for the Raspberry Pi.
 All Classes Functions
notes.h
1 #ifndef NOTES_H
2 #define NOTES_H
3 
4 #include <vector>
5 #include <cstdint>
6 #include "note.h"
7 #include "inoteobservable.h"
8 #include "inoteobserver.h"
9 
10 class Notes : public INoteObservable
11 {
12 public:
13  Notes();
14  ~Notes();
15  void addNote(uint8_t pitch, uint8_t velocity);
16  void removeNote(uint8_t pitch);
17  const std::vector<Note> getNotes() const;
18  void registerObserver(PNoteObserver &observer);
19  void removeObserver(PNoteObserver &observer);
20 
21 private:
22  std::vector<Note> notes;
23  std::vector<PNoteObserver> observers;
24 };
25 
26 #endif // NOTES_H