diff hackday/MidiInputStream.h @ 24:5a11b19906c7

hackday code is added.
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Sat, 03 Dec 2011 17:19:43 +0000
parents
children 179365726f07
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hackday/MidiInputStream.h	Sat Dec 03 17:19:43 2011 +0000
@@ -0,0 +1,47 @@
+/*
+ *  MidiInputStream.h
+ *  MuseScoreMidiFollower
+ *
+ *  Created by Andrew on 03/12/2011.
+ *  Copyright 2011 QMUL. All rights reserved.
+ *
+ */
+
+#ifndef MIDI_INPUT_STREAM
+#define MIDI_INPUT_STREAM
+
+#include "ofMain.h"
+#include "ofxMidi.h"
+#include "midiEventHolder.h"
+//WOULD BE GOOD TO USE STD CONSTANTS here
+//#include "MIDIFileReader.h"
+//using namespace MIDIConstants;
+
+class MidiInputStream{
+	
+public:
+	MidiInputStream();
+	bool noteInReceived(ofxMidiEventArgs &args);
+	void reset();
+	void printNotes();
+	int endNote(int notePitch);	
+	
+	typedef std::vector<int> IntVector;
+	typedef std::vector<IntVector> IntMatrix;
+
+	typedef std::vector<double> DoubleVector;
+	DoubleVector eventTimesForNote;
+	
+	IntMatrix midiInputEvents;
+	DoubleVector midiInputTimes;
+	IntVector v;
+
+	double* startTime;
+	midiEventHolder* eventHolder;
+	
+	int* transposeVal;
+	
+	double* factor;
+	
+};
+#endif