PageRenderTime 39ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/prototype2/src/testApp.h

https://github.com/bayks475/Final-Project
C Header | 93 lines | 55 code | 31 blank | 7 comment | 0 complexity | 720d9a0179fc2dbf66ff6ce83a1d7ad9 MD5 | raw file
  1. #pragma once
  2. #include "ofMain.h"
  3. #include "ofxOpenCv.h"
  4. #define NUM_STRIPS 10
  5. class testApp : public ofBaseApp{
  6. public:
  7. void setup();
  8. void update();
  9. void draw();
  10. void keyPressed (int key);
  11. void keyReleased(int key);
  12. void mouseMoved(int x, int y );
  13. void mouseDragged(int x, int y, int button);
  14. void mousePressed(int x, int y, int button);
  15. void mouseReleased(int x, int y, int button);
  16. void windowResized(int w, int h);
  17. void dragEvent(ofDragInfo dragInfo);
  18. void gotMessage(ofMessage msg);
  19. bool bTakeSnapshot;
  20. //video
  21. ofVideoGrabber video;
  22. int videoW;
  23. int videoH;
  24. int t;
  25. int blur;
  26. //slitscan
  27. int maxBufferFrames;
  28. int stripHeight;
  29. vector<ofTexture> frameBuffers;
  30. int frameDelay[NUM_STRIPS];
  31. //opencv
  32. ofxCvColorImage colorVideo;
  33. ofxCvGrayscaleImage grayVideo;
  34. ofxCvGrayscaleImage background;
  35. ofxCvGrayscaleImage diffVideo;
  36. //blob
  37. ofxCvContourFinder contourVideo;
  38. float twp;
  39. float wpp;
  40. //sound
  41. void audioOut(float * output, int bufferSize, int nChannels);
  42. ofSoundStream soundStream;
  43. float pan;
  44. int sampleRate;
  45. bool bNoise;
  46. float volume;
  47. vector <float> lAudio;
  48. vector <float> rAudio;
  49. //------------------- for the simple sine wave synthesis
  50. float targetFrequency;
  51. float phase;
  52. float phaseAdder;
  53. float phaseAdderTarget;
  54. //should be an object
  55. vector < float > phases;
  56. vector < float > phaseAdders;
  57. vector < float > phaseAdderTargets;
  58. vector < float > curRecording;
  59. vector < vector < float > > recordings;
  60. float duration;
  61. float startTime;
  62. };