BPM automation impossible

What would the formula for converting from a BPM number in float, say, something from inside the tap tempo tool, to a

Is it just map the range from rs:track(rs.sequencer_track_count+1):device(1):parameter(6).value_min and value_max to 0.0-1.0?
I’d love to be able to make the current tap tempo tool a bit better by providing it with automation writing support (I don’t like “Round BPM”, and the pattern command seems to round it somewhat too)

Well it’s not exactly linear mapping I would think, from .05 to .1 it skips almost exactly 10 BPM every .01

Really, nothing?

Don’t worry too much about handling the conversions yourself. Just use the record_value() function provided by the device parameter. It will take care of mapping the real value to the automation value for you.

For example, this will create a BPM automation point at the current song position:

  
-- Local copy of Renoise Song object.  
local song = renoise.song()  
  
-- Set parameter recording mode to automation.  
song.transport.record_parameter_mode = renoise.Transport.RECORD_PARAMETER_MODE_AUTOMATION  
  
-- Turn on edit mode.  
song.transport.edit_mode = true  
  
-- Record a BPM value to automation.  
song:track(song.sequencer_track_count+1):device(1):parameter(6):record_value(123.456)  
  

And then I just gotta copy that point to the start of the pattern and remove the recorded one… aight