andrew@33: /* andrew@33: * drawMidiNotes.h andrew@33: * midiCannamReader andrew@33: * andrew@33: * Created by Andrew on 17/07/2011. andrew@33: * Copyright 2011 QMUL. All rights reserved. andrew@33: * andrew@33: */ andrew@33: andrew@33: andrew@33: #include "ofMain.h" andrew@33: andrew@33: class drawMidiNotes{ andrew@33: public: andrew@33: drawMidiNotes(); andrew@33: void updatePlayPosition(); andrew@33: andrew@33: typedef std::vector DoubleVector; andrew@33: typedef std::vector DoubleMatrix; andrew@33: andrew@33: DoubleMatrix beatPeriodMatrix; andrew@33: andrew@33: typedef std::vector IntVector; andrew@33: typedef std::vector IntMatrix; andrew@33: andrew@33: void drawFile(const IntMatrix& noteOnMatrix); andrew@33: void reset(); andrew@33: andrew@33: int ticksPerScreen; andrew@33: int tickLocation; andrew@33: int noteArrayIndex; andrew@33: andrew@33: int noteMinimum, noteMaximum; andrew@33: int screenWidth, screenHeight; andrew@33: float noteHeight; andrew@33: float tempo; andrew@33: double period; andrew@33: int pulsesPerQuarternote; andrew@33: double lastPeriodUpdateTime; andrew@33: andrew@33: andrew@33: };