Mercurial > hg > midi-score-follower
comparison hackday/MidiInputStream.h @ 24:5a11b19906c7
hackday code is added.
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Sat, 03 Dec 2011 17:19:43 +0000 |
parents | |
children | 179365726f07 |
comparison
equal
deleted
inserted
replaced
23:032edf186a68 | 24:5a11b19906c7 |
---|---|
1 /* | |
2 * MidiInputStream.h | |
3 * MuseScoreMidiFollower | |
4 * | |
5 * Created by Andrew on 03/12/2011. | |
6 * Copyright 2011 QMUL. All rights reserved. | |
7 * | |
8 */ | |
9 | |
10 #ifndef MIDI_INPUT_STREAM | |
11 #define MIDI_INPUT_STREAM | |
12 | |
13 #include "ofMain.h" | |
14 #include "ofxMidi.h" | |
15 #include "midiEventHolder.h" | |
16 //WOULD BE GOOD TO USE STD CONSTANTS here | |
17 //#include "MIDIFileReader.h" | |
18 //using namespace MIDIConstants; | |
19 | |
20 class MidiInputStream{ | |
21 | |
22 public: | |
23 MidiInputStream(); | |
24 bool noteInReceived(ofxMidiEventArgs &args); | |
25 void reset(); | |
26 void printNotes(); | |
27 int endNote(int notePitch); | |
28 | |
29 typedef std::vector<int> IntVector; | |
30 typedef std::vector<IntVector> IntMatrix; | |
31 | |
32 typedef std::vector<double> DoubleVector; | |
33 DoubleVector eventTimesForNote; | |
34 | |
35 IntMatrix midiInputEvents; | |
36 DoubleVector midiInputTimes; | |
37 IntVector v; | |
38 | |
39 double* startTime; | |
40 midiEventHolder* eventHolder; | |
41 | |
42 int* transposeVal; | |
43 | |
44 double* factor; | |
45 | |
46 }; | |
47 #endif |