diff --git a/blog/2021-01-31-Audio-Automation.md b/blog/2021-01-31-Audio-Automation.md index 2948cedf8d4a8f9f8ef850bab1107dd62875591e..fe67c0d6b140b38eb582619098e9a20220a3021c 100644 --- a/blog/2021-01-31-Audio-Automation.md +++ b/blog/2021-01-31-Audio-Automation.md @@ -46,7 +46,7 @@ With this established, implementing the MIDI API was as simple as connecting the ## Solving Latency Issues -When I ran my first program with this library, it seemed a bit unstable - the timing was inconsistent, and some notes played faster than others - which wasn't a great experience after spending an entire day building it. While my metronome was working correctly, it seems that Flows (or Java in general) are not as precise with their timing. Some flows were taking 100ms or more to process an event, which had drastic consequences the music my program was playing. +When I ran my first program with this library, it seemed a bit unstable - the timing was inconsistent, and some notes played faster than others - which wasn't a great experience after spending an entire day building it. While my metronome was working correctly, it seems that Flows (or Java in general) are not as precise with their timing. Some flows were taking 100ms or more to process an event, which had drastic consequences for the music my program was playing. I decided that the easiest way to solve this would be to attach a specific timestamp to each event - a `metronome(500)` would send `startTime + [0, 500, 1000, 1500, ...]` and so on. However, this presented the challenge of how to send multiple values through the path of a single Flow. Since flows only support one data type, I needed to either create a wrapper object for every value they use, or write my own implementation; I ended up doing a bit of both.