Re: Input buffer's time coordinate

Hi Akira,

I had the same problem a while ago. For this I find a hack, which works
well in Chrome but not in Firefox (at the time there was a bug I think with
ChannelMergerNode which was causing a problem there, but now maybe it is
fixed?). You can find the code there :
https://github.com/WhojamLab/WAARecorderNode/blob/master/lib/TimeTaggedScriptProcessorNode.js

The basic idea is to use a BufferSourceNode playing a ramp - which is
basically your timeline - and merge that audio signal with the signal you
want to send to your ScriptProcessorNode. That way you both the signal you
are interested in AND the timeline which gives you a precise time tag for
each sample of your signal.

I could also package this as a separate library, but considering that
things are going to change soon enough, and ScriptProcessorNode will
disappear, and these problems of unpredictable latency should disappear
with it (will they?)
 ... it is probably not worth ...

Cheers

On Sun, Nov 1, 2015 at 7:26 AM, Akira Sawada <aklaswad@gmail.com> wrote:

> Hi group,
>
> I'm writing an audioParam automation editor (
> http://aklaswad.github.io/alligata/envelope/ ) and using scriptProcessor
> as simple peek meter in it.
>
> So, I want to know the exact time the samples in inputBuffer was processed
> for.
> Those input samples could have an information about context based time
> coordinate because they're also processed on top of the time coordinate.
>
> Is there a way to know that?
>
> thanks.
>
> --
> 澤田 哲 / Akira Sawada / aklaswad
>
> email me: aklaswad@gmail.com
> visit me: http://blog.aklaswad.com/
>



-- 

*Sébastien Piquemal*

 -----* @sebpiq*
 ----- http://github.com/sebpiq
 ----- http://funktion.fm

Received on Sunday, 1 November 2015 15:10:44 UTC