mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-03 12:19:33 +01:00
update lua related doc, add missing bindings
This commit is contained in:
parent
c76ef64870
commit
c6d4fafcd9
3 changed files with 21 additions and 3 deletions
|
|
@ -94,11 +94,11 @@ 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 AutomationControList and ParamaterDescriptor
|
||||
* A convenience function to get a Automation Lists and ParamaterDescriptor
|
||||
* for a given plugin control.
|
||||
*
|
||||
* This is equivalent to the following lua code
|
||||
* <code>
|
||||
* @code
|
||||
* function (processor, param_id)
|
||||
* local plugininsert = processor:to_insert ()
|
||||
* local plugin = plugininsert:plugin(0)
|
||||
|
|
@ -108,7 +108,14 @@ namespace ARDOUR { namespace LuaAPI {
|
|||
* local acl = ac:alist()
|
||||
* return ac:alist(), ac:to_ctrl():list(), t[2]
|
||||
* end
|
||||
* </code>
|
||||
* @endcode
|
||||
*
|
||||
* Example usage: get 3rd 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 */
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include "ardour/audiosource.h"
|
||||
#include "ardour/audio_backend.h"
|
||||
#include "ardour/audio_buffer.h"
|
||||
#include "ardour/audio_port.h"
|
||||
#include "ardour/audio_track.h"
|
||||
#include "ardour/buffer_set.h"
|
||||
#include "ardour/chan_mapping.h"
|
||||
|
|
@ -39,6 +40,7 @@
|
|||
#include "ardour/luabindings.h"
|
||||
#include "ardour/meter.h"
|
||||
#include "ardour/midi_track.h"
|
||||
#include "ardour/midi_port.h"
|
||||
#include "ardour/playlist.h"
|
||||
#include "ardour/plugin.h"
|
||||
#include "ardour/plugin_insert.h"
|
||||
|
|
@ -338,6 +340,14 @@ LuaBindings::common (lua_State* L)
|
|||
.addFunction ("disconnect", (int (Port::*)(Port*))&Port::disconnect)
|
||||
.endClass ()
|
||||
|
||||
.deriveWSPtrClass <AudioPort, Port> ("AudioPort")
|
||||
.endClass ()
|
||||
|
||||
.deriveWSPtrClass <MidiPort, Port> ("MidiPort")
|
||||
.addFunction ("input_active", &MidiPort::input_active)
|
||||
.addFunction ("set_input_active", &MidiPort::set_input_active)
|
||||
.endClass ()
|
||||
|
||||
.beginWSPtrClass <PortSet> ("PortSet")
|
||||
.addFunction ("num_ports", (size_t (PortSet::*)(DataType)const)&PortSet::num_ports)
|
||||
.addFunction ("add", &PortSet::add)
|
||||
|
|
|
|||
|
|
@ -1589,6 +1589,7 @@ public:
|
|||
*/
|
||||
Namespace& addCFunction (char const* name, int (*const fp)(lua_State*))
|
||||
{
|
||||
DATADOC ("Free C Function", name, fp)
|
||||
lua_pushcfunction (L, fp);
|
||||
rawsetfield (L, -2, name);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue