0

I'm currently attempting to create a vectorscope that analyzes realtime audio in Javascript using the Web Audio API. The API allows access to the current frequency data and time domain data. I have already recreated lissajous figures using simple values for the a and b variables in the following equations:

var x = A*sin(a*t);
var y = B*sin(b*t);

Where A & B are the amplitudes, a & b are the frequencies, and t is time (which I obtain with performance.now() ).

My issue is that I'm not sure how to implement the data from the Byte Frequency Data and the Byte Time Domain Data from the Web Audio API into the equations above. In my code I have two oscillators that are stereo-detuned to one another (to highlight phase correlation) which are fed into two analyzers (one for the left channel and one for the right). From both of the analyzers I can extract data with the methods getByteFrequencyData() and getByteTimeDomainData(). Both of these methods return a Uint8 array of the requested data. I currently iterate through the buffers from the analyzers and apply the contained data to the equations above during each iteration. The result is a mess of lines, albeit on an X/Y graph.

If anyone has any idea on how to translate the frequency and time domain data into usable values for the variables of the two equations I would greatly appreciate it. Cheers!

1 Answer 1

1

I posted this over at the Sound Design StackExchange and received a helpful answer: https://sound.stackexchange.com/questions/35737/programming-a-vectorscope

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.