Mercurial > hg > midi-score-follower
comparison hackday/testApp.h @ 27:fa1890efa044
close to final version on HackDay
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Sun, 04 Dec 2011 14:30:33 +0000 |
parents | 179365726f07 |
children | be2e779d76b5 |
comparison
equal
deleted
inserted
replaced
26:179365726f07 | 27:fa1890efa044 |
---|---|
27 #include <iostream> | 27 #include <iostream> |
28 #include "midiEventHolder.h" | 28 #include "midiEventHolder.h" |
29 #include "ofxMidiIn.h" | 29 #include "ofxMidiIn.h" |
30 #include "ofxOsc.h" | 30 #include "ofxOsc.h" |
31 #include "MidiInputStream.h" | 31 #include "MidiInputStream.h" |
32 | 32 #include "ofxArgs.h" |
33 | 33 |
34 #define PORT 12121 | 34 #define PORT 12121 |
35 #define SEND_PORT 5282 | 35 #define SEND_PORT 5282 |
36 #define HOST "localhost" | 36 #define HOST "localhost" |
37 | 37 |
38 | 38 |
39 using namespace std; | 39 using namespace std; |
40 using namespace MIDIConstants; | 40 using namespace MIDIConstants; |
41 | 41 |
42 class testApp : public ofBaseApp{ | 42 class testApp : public ofBaseApp{ |
43 private: | |
44 ofxArgs* args; | |
45 string option1, option2; | |
46 bool flag1; | |
47 ofxOscReceiver receiver; | |
48 ofxOscSender sender; | |
49 | |
50 public: | |
51 testApp(ofxArgs* args); | |
43 | 52 |
44 public: | |
45 void setup(); | 53 void setup(); |
46 void update(); | 54 void update(); |
47 void draw(); | 55 void draw(); |
48 | 56 |
49 void keyPressed (int key); | 57 void keyPressed (int key); |
65 | 73 |
66 midiEventHolder midiEvents; | 74 midiEventHolder midiEvents; |
67 | 75 |
68 int cannamMainFunction(); | 76 int cannamMainFunction(); |
69 string midiFileName; | 77 string midiFileName; |
70 | 78 std::string museScoreFilename; |
79 | |
71 bool playing; | 80 bool playing; |
72 //drawMidiNotes drawer; | 81 //drawMidiNotes drawer; |
73 | 82 |
74 // BayesianArrayStructure bayesStruct; | 83 // BayesianArrayStructure bayesStruct; |
75 | 84 |
103 double timePlayed; | 112 double timePlayed; |
104 int transpose; | 113 int transpose; |
105 int lastScoreIndexSent; | 114 int lastScoreIndexSent; |
106 int lastMeasureSent; | 115 int lastMeasureSent; |
107 double performanceRating; | 116 double performanceRating; |
108 private: | 117 void sendNoteDataByOsc(const int& pitch, const int& ticks); |
109 ofxOscReceiver receiver; | |
110 ofxOscSender sender; | |
111 | 118 |
119 ofTrueTypeFont verdana30; | |
120 int midiPort; | |
121 std::string midiPortName; | |
112 | 122 |
113 }; | 123 }; |
114 | 124 |
115 #endif | 125 #endif |