Filesystem reads and writes take a long time and can pose problems for concurrent operations. The following cases should be dealt with before we release this application.
When a user uploads a file, it is stored in markovtunes/blarg.wav and then subsequently used in model generation. The aubio comprehension of the wav file is kept in markovtunes/blarg.txt. The aubio text output could be persisted in a database or discarded entirely once the information needed from it is extracted. Blarg.wav is important for re-constructing songs, but could posssibly be kept in session-independent locations.
The persisted pickled Markov model objects are kept in markovmodel/markovmodel.p. The text data of this file could be kept in a database instead.
The products of melody generation are kept in markovtunes/chopped.wav. These should instead be kept in memory and written directly into the responses to the client.
Filesystem reads and writes take a long time and can pose problems for concurrent operations. The following cases should be dealt with before we release this application.