Mercurial > hg > midi-score-follower
comparison 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 |
comparison
equal
deleted
inserted
replaced
27:fa1890efa044 | 28:49a5b023df1e |
---|---|
1 /* | |
2 * drawMidiNotes.h | |
3 * midiCannamReader | |
4 * | |
5 * Created by Andrew on 17/07/2011. | |
6 * Copyright 2011 QMUL. All rights reserved. | |
7 * | |
8 */ | |
9 | |
10 | |
11 #include "ofMain.h" | |
12 | |
13 class drawMidiNotes{ | |
14 public: | |
15 drawMidiNotes(); | |
16 void updatePlayPosition(); | |
17 | |
18 typedef std::vector<double> DoubleVector; | |
19 typedef std::vector<DoubleVector> DoubleMatrix; | |
20 | |
21 DoubleMatrix beatPeriodMatrix; | |
22 | |
23 typedef std::vector<int> IntVector; | |
24 typedef std::vector<IntVector> IntMatrix; | |
25 | |
26 void drawFile(const IntMatrix& noteOnMatrix); | |
27 void reset(); | |
28 | |
29 int ticksPerScreen; | |
30 int tickLocation; | |
31 int noteArrayIndex; | |
32 | |
33 int noteMinimum, noteMaximum; | |
34 int screenWidth, screenHeight; | |
35 float noteHeight; | |
36 float tempo; | |
37 double period; | |
38 int pulsesPerQuarternote; | |
39 double lastPeriodUpdateTime; | |
40 | |
41 | |
42 }; |