annotate src/testApp.h @ 52:13194a9dca77 tip

Added exporting of image and text data
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Tue, 17 Jul 2012 22:13:10 +0100
parents 5581023e0de4
children
rev   line source
andrew@0 1 #ifndef _TEST_APP
andrew@0 2 #define _TEST_APP
andrew@0 3
andrew@0 4
andrew@0 5 //midieventholder - newMidiEvents() sent there
andrew@0 6 //create cannamMidiLoader for cannamMainfunction
andrew@0 7
andrew@0 8
andrew@0 9 //check new prior offset function - how is used?
andrew@0 10
andrew@0 11
andrew@0 12
andrew@0 13 //check the widening function - adding decay noise
andrew@0 14 //ticksperscreen could be better as millis per screen
andrew@0 15
andrew@0 16
andrew@0 17
andrew@2 18 //uses ftmMidiPlay in max5 via osc to communicate notes in
andrew@0 19
andrew@0 20 #include "ofMain.h"
andrew@0 21
andrew@0 22 #include "MIDIFileReader.h"
andrew@0 23 #include "ofxFileDialogOSX.h"
andrew@0 24 #include "drawMidiNotes.h"
andrew@0 25 #include "DynamicBayesianArray.h"
andrew@2 26 #include "CannamMidiFileLoader.h"
andrew@0 27 #include <iostream>
andrew@0 28 #include "midiEventHolder.h"
andrew@0 29
andrew@0 30 #include "ofxOsc.h"
andrew@0 31 #define PORT 12121
andrew@0 32
andrew@0 33 using namespace std;
andrew@0 34 using namespace MIDIConstants;
andrew@0 35
andrew@0 36 class testApp : public ofBaseApp{
andrew@0 37
andrew@0 38 public:
andrew@0 39 void setup();
andrew@0 40 void update();
andrew@0 41 void draw();
andrew@0 42
andrew@0 43 void keyPressed (int key);
andrew@0 44 void keyReleased(int key);
andrew@0 45 void mouseMoved(int x, int y );
andrew@0 46 void mouseDragged(int x, int y, int button);
andrew@0 47 void mousePressed(int x, int y, int button);
andrew@0 48 void mouseReleased(int x, int y, int button);
andrew@0 49 void windowResized(int w, int h);
andrew@0 50
andrew@0 51 void startPlaying();
andrew@0 52 void stopPlaying();
andrew@0 53 bool getFilenameFromDialogBox(string* fileNameToSave);
andrew@0 54
andrew@0 55 typedef std::vector<int> IntVector;
andrew@0 56 typedef std::vector<double> DoubleVector;
andrew@0 57 // typedef std::vector<IntVector> IntMatrix;
andrew@0 58 IntVector v;
andrew@0 59
andrew@0 60 midiEventHolder midiEvents;
andrew@0 61
andrew@0 62 int cannamMainFunction();
andrew@0 63 string midiFileName;
andrew@0 64
andrew@0 65 bool playing;
andrew@0 66 //drawMidiNotes drawer;
andrew@0 67
andrew@0 68 // BayesianArrayStructure bayesStruct;
andrew@0 69
andrew@0 70 int screenWidth, screenHeight;
andrew@2 71 CannamMidiFileLoader fileLoader;
andrew@0 72
andrew@0 73 private:
andrew@0 74 ofxOscReceiver receiver;
andrew@0 75
andrew@2 76
andrew@2 77
andrew@0 78 };
andrew@0 79
andrew@0 80 #endif