New Tool (3.0): Vsti From Menu

Probably the same here:

'***\Application Data\Renoise\V3.0.0\Scripts\Tools\ledger.scripts.VstiFromMenu.xrnx\main.lua' failed in one of its notifiers.  
The notifier will be disabled to prevent further errors.  
  
Please contact the author (Ledger) for assistance...  
  
Script execution terminated by user.  
stack traceback:  
 main.lua:260: in function <152><br>```

</152>

Thanks for the reports both of you and the error printout hma,

Could you and thalamus both check this version and get back to me, I think I`ve got the problem, as in the new documents:

"Track DSPs Chain" as a menu entry is now just "DSPs Chain".  

Though it is strange that it did not cause the same bug hereā€¦

Just mentioning that for the record though, the main thing is that 1.2 works for you?:

4570 ledger.scripts.VstiFromMenu_V1.2.xrnx

[quote=ā€œLedger, post:122, topic:31023ā€]
Thanks for the reports both of you and the error printout hma,

Could you and thalamus both check this version and get back to me, I think I`ve got the problem, as in the new documents:

"Track DSPs Chain" as a menu entry is now just "DSPs Chain".  

Though it is strange that it did not cause the same bug hereā€¦

Just mentioning that for the record though, the main thing is that 1.2 works for you?:

4570 ledger.scripts.VstiFromMenu_V1.2.xrnx

simply works without probs! thx for it

Great, thanks!

Still terminates when installing, got a bit different ā€œScripting tool errorā€ message this time:

'***\Application Data\Renoise\V3.0.0\Scripts\Tools\ledger.scripts.VstiFromMenu.xrnx\main.lua' failed in one of its notifiers. The notifier will be disabled to prevent further errors. Please contact the author (Ledger) for assistance... main.lua:260: Script execution terminated by user. stack traceback: [string "do..."]:36: in function main.lua:260: in function <152><br>```

<br>
The thing is, that after terminating it says script that has been installed, it shows up in rigt-click menu and works but when relaunching Renoise it`s the previous message again <br>

```<br>'***\Application Data\Renoise\V3.0.0\Scripts\Tools\ledger.scripts.VstiFromMenu.xrnx\main.lua' failed in one of its notifiers. The notifier will be disabled to prevent further errors. Please contact the author (Ledger) for assistance... Script execution terminated by user. stack traceback: main.lua:260: in function <152><br>```

<br>
So basically when I launch Renoise now, each time I get that "Script terminated" message, press yes, get "Scipting tool error", press ok and it works.</152></152>

This is quite hard to narrow down as it is not happening here.

Could you use this debug script to get me a printout of all the plugs you have installed on your computer.

It adds the following entry in the tools menu. If you can click it and save the txt file to your desktop then upload/ copy paste the contents here, it may be helpful:

menu:
Debug, Export available plugs to txt

4573 ledger.scripts.PrintPlugins_V1.xrnx

you can uninstall the debug tool after.

Same error with 1.2

Could you give this a go then please?

any chance of getting subfolders in the vsti menu?

Probably not adding too much more to this tool now. VSTi loading is improved in renoise 3.0, so not sure this tool is worth much more refining.

New beta: version 1.3

-added new button to the Search VSTi GUI

Before loading a plugin instrument, press it and you will be taken to the first empty instrument slot in the instrument list. If there are no free slots available, a new one will be created

New beta 1.3 up in first post:

https://forum.renoise.com/t/new-tool-3-0-vsti-from-menu/31023

Hopefully shouldnā€™t be too much of a risky addition as Iā€™ve been testing the function in my autocapture tool, but you never know :slight_smile:

It seemed to fit nicely into this tools GUI/ functioning aswell though,

thanks for testing!

When I try it install the plugin causes and endless loop, until a termination dialogue appears.

The tool still works after termination, Load VSTi and Load AU menu are filled.

After termination:

'/Users/Ju/Library/Preferences/Renoise/V3.0.1/Scripts/Tools/ledger.scripts.VstiFromMenu.xrnx/main.lua' failed in one of its notifiers.
The notifier will be disabled to prevent further errors.

Please contact the author (Ledger) for assistance...

Script execution terminated by user.
stack traceback:
  main.lua:316: in function <main.lua:152>

second time:

'/Users/Ju/Library/Preferences/Renoise/V3.0.1/Scripts/Tools/ledger.scripts.VstiFromMenu.xrnx/main.lua' failed in one of its notifiers.
The notifier will be disabled to prevent further errors.

Please contact the author (Ledger) for assistance...

main.lua:260: Script execution terminated by user.
stack traceback:
  [string "do..."]:37: in function <[string "do..."]:35>
  main.lua:260: in function <main.lua:152>

thanks for report, will take a look

Some more observations:

  • If I remove the vst if- part of the type detection loop, it will the CPU usage will still go up with a huge pause, but the detection will pass.

  • if I print the vst names, I can see that it terminated always after last vst.

  • native detection should look for ā€œnative/ā€ instead ā€œnativeā€, since some vst have ā€œnativeā€ in their name,

  • donā€™t understand when this detection is triggered, maybe thatā€™s the problem, so it called a million times? Why is it observable, because of the possibility to rescan plugins? Maybe there is a system observable?

EDIT:

  • Or is it some recursion problem, so if the observable is triggered if the plugin list changes and the detection function itself changes the plugin list, it would be called in some evil recursion. I guess I simply do not understand how the function is triggeredā€¦

Thanks for the further info. I`ve had a quick look here but this is could be quite difficult to troubleshoot at this end.

