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