I am having an issue with a processing sketch I'm working on, which is going to be used as the GUI for a children's music software program.
I am trying to implement an area where the user can draw in musical motives freely. I can get processing to display and draw into a sketch, much like the way it is described in one of the "Learning" topics at processing.org. However, this only works if you are drawing straight onto the background of the sketch, and you declare the background color in the setup() block of the sketch. What I want to do is have the user draw onto a musical timeline area constructed from a object class that very basically draws the rect() for the drawing area and then marks out the 4 measures where the user can draw in their musical motive.
I've tried calling the display method of the object from the setup() block, but the problem here is that I have other objects that are displayed to encapsulate the entire program (visually), and also encapsulate certain sections of the window (again, visually).
I thought that perhaps drawing into a PGraphics buffer would solve this, but this still draws the "drawing area" rect() over the user drawn lines.
I'm hoping there is a solution (and I would not be surprised if it is a very basic solution) to this issue. If there isn't a work around, I may have to look into a layer drawing library I found around the internet; however this seems like it might require me to rewrite a good portion of my code, which is something I'm trying to avoid.
Thanks,
Travis
1