OK,I have decided to use a timer with return.Please, if there is any way to do it without using a timer or a iddle_observable, let me know.
local vpd_current_subcolumn
function vpd_check_current_subcolumn( song, sct )
song = renoise.song()
sct = song.selected_sub_column_type
if ( vpd_current_subcolumn ~= sct ) then
vpd_current_subcolumn = sct
--print( "sub_column_type:",song.selected_sub_column_type )
if song.selected_sub_column_type <= 7 then
vb.views["GUI_TFX_VISIBLE"].visible = false
vb.views["GUI_SFX_VISIBLE"].visible = true
else
vb.views["GUI_SFX_VISIBLE"].visible = false
vb.views["GUI_TFX_VISIBLE"].visible = true
end
else
return
end
end
if not ( renoise.tool():has_timer( vpd_check_current_subcolumn ) ) then
renoise.tool():add_timer( vpd_check_current_subcolumn, 20 )
end
In this case, it is necessary to make a renoise.tool(): remove_timer ( vpd_check_current_subcolumn ) ?
Is it always necessary to make a remove, with any timer or observable?