Quantcast

Accurate time inside drawFunc?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Accurate time inside drawFunc?

Patrick McGraw
Hi, I'm trying to find a way to create animated drawing based on the waveform in a buffer (essentially a customized oscilloscope trace) with accurate timing, i.e., I'm not necessarily that concerned about short-term jitter at or around the frame rate, but I do want the animation to reflect accurately the timing of my recorded sound and not, for example, get slowed down if the actual frame rate falls below nominal.  I would also like to display an accurately updating time string in the window.  It seems like I need the drawFunc to have access to the current output of a running Sweep UGen whenever the drawFunc is called, in order to read from the correct position in the buffer based on the actual elapsed time.   Any suggestions on how to do this?  Does the whole UserView need to be inside a synth somehow?  There was another thread about using SendTrig or SendReply to pass information from a synth to the client and in particular to a drawing function, but I'm not sure if that's the way to do things in this case.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Accurate time inside drawFunc?

Nathan Ho
Patrick McGraw wrote
Hi, I'm trying to find a way to create animated drawing based on the waveform in a buffer (essentially a customized oscilloscope trace) with accurate timing, i.e., I'm not necessarily that concerned about short-term jitter at or around the frame rate, but I do want the animation to reflect accurately the timing of my recorded sound and not, for example, get slowed down if the actual frame rate falls below nominal.  I would also like to display an accurately updating time string in the window.  It seems like I need the drawFunc to have access to the current output of a running Sweep UGen whenever the drawFunc is called, in order to read from the correct position in the buffer based on the actual elapsed time.   Any suggestions on how to do this?  Does the whole UserView need to be inside a synth somehow?  There was another thread about using SendTrig or SendReply to pass information from a synth to the client and in particular to a drawing function, but I'm not sure if that's the way to do things in this case.
Hi Patrick,

Sorry, but this post is in the wrong place. This should go in the "SuperCollider Users New (Use this!!!!)" subforum.


Nathan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Accurate time inside drawFunc?

Patrick McGraw

Oops!  If the solution I just thought of doesn't work, then I'll try reposting in the right place.  Patrick 




From: Nathan Ho [via New SuperCollider Mailing Lists Forums (Use These!!!)] <ml+[hidden email]>
Sent: Tuesday, May 9, 2017 12:55 PM
To: Patrick McGraw
Subject: Re: Accurate time inside drawFunc?
 
Patrick McGraw wrote
Hi, I'm trying to find a way to create animated drawing based on the waveform in a buffer (essentially a customized oscilloscope trace) with accurate timing, i.e., I'm not necessarily that concerned about short-term jitter at or around the frame rate, but I do want the animation to reflect accurately the timing of my recorded sound and not, for example, get slowed down if the actual frame rate falls below nominal.  I would also like to display an accurately updating time string in the window.  It seems like I need the drawFunc to have access to the current output of a running Sweep UGen whenever the drawFunc is called, in order to read from the correct position in the buffer based on the actual elapsed time.   Any suggestions on how to do this?  Does the whole UserView need to be inside a synth somehow?  There was another thread about using SendTrig or SendReply to pass information from a synth to the client and in particular to a drawing function, but I'm not sure if that's the way to do things in this case.
Hi Patrick,

Sorry, but this post is in the wrong place. This should go in the "SuperCollider Users New (Use this!!!!)" subforum.


Nathan



To unsubscribe from Accurate time inside drawFunc?, click here.
NAML
Loading...