Remove the “song_obs()” call from the dialog function. No cheating
My solution above seems to work universally.
^_^I forgot to delete it
-------------------------------------------------------------------------------------------------
--local global variables/tables
main_dialog = nil
local rdn_main_title = " Rodent"
pht_version = "1.1 build 0001"
rns_version = renoise.RENOISE_VERSION
api_version = renoise.API_VERSION
---
vb = renoise.ViewBuilder()
vws = vb.views
rna = renoise.app()
rnt = renoise.tool()
---
song = nil
function song_obs()
song = renoise.song()
end
-- catching new song / start renoise
rnt.app_new_document_observable:add_notifier( song_obs )
-- catching installation scenario
if pcall ( function() return renoise.song() end ) then
song = renoise.song()
end
-------------------------------------------------------------------------------------------------
--require
require ( "lua/file_1" )
require ( "lua/file_2" )
--
require ( "lua/keyhandler" )
-------------------------------------------------------------------------------------------------
--main functions
Yes now!!! Thanks!
song = nil
**function song_obs()
song = renoise.song()
end
– catching new song / start renoise
rnt.app_new_document_observable:add_notifier( song_obs )
– catching installation scenario
if pcall ( function() return renoise.song() end ) then
song = renoise.song()
end**
Ufff, to have to get here.For me, this “song” issue has always been a nuisance. This should be done in the API in another way so as not to have so many problems with renoise.song ().But hey, this seems to be the best solution so far I’ve seen.
Especially in the type of more complex tools, like this template, you can invoke several internal windows in the same tool, including several files through require(“file”).