Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
 All Classes Files Functions Variables Typedefs Macros Groups

GUI graph

New GUI fuctionality for Bela!

Is this project you can find a sketch.js file which is a p5.js file that is rendered in a browser tab. Click the GUI button (next to the Scope button) in the IDE to see the rendering of this file.

This example sends voltage readings from one of the analog inputs in Bela and the corresponding timestamp (in milliseconds) to be represented as a graph in the browser. Buffers are sent with id 0 and 1 corresponding to the timestamps and the voltage respectively: gui.sendBuffer(0, gTimestamps); gui.sendBuffer(1, gVoltage);

The p5.js file displays the received data in a graph using a library called grafica.js The graph will be updated with new values until the page is refreshed, Pressing the space bar will stop the auto scrolling and allow to scroll manually and zoom in to se the values of the different points. Pressing the space bar again will resume the auto scrolling.

If you want to edit sketch.js you can do so in the browser but must write your p5.js code in instance mode.