Basics

Though the current version has been split into 3 functions, utilizing methods of the class Ebay, it still takes a large block of code to be executed (the main file consists of about 800 lines - some of them currently commented out).
Each time the program is started a function named base calling an infinite loop gets called. Within the loop the remote database at http://www.sound-of-ebay.com gets queried for new requests. If there is one a function named queryfunc gets called and the loop initiated by base is stopped.
queryfunc containes more or less all steps necessary to produce a song - from interpreting incoming data to converting the processed data into a score and rendering that into an audio-file (AIFF).
The method for rendering the audio-file takes a function which in the end renders the audio-file takes a function called ender which will first render the MP3 and sends it to http://www.sound-of-ebay.com. As soon as the MP3-rendering is done the procedure starts anew. This is important in order to avoid conflicts within parallel processes (e.g. conflicts resulting from varable-names which might exist twice as long as the generation-process is still running while another one has already been started) and especially because rendering of the AIFF and MP3 both take a high load on the CPU. Especially when there is a long queue of requests waiting parallel rendering would slow down or even overload the machine. Anyways I decided to be careful about this.
A complete generation usually takes about 5 minutes which seemed to me short enough.

Unless otherwise stated, the content of this page is licensed under GNU Free Documentation License.