[fix] Readme typo

This commit is contained in:
alban 2020-09-29 15:55:11 +02:00
parent 3e630dc26e
commit 91c8fb3c9b
1 changed files with 8 additions and 8 deletions

View File

@ -11,7 +11,7 @@ The idea is to share a single audio analysis to many Visual Jockey filters, in o
##### Each **word in bold** is a key which you can query the redis server for. Ex:
```
$ redis-cli get spectrum_10
$ redis-cli get spectrum_1
"[2.21, 0.56, 0.51, 0.32, 0.27, 0.21, 0.18, 0.17, 0.18, 0.23]"
```
@ -113,22 +113,22 @@ Redis_latency times are not considered here, but could be
Examples are given based on previous values for redis keys.
The calculation goes like
0. How many second per beats?
#####The calculation goes like
0. **How many second per beats?**
* seconds_per_beat = 60 / bpm
* ```60 / 126.05 =~ 0.4760```
1. When did the capture start?
1. **When did the capture start?**
* total_delay = bpm_delay + pttl_delta
* ```3197.49093056 + 2352 =~ 5549.5 ``` i.e. the capture started 5.5 seconds ago
2. When was the last beat (in milliseconds)?
2. **When was the last beat (in milliseconds)?**
* last_beat_delay = bpm_delay - last_beat*1000 + pttl_delta
* ```3197.49093056 - (2.48453515*1000) + 2352 =~ 3064.96 ``` i.e. the last beat was 3.1 seconds ago
3. How many beats were there between the last beat and the redis `get bpm` query?
3. **How many beats were there between the last beat and the redis `get bpm` query?**
* count_past_beats = floor( (last_beat_delay / 1000) / seconds_per_beat)
* ```(3064.96/1000) / 0.4760 = 6.439``` e.g. there were at least 6 beats
4. When are the next beats relative to the redis bpm key retrieval time (in milliseconds)?
4. **When are the next beats relative to the redis bpm key retrieval time (in milliseconds)?**
* next_beats = f(i){ i * seconds_per_beat * 1000 - last_beat_delay } where i >= count_past_beats
* ```f(i){ i * 0.4760 * 1000 - 3064.96 } where i >= 4
* ```f(i){ i * 0.4760 * 1000 - 3064.96 }``` where i >= 4
* f(6) = 6 * 0.4760 * 1000 - 3064.96 = -208.9600
* f(7) = 7 * 0.4760 * 1000 - 3064.96 = 267.0400
* The next beat is in 267 milliseconds after the time we got the redis key