VU levels in JSON for sources and outputs
API
-
For example: 50 values, each for a 1/10 second slice of audio, covering the last 5 seconds.
- But can use whatever rate is easiest, considering CPU load and audio sample rate.
-
In the format of key:values, where each key is a timestamp.
- Timestamps allow us to combine the results from each query to smooth out irregularly-timed requests. Rather than having to query it every X seconds precisely, we can instead use front-end JavaScript to merge any duplicate/overlapping values across each response, so that it doesn't repeat any level values when animating the meter.
-
Using
levels
for the property name is just an idea. We can use whatever term is best here. Open to suggestions.
Example
"levels": {
"2018-09-15T15:53:00.000+00:00": 0.3514,
"2018-09-15T15:53:00.100+00:00": 0.5134,
"2018-09-15T15:53:00.200+00:00": 0.6542,
"2018-09-15T15:53:00.300+00:00": 0.8713,
...
}
Edited by Travis