Four different locking mechanisms have been implented.
The currently active, SMOOTHLOCKSTEPLOCK, seems to work best for arbitary waveforms.