Video-Frame (not sample)
[ardour.git] / scripts / s_vamp_plugin_index.lua
1 ardour { ["type"] = "Snippet", name = "Vamp Plugin List" }
2 function factory () return function ()
3
4         local plugins = ARDOUR.LuaAPI.Vamp.list_plugins ();
5         for id in plugins:iter () do
6                 local vamp = ARDOUR.LuaAPI.Vamp(id, Session:nominal_sample_rate())
7                 local vp = vamp:plugin ()
8                 print (" --- VAMP Plugin ---")
9                 print ("Id:", vp:getIdentifier ())
10                 print ("Name:", vp:getName ())
11                 print ("Description:", vp:getDescription ())
12
13                 local progs = vp:getPrograms();
14                 if not progs:empty () then
15                         print ("Preset(s):")
16                         for p in progs:iter () do
17                                 print (" *", p)
18                         end
19                 end
20
21                 local params = vp:getParameterDescriptors ()
22                 if not params:empty () then
23                         print ("Parameters(s):")
24                         for p in params:iter () do
25                                 -- http://manual.ardour.org/lua-scripting/class_reference/#Vamp:PluginBase:ParameterDescriptor
26                                 print (" * Id:", p.identifier, "Name:", p.name, "Desc:", p.description)
27                                 local i = 0; for vn in p.valueNames:iter() do
28                                         print ("   ^^  ", i, " -> ", vn)
29                                         i = i + 1
30                                 end
31                         end
32                 end
33
34                 local feats = vp:getOutputDescriptors ()
35                 if not feats:empty () then
36                         print ("Output(s):")
37                         for p in feats:iter () do
38                                 -- http://manual.ardour.org/lua-scripting/class_reference/#Vamp:Plugin:OutputDescriptor
39                                 print (" * Id:", p.identifier, "Name:", p.name, "Desc:", p.description)
40                         end
41                 end
42
43         end
44 end end
45