NO-OP; document some more parameters.
[ardour.git] / libs / ardour / ardour / lua_api.h
index 7f0b54403bf185fd8bb56fd3bd08b559618b18ca..66402325e4635fbbdd166105f78a709800e1134c 100644 (file)
 
 namespace ARDOUR { namespace LuaAPI {
 
-       int datatype_ctor_nil (lua_State *L);
+       /** convenience contructor for DataType::NIL
+        * @returns DataType::NIL
+        */
+       int datatype_ctor_null (lua_State *lua);
+       /** convenience contructor for DataType::AUDIO
+        * @returns DataType::AUDIO
+        */
        int datatype_ctor_audio (lua_State *L);
+       /** convenience contructor for DataType::MIDI
+        * @returns DataType::MIDI
+        */
        int datatype_ctor_midi (lua_State *L);
 
+       /** Create a null processor shared pointer
+        *
+        * This is useful for Track:bounce() to indicate no processing.
+        */
+       boost::shared_ptr<ARDOUR::Processor> nil_processor ();
+
        /** create a new Lua Processor (Plugin)
         *
         * @param s Session Handle
@@ -78,6 +93,31 @@ namespace ARDOUR { namespace LuaAPI {
         */
        bool set_plugin_insert_param (boost::shared_ptr<ARDOUR::PluginInsert> pi, uint32_t which, float val);
 
+       /**
+        * A convenience function to get a Automation Lists and ParamaterDescriptor
+        * for a given plugin control.
+        *
+        * This is equivalent to the following lua code
+        * @code
+        * function (processor, param_id)
+        *  local plugininsert = processor:to_insert ()
+        *  local plugin = plugininsert:plugin(0)
+        *  local _, t = plugin:get_parameter_descriptor(param_id, ARDOUR.ParameterDescriptor ())
+        *  local ctrl = Evoral.Parameter (ARDOUR.AutomationType.PluginAutomation, 0, param_id)
+        *  local ac = pi:automation_control (ctrl, false)
+        *  local acl = ac:alist()
+        *  return ac:alist(), ac:to_ctrl():list(), t[2]
+        * end
+        * @endcode
+        *
+        * Example usage: get the third input parameter of first plugin on the given route
+        * (Ardour starts counting at zero).
+        * @code
+        * local al, cl, pd = ARDOUR.LuaAPI.plugin_automation (route:nth_plugin (0), 3)
+        * @endcode
+        * @returns 3 parameters: AutomationList, ControlList, ParamaterDescriptor
+        */
+       int plugin_automation (lua_State *lua);
 } } /* namespace */
 
 namespace ARDOUR { namespace LuaOSC {