annotate jnmr/drawMidiNotes.h @ 52:13194a9dca77 tip

Added exporting of image and text data
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Tue, 17 Jul 2012 22:13:10 +0100
parents fa527df85c2c
children
rev   line source
andrew@33 1 /*
andrew@33 2 * drawMidiNotes.h
andrew@33 3 * midiCannamReader
andrew@33 4 *
andrew@33 5 * Created by Andrew on 17/07/2011.
andrew@33 6 * Copyright 2011 QMUL. All rights reserved.
andrew@33 7 *
andrew@33 8 */
andrew@33 9
andrew@33 10
andrew@33 11 #include "ofMain.h"
andrew@33 12
andrew@33 13 class drawMidiNotes{
andrew@33 14 public:
andrew@33 15 drawMidiNotes();
andrew@33 16 void updatePlayPosition();
andrew@33 17
andrew@33 18 typedef std::vector<double> DoubleVector;
andrew@33 19 typedef std::vector<DoubleVector> DoubleMatrix;
andrew@33 20
andrew@33 21 DoubleMatrix beatPeriodMatrix;
andrew@33 22
andrew@33 23 typedef std::vector<int> IntVector;
andrew@33 24 typedef std::vector<IntVector> IntMatrix;
andrew@33 25
andrew@33 26 void drawFile(const IntMatrix& noteOnMatrix);
andrew@33 27 void reset();
andrew@33 28
andrew@33 29 int ticksPerScreen;
andrew@33 30 int tickLocation;
andrew@33 31 int noteArrayIndex;
andrew@33 32
andrew@33 33 int noteMinimum, noteMaximum;
andrew@33 34 int screenWidth, screenHeight;
andrew@33 35 float noteHeight;
andrew@33 36 float tempo;
andrew@33 37 double period;
andrew@33 38 int pulsesPerQuarternote;
andrew@33 39 double lastPeriodUpdateTime;
andrew@33 40
andrew@33 41
andrew@33 42 };