summaryrefslogtreecommitdiff
path: root/scripts/s_vamp_plugin_index.lua
blob: cc731c3a7e79fb5ac9b0bc5e05b5a0ef12a226ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
ardour { ["type"] = "Snippet", name = "Vamp Plugin List" }
function factory () return function ()

	local plugins = ARDOUR.LuaAPI.Vamp.list_plugins ();
	for id in plugins:iter () do
		local vamp = ARDOUR.LuaAPI.Vamp(id, Session:nominal_frame_rate())
		local vp = vamp:plugin ()
		print (" --- VAMP Plugin ---")
		print ("Id:", vp:getIdentifier ())
		print ("Name:", vp:getName ())
		print ("Description:", vp:getDescription ())

		local progs = vp:getPrograms();
		if not progs:empty () then
			print ("Preset(s):")
			for p in progs:iter () do
				print (" *", p)
			end
		end

		local params = vp:getParameterDescriptors ()
		if not params:empty () then
			print ("Parameters(s):")
			for p in params:iter () do
				-- http://manual.ardour.org/lua-scripting/class_reference/#Vamp:PluginBase:ParameterDescriptor
				print (" * Id:", p.identifier, "Name:", p.name, "Desc:", p.description)
				local i = 0; for vn in p.valueNames:iter() do
					print ("   ^^  ", i, " -> ", vn)
					i = i + 1
				end
			end
		end

		local feats = vp:getOutputDescriptors ()
		if not feats:empty () then
			print ("Output(s):")
			for p in feats:iter () do
				-- http://manual.ardour.org/lua-scripting/class_reference/#Vamp:Plugin:OutputDescriptor
				print (" * Id:", p.identifier, "Name:", p.name, "Desc:", p.description)
			end
		end

	end
end end