Before i started/stoped the speed variation from gcode subroutine, using M68 for parameter and M65 for reset. Then i felt i need the ability to live finetune the parameter, so it's integrated in the sidepanel now. Works fine.
As i wanted to keep programmed S as max. rpm , i was lowering the middleline of sine by half amplitude input, so the highest S is the programmed S. S18000 at 10% set speed to 17100 and variation +-900.
Amplitude input % of S - for easier processing input from 0.01 to 0.2 - is smooth to apply by slider. Avoid big, unwanted jumps compared to input S, which can have a much wider range. When reset, i needed to make shure offset set back to initial speed. Good results with amplitude of 6% and frequency from 0.5 to 1