Tempo Automation in Hosts

DSP, Plug-in and Host development discussion.
12 posts since 11 Dec, 2014

Post Mon Jul 02, 2018 5:09 am

I'm writing a VST Host.
I somehow would want to have non linear tempo automation like ableton.

I spent some time inspecting how Ableton and Bitwig handle this.
Ableton even "warps" the rendered waveforms correctly (when warp mode is off). Bitwig doesn't handle it nearly as good as you would expect.

It blows my mind how much more complicated tempo automation makes implementing a basic sequencer.
Has anyone ever attempted to implement this somewhere?

User avatar
22 posts since 24 Aug, 2014

Re: Tempo Automation in Hosts

Post Mon Jul 02, 2018 8:10 am

Well. You can't even make perfect linear tempo automation. There is no tempo automation in VST. Each process block can only have fixed tempo. Ableton wraps waveforms using internal API so it may support at least linear tempo changes inside each process block and make at least linearly correct wrapping. The only possible solution I would suggest is to split each process block into smaller blocks (each with changed tempo) and the steeper the automation curve the shorter those blocks should be. I believe all DAWs do tempo automation this or similar way.

5001 posts since 12 Feb, 2006 from Helsinki, Finland

Re: Tempo Automation in Hosts

Post Mon Jul 02, 2018 9:13 am

If you keep all your internal time-stamps in "PPQ time" (ie. some subdivision of quarter notes) and approximate the automation by piece-wise constant or linear segments, then it's really just a matter of integrating the tempo over (real-)time to get the musical position. So basically for every block you process, solve the musical time at the end of the block (assuming we already know the time at the beginning of the block), then integrate the piece-wise constant or linear (or whatever) segment of the tempo approximation into a linear or quadratic curve (respectively) and use that to map the events into sample time-stamps.

That might not be the most robust way to keep intra-block timing stable if the block boundaries move around with respect to the musical time, but like.. that's the basic idea to start from anyway.
If you'd like Signaldust to return, please ask Katinka Tuisku to resign.

Return to “DSP and Plug-in Development”