Output current time of running buffer

    Jan 29 2010 | 2:46 am
    Hi all,
    How can I get the current time of a buffer~ while I am playing through it using groove~? The rightmost outlet gives me a normalized time from 0 to 1... but how can I simply get the time that it is at at any given moment? Seems like this should be easy to do but neither play~ nor groove~ seem to spit this out.

    • Jan 29 2010 | 2:51 am
      just multiply the normalized 0-1 by the length of the buffer, voila buffer time.
    • Jan 29 2010 | 3:02 am
      The problem is I start groove~ at a different start time sometimes and it still goes from 0 to 1. I know I can do some complex logic like (start time in ms) + (normalized 0-1)*(length buffer minus start time) or something but I was hoping there'd be a much simpler way to do so, particularly because this application I'm building might be CPU-intensive with a lot of buffers and I want to keep unnecessary calculation steps to a minimum... Isn't there an easier way? Or an alternative to groove~?
    • Jan 29 2010 | 3:29 am
      does it have to be buffer~ based? sfplay~ does exactly what you want...
    • Jan 29 2010 | 7:09 am
      perfect, thank you.