Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Synchronizing sound and graphics: drawing commands need "flushing"?

$
0
0

I draw a background then several circles using ellipse(). I want to create a sound synchronized with the appearance of each circle. In a test of the circle-building loop, each call to ellipse() is immediately followed by calls to wave.patch(out); delay(250); wave.unpatch(out); delay(250);.

What happens is the background is drawn, the sound sequence is executed in a series of beeps while only the background is showing, then the set of circles is drawn.

I suspect the graphics commands are stacked up or queued and, despite code sequencing, are not executed until the sound functions are carried out. I would like to force each circle to be drawn individually and its associated sound heard at that time. Hints?


Viewing all articles
Browse latest Browse all 2896

Trending Articles