view src/drawMidiNotes.h @ 5:195907bb8bb7

added purple where notes have been seen - lets you see what updates have been used. Also the chopping of midi files to the beginning was introduced recently, so when they load, you chop any white space at the beginning, then use first note to launch.
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Fri, 19 Aug 2011 16:38:30 +0100
parents b299a65a3ad0
children
line wrap: on
line source
/*
 *  drawMidiNotes.h
 *  midiCannamReader
 *
 *  Created by Andrew on 17/07/2011.
 *  Copyright 2011 QMUL. All rights reserved.
 *
 */


#include "ofMain.h"

class drawMidiNotes{
public:
	drawMidiNotes();
	void updatePlayPosition();
	
	typedef std::vector<double> DoubleVector;
	typedef std::vector<DoubleVector> DoubleMatrix;
	
	DoubleMatrix beatPeriodMatrix;
	
	typedef std::vector<int> IntVector;
	typedef std::vector<IntVector> IntMatrix;
	
	void drawFile(const IntMatrix& noteOnMatrix);
	void reset();
	
	int ticksPerScreen;
	int tickLocation;
	int noteArrayIndex;
	
	int noteMinimum, noteMaximum;
	int screenWidth, screenHeight;
	float noteHeight;
	float tempo;
	double period;
	int pulsesPerQuarternote;
	double lastPeriodUpdateTime;
					 
	
};