Monitoring updating directory for image for GUI

ciscorucinski at gmail.com ciscorucinski at gmail.com
Fri Feb 8 01:48:00 CET 2013


Real-time...as close to real-time as possible. That is why I did not really want to use a queue. That is because if a bunch of the thread that create the images finish really close to one another (when they should be spread out based on how the music is played), then there would be a larger "lag" in the display. So displaying only the most recent image is preferred. 

That is why I though Stack...but then that might mean that older images will replace newer ones.

The Workflow is as such:

1) Music is analyzed and streamed to the program. Note-by-Note.
2) The note is grabbed (same way as a Java Scanner class)
3) A new thread is created to call an OS command (Lilypond command)
   a) Thread waits until command is finished, and Lilypond creates an image that I can define the filename for in a directory.

>From here I want only the latest one (as close to the latest one at least) to be displayed to the gtkImage object in the GUI

I set up a class that would act as a directory monitor (just stubbed)...that would do all the work I am asking for here

Also, don't think this matters much, but I am using Windows (I seen someone mention Linux)



More information about the Python-list mailing list