diff hackday/drawMidiNotes.h @ 28:49a5b023df1e

Hackday files comitted - version as demo'd at London hackday
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Mon, 05 Dec 2011 07:00:47 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hackday/drawMidiNotes.h	Mon Dec 05 07:00:47 2011 +0000
@@ -0,0 +1,42 @@
+/*
+ *  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;
+					 
+	
+};
\ No newline at end of file