smithjb84
(Smithjb84)
April 17, 2021, 11:43am
1
Hopefully an easy one. I’m looking to get a list of all the plugins and modules in my library through the API.
I can get access to all the modules in my patch using APP->scene->rack->toJson(). I get a nice json object that I can work with. Is there something similar for the library through the API, or is it a case of grabbing each of the plugin.json files from my plugins directory?
Thanks
Hack: the mb module from stoermelder lets you export a json of all your “favorites” and “hidden” modules. You could make all modules as favorites and do it that way.
Experimental replacement module browsers for Rack. Brings back the browser from Rack v0.6x and has a modified browser from Rack v1.x with adjustable preview size, favorites, extended filtering options and more.
To get a simple list of the plugins in the library, you can open: https://api.vcvrack.com/plugins
To get a nice, spreadsheet friendly list, of all the plugins and modules that you have installed on your computer, you can do the following:
With your favorite package manager, install the jq
utility. On Mac and Linux it’s just in your terminal, on Windows you can use e.g. MSYS2 .
Navigate to your Documents/Rack/plugins-v1 folder and execute the following:
for F in */plugin.json; do cat $F | jq -r '.brand + ";" + .author + ";" + .name + ";" + .modules[].name'; done > modules.csv
This exports all the plugins and modules in a nice list (CSV file), where the columns are: Brand, Author, PluginName, ModuleName - like so:
23volts;Rémi Collin;23volts;Mem
23volts;Rémi Collin;23volts;Multimap
;Adrian Likins;Alikins;Gate Length
;Adrian Likins;Alikins;Color Panel
Bidoo;Bidoo;Bidoo;pErCO
Bidoo;Bidoo;Bidoo;rabBIT
You will notice that people apply the brand and author thing quite differently.
Attached the CSV file and the Excel version from my computer:
modules.csv.pdf (99.8 KB)
modules.xlsx.pdf (61.7 KB)
Since the configuration of this forum does not allow either filetype, you will have to remove the .pdf
extension after downloading.
2 Likes
smithjb84
(Smithjb84)
April 17, 2021, 2:57pm
4
Thanks for this but I was hoping to access details of my plugins library from a module
smithjb84
(Smithjb84)
April 17, 2021, 3:04pm
5
I tried doing something like this:
for (plugin::Plugin* plugin : rack::plugin::plugins) {
for (plugin::Model* model : plugin->models) {
std::string str = model->name;
const char* c = str.c_str();
DEBUG(c);
}
}
but getting the error ‘plugins’ is not a member of ‘rack::plugin’;
Did you include plugin.hpp
?
1 Like
smithjb84
(Smithjb84)
April 17, 2021, 3:37pm
7
Yeah got #include “plugin.hpp”
I mean the file in Rack’s include-folder, not the one in your plugin.
smithjb84
(Smithjb84)
April 17, 2021, 3:41pm
10
spot on mate! that was it. Thanks
Easiest is probably to look at the source of Stoermelders MB module.