Login / Register 0 items | $0.00 New @ KVR
12 posts since 11 Dec, 2014

Postby mhept; Mon Jul 02, 2018 5:09 am Tempo Automation in Hosts

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?
15 posts since 24 Aug, 2014, from Tivat, Montenegro

Postby Vokbuz; Mon Jul 02, 2018 8:10 am Re: Tempo Automation in Hosts

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.
4927 posts since 11 Feb, 2006, from Helsinki, Finland

Postby mystran; Mon Jul 02, 2018 9:13 am Re: Tempo Automation in Hosts

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.
Image <- plugins | forum

Moderator: Moderators (Main)

Return to DSP and Plug-in Development