Some quastion about lua scripts

Hi

Can a lua script change plugins parameters ? e.g Ardour eq

I need a lua script to automatic change eq parameter for help me on ear training with another eq

Any sugestion ?

1 Like

Hello,

I’m not entirely sure. @x42 would know.
But you could also forget Lua and simply use automation of an EQ to change when you want it to (which could be setup in mere minutes instead of however long it would take long to make a script :face_with_spiral_eyes:).

How exactly do you imagine doing the ear training?

-J

Another alternative is to set up two instances of the EQ in the same strip and use the A/B switch plug-in. The switch is ideal for ear training. https://www.youtube.com/watch?v=D9N8_IhirLk

Yes.

-- get the track named "Audio"
-- see also http://manual.ardour.org/lua-scripting/class_reference/#ARDOUR:Session
-- and http://manual.ardour.org/lua-scripting/class_reference/#ARDOUR:Route
local route = Session:route_by_name ("Audio")
assert (not route:isnil ()) -- make sure it exists

-- the 1st plugin (from top) on that track, ardour starts counting at zero
-- see also http://manual.ardour.org/lua-scripting/class_reference/#ARDOUR:Processor
local plugin = route:nth_plugin (0)
assert (not plugin:isnil ()) -- make sure it exists

-- set the plugin's first parameter (0)  to 200
ARDOUR.LuaAPI.set_processor_param (plugin, 0, 200.0)

You can use above code as action script and manually trigger it, or run it periodically to e.g. modulate some parameter in realtime: see ardour/share/scripts/__plugin_modulation.lua at master · Ardour/ardour · GitHub for an example.

1 Like