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