view 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
line wrap: on
line source
/*
 *  PointerOnsetVisualiser.h
 *  GreenOnionsMidiBeatApp
 *
 *  Created by Andrew on 14/01/2014.
 *  Copyright 2014 QMUL. All rights reserved.
 *
 */

//only change with pointer_onset_vis - it follows a NON-POINTER PreciseOnsetVisualiser

#ifndef POINTER_ONSET_VISUALISER
#define PPOINTER_ONSET_VISUALISER

#include "PreciseOnsetDetectorOffline.h"

#include "ofxWindowRegion.h"
#include "ofxPlotOnsetFunction.h"

class PointerOnsetVisualiser{
public:
	PointerOnsetVisualiser();
	~PointerOnsetVisualiser();
	
	void newFile();
	void update();
	void draw();
	double positionSeconds();
	double windowWidth();
	
	void mousePressed(int& x, int& y);
	void togglePlay();
	void stop();
	
	void resetWindow();
	void cropStart();
	void cropEnd();
	void cropStartSeconds(double& val);
	void cropEndSeconds(double& val);
	
	void zoomIn();
	void zoomOut();
	
	void scrollLeft();
	void scrollRight();
	void checkPosition();
	
	//ew fn
	void setSoundPositionSeconds(double position);
	//vars
	PreciseOnsetDetectorOffline* pod;
	ofSoundPlayer soundPlay;
	bool paused;
	//	void drawOnsets(DoubleVector& onsetTimesSeconds, ofxWindowregion& window, double startTime, double endTime);
	
	ofxWindowRegion window;
	ofxPlotOnsetFunction plotter;
	
	//this is the only change with pointer_onset_vis - it follows a NON-POINTER PreciseOnsetVisualiser
	double *windowStart;
	double *windowEnd;
	double *windowPress;
};
#endif