Every find yourself wanting to make a BPM automation easily? This script does it for you.
It writes the current BPM to the first column in the Master track. Although if you are in a different column in the master track it will write it there.
Set your BPM as usual then right click in the pattern editor and click the new menu option or you can create a key assignment.
function write_bpm()
if renoise.song().transport.bpm < 256 then -- safety check
local column_index = renoise.song().selected_effect_column_index
if renoise.song().selected_effect_column_index <= 1 then column_index = 1 end
renoise.song().selected_pattern.tracks[get_master_track_index()].lines[1].effect_columns[column_index].number_string = "F0"
renoise.song().selected_pattern.tracks[get_master_track_index()].lines[1].effect_columns[column_index].amount_value = renoise.song().transport.bpm
end
end
What if the BPM would raise 255, we solve it like this?:
function write_bpm()
if renoise.song().transport.bpm < 256 then -- safety check
local column_index = renoise.song().selected_effect_column_index
if renoise.song().selected_effect_column_index <= 1 then column_index = 1 end
renoise.song().selected_pattern.tracks[get_master_track_index()].lines[1].effect_columns[column_index].number_string = "F0"
renoise.song().selected_pattern.tracks[get_master_track_index()].lines[1].effect_columns[column_index].amount_value = renoise.song().transport.bpm
else
renoise.song().transport.lpb = (renoise.song().transport.lpb*2)
renoise.song().transport.bpm = (renoise.song().transport.bpm / 2)
write_bpm()
end
end
I think the LPB has to be written into the master track as well using the LPB effect command.
One might want to switch LPB values in specifica patterns if you really want to expand on tempo automation.
Hiya, I really think Write BPM should be WriteBPM&LPB. Would really help.
I’ve tried to make the modification myself, but so far have not found a way of enlarging the Master track “effect column”.
I have a feeling I already know it, but am too tired to put it in.
function write_bpm()
if renoise.song().transport.bpm < 256 then -- safety check
local column_index = renoise.song().selected_effect_column_index
if renoise.song().selected_effect_column_index <= 1 then column_index = 3 end
column_index = 3
renoise.song().selected_pattern.tracks[get_master_track_index()].lines[1].effect_columns[1].number_string = "F0"
renoise.song().selected_pattern.tracks[get_master_track_index()].lines[1].effect_columns[1].amount_value = renoise.song().transport.bpm
renoise.song().selected_pattern.tracks[get_master_track_index()].lines[1].effect_columns[2].number_string = "F1"
renoise.song().selected_pattern.tracks[get_master_track_index()].lines[1].effect_columns[2].amount_value = renoise.song().transport.lpb
end
end
Anyway, column_index does nothing, obviously
Seems like the thing is that a selected_track can have a visible_effect_columns=2 set, but getting the script to do that to the master is slightly annoying
P.s. ended up modifying my song template to have 2 columns on Master automatically
There is a fairly easy way to detect what type a track is.
There can only be one master, once you know which that one is, expanding the effect columns is peanuts.
maybe for a future update this tool can be pimped so you can set a beginning and end bpm within a range (pattern / sequence / song?) and the tool interpolates between the set values.
I.o.w sort a like automating bpm rate through pattern commands. Something that would disable the need to make a selection in the pattern editor and interpolate through the advanced editor.
Detect, yes, but if the effect_column depends on selected_track, then either I learn how to set effect_column amount to 2 on a “TRACK_TYPE_MASTER”, or learn how to set selected_track to “TRACK_TYPE_MASTER”.
Which method would you recommend?
I would recommend you to use the Syflom’s iterator here. If the specific function needs to be applied to the master track, then simply write the stuff to the effect column in the master track. No need to have this track “selected” specifically.
You do need to get the selected_line index and the selected pattern index and the master track index is provided to you by Syflom’s routine, from there you can change the effect-column data to your needs.
You might give it a thought for adding support for the Automation parameter for the master track. The master track is the only track that now also supports BPM, LPB and TPL changes through automation.(Automated fractional bpm )