My program is constantly collecting data into an array of five objects with two values each: "label" which is a string and "confidence" which is a float:
[{"label": vocals, "confidence": 0.98373},{"label": snare, "confidence": 0.32738}...]
This is how teachable machine audio model stores the data.
I'm trying to change the height of 5 rectangles with the same label names according to the confidence value of each item in the array but I'm having a hard time trying to read and display this data simultaneously, as the order of each label and it's confidence value will change every second or so.
The program is supposed to be an audio visualizer that is supposed to display the loudness(confidence value) of each instrument at the same time. I can only think of iterative implementations that would only display one value at a time.