The observable is triggered on a new document (renoise song being loaded in). This is to prevent the tool trying to access the song variables before they exist. i.e. on loading renoise for the first time.

Could you run the script linked here from an earlier post and upload the .txt? These bugs seem to be naming issues, this way I can have a look at it. I`ll look at the native issue you mention too.

https://forum.renoise.com/t/new-tool-3-0-vsti-from-menu/31023

Man, I isolated the problem, it has nothing to do with the number of plugins.

The problem is this call:

renoise.tool():has_menu_entry(menu_roots[root]..menu_entry)

It seems to be very, very slow.

See post below!

I also littledisimproved youradd_vsts_to_mixer() function:

[SPOILER]

function add_vsts_to_mixer()
local rns_track_device_infos = renoise.song().tracks[1].available_device_infos

local plug_type = {}
local VSTs = 1
local no_of_vsts = #rns_track_device_infos

local hidden_plugs = {"*Formula Device",
                "*MIDI-CC Device",
              --"Distortion",
              --"Filter",
                "Filter 2",
              --"Gate",
              --"LofiMat",
                "MasterTrackVolPan",
              --"mpReverb",
                "SendTrackVolPan",
                "Shaper",
                "Stutter",
                "TrackVolPan"
                }
                                                
                
--get fx plugin names and add to table "plugins"
for VSTs = 1,no_of_vsts do
local vpath = rns_track_device_infos[VSTs].path;
  --routing
  if string.find(vpath , "/#",1, true ) then
    plug_type[VSTs] = "Routing"
  --meta
  elseif string.find(vpath , "/*", 1, true) then
    plug_type[VSTs] = "Meta" 
  --native is last as all renoise fx have native in path
  elseif string.find(vpath , "Native/") then
    plug_type[VSTs] = "Native"
   -- remove hidden/ compatability plugs
   for i = 1,#rns_track_device_infos[VSTs].short_name do
      if rns_track_device_infos[VSTs].short_name == hidden_plugs[i] then
        plug_type[VSTs] = "Void"
        break
      end
    end
 
  --Plugins
  elseif string.find(vpath , "VST/") then
    plug_type[VSTs] = "VST" 
    
  elseif string.find(vpath , "DSSI/") then
    plug_type[VSTs] = "DSSI"

  elseif string.find(vpath ,"AU/") then
    plug_type[VSTs] = "AU"
  end
  
end--for

[/SPOILER]

I think to fix the problem, we need some menu object cache to be used instead.

EDIT:

No, I think this is a OSX? / gui renoise only problem, the same as reported here:

https://forum.renoise.com/t/osx-gui-slows-down-on-renoise-app-show-status-calls/43129

So if you add an entry to a gui menu, renoise osx will immediately redraw the whole gui without any reason (since next screen frame is still far away). So if I have 1000 plugins installed, the OSX renoise gui will be redrawn on every single

renoise.tool():add_menu_entry()

callā€¦ In this example, like 5000 ? times or more. Within one frame tick.

Really hope the Taktik will fix this with the 3.1 update!

Really hope the Taktik will fix this with the 3.1 update!

And there`s the sentence that causes me a huge sigh of relief (sorry taktik!) :slight_smile:

I`ll take a look at your function improvement too, I guess its a bit of a speed up?

EDIT: I donā€™t knowā€¦ all rubbish I wrote above.

the function

renoise.tool():add_menu_entry()

seems to be extremely slow.hmā reported above and obviously uses windows, so itā€™s maybe just so slow on every system.

I`ll take a look at your function improvement too, I guess its a bit of a speed up?

I have no clue about LUA, itā€™s only matching for path separator, ā€œ/ā€, too, for more exact matching. also it seems that luauā€™s string.find() function supports regular expressions? So a / or # or * might be problematic I thought. Or just needs a interpolation \ ? Dunnoā€¦