[Solved] Executing Existing Modified Tool

hi im trying out the tool coder console and want to test some alternations i made on a existing tool,

but when i press ‘execute’ nothings happens?

i did reload the tools. any pointers on this?

thanks

probably the script lacks of a so called “entry point”.

if you have added a function, you should call that function in order to execute it:

  
  
-- here the function is defined  
function somefunction()  
  
 print("Hello world")  
  
end  
  
somefunction() -- here the function is called and "hello world" is printed in the terminal  
  

hi,

executing testPad does work indeed (i should have mentioned that) but how to execute for example the drumProcessor tool?

i opened the manifest.xml and and main.lua, main.lua has focus in the console, then i press execute and nothing happens.

edit

i just realized i should probably go to the tools location and launch it? the execute button is only for the saving of files?

scripts such as Drum Processor are not intended to be executed from terminal because they are ran using a context menu entry.

If you look into the code for “add_menu_entry” (LCTRL+F will activate the text search), you will find a reference to this:

  
renoise.tool():add_menu_entry {  
 name = "Main Menu:Tools:Drum Processor...",  
 invoke = function()   
 if not maindialog or not maindialog.visible then  
 show_dialog()  
 end  
 end  
}  
  

this means that, if you go to
Tools => Drum Processor…
in Renoise, the code inside invoke = function() will be executed.

This does not happen when pressing “Execute”.

So, in order to test such kind of scripts (including those which execute by pressing a keyboard shortcut combination or setting a MIDI control), you should trigger the action which starts them and use the terminal to check the debug print() calls

alright i got it working didn’t realise there is a diff between execute and launching a tool, cheers.

Drum Processor is a Tool, not a Script, so it’s not a matter of executing a procedure.

Looking at the source code, the entry point is at line ~ 75:

  
renoise.tool():add_menu_entry {  
 name = "Main Menu:Tools:Drum Processor...",  
 invoke = function()   
 if not maindialog or not maindialog.visible then  
 show_dialog()  
 end  
 end  
}  
  

Thus, to launch, you do [Tools -> Drum Processor]

To test your changes, you must do [Tools -> Reload all Tools] which “recompiles”, sort of. Then you relaunch using [Tools -> Drum Processor] again.

If you want you can set this up automatically. Scroll down to the bottom of this document for more info.

Edit: The above two paragraphs is more for when you are using an external text editor. The principle is the same if you use Renoise’s internal editor but it’s automatic.

Hope this helps.