A slightly unexpected behaviour when deleting the automation in the selected pattern track:
-make a song with two patterns --(Important so that some automation is left on other pattern )
-automate e.g. volume on selected track over the two patterns you created.
-run the following code in testpad and you would expect the selected_track_parameter.value to be set to the default value (0dB again for volume) --line 14
for some reasons you have to run the code twice for this line to work?
Am I missing something here or is it a bug/ expected unusual behaviour?
--song
local song = renoise.song()
--get current automation
local automation = song.selected_pattern_track:find_automation(song.selected_track_parameter)
--delete pattern_track automation
if automation ~= nil then --if nil there is none in this pattern_track
song.selected_pattern_track:delete_automation(song.selected_track_parameter)
end
-----THIS ONLY WORKS ON SECOND RUN:-----
--set DSP slider to default value
song.selected_track_parameter.value = song.selected_track_parameter.value_default
----------------------------------------
Volume Automation over two patterns before code is run:
5830 auto delete lua bug 1.PNG
DSP lane after code is run: Volume should be at 0dB? :
5831 delete bug lua 2.PNG