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