diff hackday/CannamMidiFileLoader.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 2a025ea7c793
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hackday/CannamMidiFileLoader.h	Sat Dec 03 17:19:43 2011 +0000
@@ -0,0 +1,39 @@
+/*
+ *  CannamMidiFileLoader.h
+ *  midi-score-follower
+ *
+ *  Created by Chris Cannam on 19/08/2011.
+ *  Copyright 2011 QMUL. All rights reserved.
+ *
+ */
+
+#ifndef CANNAM_MIDI_FILE_LOADER
+#define  CANNAM_MIDI_FILE_LOADER
+
+#include "MIDIFileReader.h"
+//#include "MIDIEvent.h"
+#include "midiEventHolder.h"
+using namespace MIDIConstants;
+
+class CannamMidiFileLoader{
+	
+public:
+	CannamMidiFileLoader();
+	
+	int loadFile(std::string& filename, midiEventHolder& myMidiEvents);
+
+	void createEventTiming( midiEventHolder& myMidiEvents);
+	void setTempoFromMidiValue(long tempo,  midiEventHolder& myMidiEvents);
+	double firstNoteTime;
+	int firstTickTime;
+	bool chopBeginning;
+	
+	typedef std::vector<int> IntVector;
+	IntVector v;
+	int noteOnIndex;
+	
+	
+	bool printMidiInfo;
+	
+};
+#endif
\ No newline at end of file