I am writing an application in which a user can record their MIDI commands while DJing a set. I am wondering how to deal with a recording that could be several hours long, uninterrupted.
First of all, the MidiFile class seems to only let you write a MidiFile all at once, meaning that several hours’ worth of MIDI commands would have to be stored in memory until the very end (when the user stops recording). For obvious reasons, I’d much rather write to the MIDI file as the MIDI commands are received, similar to how a long audio file might be recorded. Is there no way to do this?
Second, I noticed in the MidiFile::readFrom function that there is a line which reads:
const int maxSensibleMidiFileSize = 2 * 1024 * 1024;
Any reason for this? It might prevent my users from loading large files.
Just to clarify, I have already succeeded in writing/reading small MIDI files, so my question is just about very large files. Thanks for any insights.
