This isn't a question. Hopefully it's an answer for some of you!
People commonly ask how to synchronize audio and video output from a Processing sketch. I've seen some of the hacks to make this work using Minim. If you use Beads to play your audio, then the solution is much simpler. I'd like to share my solution here.
I've tried many, many, many solutions to this problem, including screen capture software, and even hardware devices. If you want to capture video in a resolution that is higher than a standard DVD, then this is the best solution, as far as I know.
It's also easy and free, as long as you're willing to use Beads rather than Minim (Beads is superior in many ways anyway imho).
The main caveat to this code is that
it does slow down sketch execution. Screen capture utilities cause the same problem, AND they often cause glitches in the audio stream. One benefit to this solution is that
even if glitches occur in your audio stream due to the rendering process, they won't be captured in the rendered output. In other words, the output will be glitch-free, even if it doesn't sound that way when rendering.
Also, I should note that I have to significantly lower my sketch resolution to get satisfactory results. On a simple sketch, I might be able to render at 1280x720, but
on most sketches, I have to render at 800x600 at only 12 frames per second. This is a significant trade-off, but the frame rate is consistent and the audio comes out glitch free. Again, this can't be said about screen-capture utilities, and the rendered output is satisfactory for sharing online, or even on a DVD.
I just wanted to let everyone know about my new book about Processing/Beads. It is aimed at visual artists who might not be familiar with Processing's power as a multimedia art platform. It is available as a free pdf, as well as in print and Kindle formats from Amazon. It demonstrates the standard sound art arsenal, including examples on synthesis, sampling, I/O, filters, granulation .... etc. All the examples are written for the Beads Library in Processing.