As I understand it, this does not meet your criteria since you said:
"I want the same result when I adjust the beatgrid no matter where the playposition is in the track when I adjust the beatgrid."
If I understand correctly, you would want a formula that depends purely on audio_samples_per_pixel, not on closest-beat (since that scales depending on how far into a track you are).
This formula also is BPM dependent, since it increases the BPM by a percentage, whereas the code at head adjusts the BPM by a fixed offset (0.1). Is that desirable also?
I'm still unsure that we want to be tying adjustments to the zoom level. Is this need met by introducing a coarse/fine adjust like we have for the rate slider?
John Doe -- do agree that the patch you posted is the equivalent of:
new_bpm *= closest_beat / (closest_beat +/- audio_samples_ per_pixel)
As I understand it, this does not meet your criteria since you said:
"I want the same result when I adjust the beatgrid no matter where the playposition is in the track when I adjust the beatgrid."
If I understand correctly, you would want a formula that depends purely on audio_samples_ per_pixel, not on closest-beat (since that scales depending on how far into a track you are).
This formula also is BPM dependent, since it increases the BPM by a percentage, whereas the code at head adjusts the BPM by a fixed offset (0.1). Is that desirable also?
I'm still unsure that we want to be tying adjustments to the zoom level. Is this need met by introducing a coarse/fine adjust like we have for the rate slider?