We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi there, I created this simple oscilloscope with point, and i try without result to use line to merge points, i understand i have to store the x,y points of the two stereo channels into an array but i don't understand how, could some one help me about?
Thanks a lot! Gianmaria
Answers
This is an example that demonstrates how to plot data points. the concept is that you store the data in a container and then you traverse the container from the first element to the before the last one (Not the last one). The reason is that you connect a point from the [current position] to the [current pos +1]. If you include the last position, then the algorithm would try to access the [last position+1] which generates an out of bounds exception. The code was a modification from a previous post: https://forum.processing.org/two/discussion/comment/88886#Comment_88886
I generate artificial data which then I process(extract) and plot. Notice I am not plotting x vs. y but I am plotting both x and y against (relative) time.
Kf