Is it possible to have a non-automatable string parameter to a Lua DSP plugin? I can’t find it in any examples.
I want to write a general swing / inflection plugin, and I need to be able to specify the inflection pattern, i.e. the amount of time displacement for each pulse. This needs to work with world music craziness like 28/16, so it’s infeasible to provide 28 or more separate parameters, nor there is the need for them to be automatable, as the inflection pattern is going to be fixed per plugin instance and only the “strength” will be automatable.
I have a simple micro-DSL for specifying inflection patterns, and I can parse and interpret it in Lua. Being able to just type the pattern string in the plugin instance configuration would be most convenient. Of course I can make an enum with a whole library of patterns, but it would be a huge enum.
Forgive me for not understanding your question. If you wish to prompt for text input from a Lua script…
function factory () return function ()
-- the dialog ***type=entry*** specifies "text" input box............................................
local dlgOptions = {{ type = "entry", key = "parmVal", default = 'abc.xyz', title = "Freeform parameter argument" }}
-- the input prompt dialog .................................................................................
local od = LuaDialog.Dialog ("Enter your magical Freeform string", dlgOptions)
local rv = od:run()
if (not rv) then return end
val = rv['parmVal']
if not rv then -- user cancelled
LuaDialog.Message ("AA_prompt", "Missing Input !", LuaDialog.MessageType.Error, LuaDialog.ButtonType.Close):run ()
end
LuaDialog.Message ("You entered...... ", val, LuaDialog.MessageType.Info, LuaDialog.ButtonType.Close):run ()
return
end end
It’s a DSP plugin that I am writing (although it only processes MIDI data and not audio signals). I understand that the factory() pattern isn’t used with DSP plugins.
All plugin controls are expected to be automatable and realtime safe, hence a variable-length strings can not supported.
Ardour’s Lua DSP is mainly intended to be use when you directly interact with Ardour in ways that generic plugins cannot. You’re probably better off writing a LV2 or VST, and you’ll likely need a custom GUI to pass the string around.