Mercurial > hg > precise-onset-detection
annotate ofxPreciseOnsetDetectorOffline/PointerOnsetVisualiser.h @ 8:184a7c232049 tip
changed files since updating computer
author | Venetian |
---|---|
date | Thu, 14 Aug 2014 17:53:57 +0100 |
parents | b1c13e8bec26 |
children |
rev | line source |
---|---|
andrew@6 | 1 /* |
andrew@6 | 2 * PointerOnsetVisualiser.h |
andrew@6 | 3 * GreenOnionsMidiBeatApp |
andrew@6 | 4 * |
andrew@6 | 5 * Created by Andrew on 14/01/2014. |
andrew@6 | 6 * Copyright 2014 QMUL. All rights reserved. |
andrew@6 | 7 * |
andrew@6 | 8 */ |
andrew@6 | 9 |
andrew@6 | 10 //only change with pointer_onset_vis - it follows a NON-POINTER PreciseOnsetVisualiser |
andrew@6 | 11 |
andrew@6 | 12 #ifndef POINTER_ONSET_VISUALISER |
andrew@6 | 13 #define PPOINTER_ONSET_VISUALISER |
andrew@6 | 14 |
andrew@6 | 15 #include "PreciseOnsetDetectorOffline.h" |
andrew@6 | 16 |
andrew@6 | 17 #include "ofxWindowRegion.h" |
Venetian@7 | 18 #include "ofxPlotOnsetFunction.h" |
andrew@6 | 19 |
andrew@6 | 20 class PointerOnsetVisualiser{ |
andrew@6 | 21 public: |
andrew@6 | 22 PointerOnsetVisualiser(); |
andrew@6 | 23 ~PointerOnsetVisualiser(); |
andrew@6 | 24 |
andrew@6 | 25 void newFile(); |
andrew@6 | 26 void update(); |
andrew@6 | 27 void draw(); |
andrew@6 | 28 double positionSeconds(); |
andrew@6 | 29 double windowWidth(); |
andrew@6 | 30 |
andrew@6 | 31 void mousePressed(int& x, int& y); |
andrew@6 | 32 void togglePlay(); |
andrew@6 | 33 void stop(); |
andrew@6 | 34 |
andrew@6 | 35 void resetWindow(); |
andrew@6 | 36 void cropStart(); |
andrew@6 | 37 void cropEnd(); |
andrew@6 | 38 void cropStartSeconds(double& val); |
andrew@6 | 39 void cropEndSeconds(double& val); |
andrew@6 | 40 |
andrew@6 | 41 void zoomIn(); |
andrew@6 | 42 void zoomOut(); |
andrew@6 | 43 |
andrew@6 | 44 void scrollLeft(); |
andrew@6 | 45 void scrollRight(); |
andrew@6 | 46 void checkPosition(); |
andrew@6 | 47 |
andrew@6 | 48 //ew fn |
andrew@6 | 49 void setSoundPositionSeconds(double position); |
andrew@6 | 50 //vars |
andrew@6 | 51 PreciseOnsetDetectorOffline* pod; |
andrew@6 | 52 ofSoundPlayer soundPlay; |
andrew@6 | 53 bool paused; |
andrew@6 | 54 // void drawOnsets(DoubleVector& onsetTimesSeconds, ofxWindowregion& window, double startTime, double endTime); |
andrew@6 | 55 |
andrew@6 | 56 ofxWindowRegion window; |
Venetian@7 | 57 ofxPlotOnsetFunction plotter; |
andrew@6 | 58 |
andrew@6 | 59 //this is the only change with pointer_onset_vis - it follows a NON-POINTER PreciseOnsetVisualiser |
andrew@6 | 60 double *windowStart; |
andrew@6 | 61 double *windowEnd; |
andrew@6 | 62 double *windowPress; |
andrew@6 | 63 }; |
andrew@6 | 64 #endif |