javascriptweb-audio-api

getFloatTimeDomainData - What exactly does it return?


I can't find out what exactly getFloatTimeDomainData returns ie. what the range of possible values is and what those values are. The specs only say:

Copies the current down-mixed time-domain (waveform) data into the passed floating-point array.

The values returned seem to range between -1.60 to +1.60 but I can not find out what those values mean.


Solution

  • It shows how the signal changes with time

    The audio signal has a time-domain. The values in this domain significy how the audio signal is changing over time. (A derivative of the normal wave-equation).

    If a signal were to be constant, there would be no change in the audio signal so I'd suspect that the values returned would all be 0. The way it changes is given by that time-domain, you could then create a graph of it (which is oscillating usually).

    The values signify the change in amplitude of the signal. (of all the tracks combined, as is made clear by the statement that it is down-mixed.