From 2781be76838eb059d23935d47f2b0f418a65dd35 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 8 Dec 2016 15:29:55 +0100 Subject: [PATCH] update lua class doc --- .../24_lua-scripting/02_class_reference.html | 69 ++++++++++++++++--- 1 file changed, 59 insertions(+), 10 deletions(-) diff --git a/_manual/24_lua-scripting/02_class_reference.html b/_manual/24_lua-scripting/02_class_reference.html index 93e8e9a..f21f6ae 100644 --- a/_manual/24_lua-scripting/02_class_reference.html +++ b/_manual/24_lua-scripting/02_class_reference.html @@ -261,8 +261,8 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C intdisconnect_port (Port) LuaTable(int, ...)get_backend_ports (std::string, DataType, PortFlags, StringVector&) LuaTable(int, ...)get_connections (std::string, StringVector&) - voidget_physical_inputs (DataType, StringVector&, --MISSING (ARDOUR::MidiPortFlags)--, --MISSING (ARDOUR::MidiPortFlags)--) - voidget_physical_outputs (DataType, StringVector&, --MISSING (ARDOUR::MidiPortFlags)--, --MISSING (ARDOUR::MidiPortFlags)--) + voidget_physical_inputs (DataType, StringVector&, MidiPortFlags, MidiPortFlags) + voidget_physical_outputs (DataType, StringVector&, MidiPortFlags, MidiPortFlags) Portget_port_by_name (std::string)
name
Full or short name of port

Returns Corresponding Port or 0.

LuaTable(int, ...)get_ports (DataType, PortList&) @@ -589,6 +589,7 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C

Return the first processor that accepts has at least one MIDI input and at least one audio output. In the vast majority of cases, this will be "the instrument". This does not preclude other MIDI->audio processors later in the processing chain, but that would be a special case not covered by this utility function.

Amptrim () Cast + Automatableto_automatable () Trackto_track ()

Inherited from ARDOUR:Stripable

@@ -1228,12 +1229,13 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C
- + + - + @@ -1243,7 +1245,7 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C - + + + + +
Methods
LuaTablebuild_filename ()
...build_filename (--lua--)

Creates a filename from a series of elements using the correct separator for filenames.

No attempt is made to force the resulting filename to be an absolute path. If the first element is a relative path, the result will be a relative path.

LuaTable(float, ...)get_plugin_insert_param (PluginInsert, unsigned int, bool&)

get a plugin control parameter value

which
control port to query (starting at 0, including ports of type input and output)
ok
boolean variable contains true or false after call returned. to be checked by caller before using value.
proc
Plugin-Insert

Returns value

LuaTable(float, ...)get_processor_param (Processor, unsigned int, bool&)

get a plugin control parameter value

proc
Plugin-Processor
which
control port to set (starting at 0, including ports of type input and output))
ok
boolean variable contains true or false after call returned. to be checked by caller before using value.

Returns value

LuaTablehsla_to_rgba ()
...hsla_to_rgba (--lua--)

A convenience function for colorspace HSL to RGB conversion. All ranges are 0..1

Example:

 local r, g, b, a = ARDOUR.LuaAPI.hsla_to_rgba (hue, saturation, luminosity, alpha)

Returns 4 parameters: red, green, blue, alpha (in range 0..1)

Processornew_luaproc (Session, std::string)

create a new Lua Processor (Plugin)

s
Session Handle
p
Identifier or Name of the Processor

Returns Processor object (may be nil)

PluginInfonew_plugin_info (std::string, PluginType)

search a Plugin

id
Plugin Name, ID or URI
type
Plugin Type

Returns PluginInfo or nil if not found

Processornil_proc ()
LuaTableplugin_automation ()
...plugin_automation (--lua--)

A convenience function to get a Automation Lists and ParamaterDescriptor for a given plugin control.

This is equivalent to the following lua code

 function (processor, param_id)
   local plugininsert = processor:to_insert ()
   local plugin = plugininsert:plugin(0)
@@ -1253,10 +1255,14 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C
   local acl = ac:alist()
   return ac:alist(), ac:to_ctrl():list(), t[2]
  end

Example usage: get the third input parameter of first plugin on the given route (Ardour starts counting at zero).

 local al, cl, pd = ARDOUR.LuaAPI.plugin_automation (route:nth_plugin (0), 3)

Returns 3 parameters: AutomationList, ControlList, ParamaterDescriptor

...sample_to_timecode (--lua--)

Generic conversion from audio sample count to timecode. (TimecodeType, sample-rate, sample-pos)

boolset_plugin_insert_param (PluginInsert, unsigned int, float)

set a plugin control-input parameter value

This is a wrapper around set_processor_param which looks up the Processor by plugin-insert.

which
control-input to set (starting at 0)
proc
Plugin-Insert
value
value to set

Returns true on success, false on error or out-of-bounds value

boolset_processor_param (Processor, unsigned int, float)

set a plugin control-input parameter value

proc
Plugin-Processor
which
control-input to set (starting at 0)
value
value to set

Returns true on success, false on error or out-of-bounds value

...timecode_to_sample (--lua--)

Generic conversion from timecode to audio sample count. (TimecodeType, sample-rate, hh, mm, ss, ff)

voidusleep (unsigned long)

 ARDOUR:LuaAPI:Vamp

@@ -1751,6 +1757,7 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C

Return the first processor that accepts has at least one MIDI input and at least one audio output. In the vast majority of cases, this will be "the instrument". This does not preclude other MIDI->audio processors later in the processing chain, but that would be a special case not covered by this utility function.

Amptrim () Cast + Automatableto_automatable () Trackto_track ()

Inherited from ARDOUR:Stripable

@@ -2256,6 +2263,7 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C ChanCountnatural_output_streams () ChanMappingoutput_map (unsigned int) Pluginplugin (unsigned int) + boolreset_parameters_to_default () boolsameinstance (PluginInsert) voidset_input_map (unsigned int, ChanMapping) voidset_output_map (unsigned int, ChanMapping) @@ -2342,8 +2350,8 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C intdisconnect_port (Port) LuaTable(int, ...)get_backend_ports (std::string, DataType, PortFlags, StringVector&) LuaTable(int, ...)get_connections (std::string, StringVector&) - voidget_physical_inputs (DataType, StringVector&, --MISSING (ARDOUR::MidiPortFlags)--, --MISSING (ARDOUR::MidiPortFlags)--) - voidget_physical_outputs (DataType, StringVector&, --MISSING (ARDOUR::MidiPortFlags)--, --MISSING (ARDOUR::MidiPortFlags)--) + voidget_physical_inputs (DataType, StringVector&, MidiPortFlags, MidiPortFlags) + voidget_physical_outputs (DataType, StringVector&, MidiPortFlags, MidiPortFlags) Portget_port_by_name (std::string)
name
Full or short name of port

Returns Corresponding Port or 0.

LuaTable(int, ...)get_ports (DataType, PortList&) @@ -2669,6 +2677,7 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C

Return the first processor that accepts has at least one MIDI input and at least one audio output. In the vast majority of cases, this will be "the instrument". This does not preclude other MIDI->audio processors later in the processing chain, but that would be a special case not covered by this utility function.

Amptrim () Cast + Automatableto_automatable () Trackto_track ()

Inherited from ARDOUR:Stripable

@@ -2841,7 +2850,6 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C AudioEngineengine () longframe_rate ()

"actual" sample rate of session, set by current audioengine rate, pullup/down etc.

- doubleframes_per_timecode_frame () unsigned intget_block_size () boolget_play_loop () Routeget_remote_nth_route (unsigned int) @@ -2878,6 +2886,8 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C Routeroute_by_name (std::string) Routeroute_by_selected_count (unsigned int) RouteGroupListroute_groups () + ...sample_to_timecode_lua (--lua--) + doublesamples_per_timecode_frame () intsave_state (std::string, bool, bool, bool)

save session

snapshot_name
name of the session (use an empty string for the current name)
pending
save a 'recovery', not full state (default: false)
switch_to_snapshot
switch to given snapshot after saving (default: false)
template_only
save a session template (default: false)

Returns zero on success

voidscripts_changed () @@ -2886,8 +2896,12 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C Sourcesource_by_id (ID) TempoMaptempo_map () booltimecode_drop_frames () + booltimecode_drop_frames () + longtimecode_frames_per_hour () longtimecode_frames_per_hour () doubletimecode_frames_per_second () + doubletimecode_frames_per_second () + ...timecode_to_sample_lua (--lua--) Tracktrack_by_diskstream_id (ID) longtransport_frame () booltransport_rolling () @@ -3549,6 +3563,7 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C

Return the first processor that accepts has at least one MIDI input and at least one audio output. In the vast majority of cases, this will be "the instrument". This does not preclude other MIDI->audio processors later in the processing chain, but that would be a special case not covered by this utility function.

Amptrim () Cast + Automatableto_automatable () Trackto_track ()

Inherited from ARDOUR:Stripable

@@ -4529,6 +4544,26 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C unsigned intbeats unsigned intticks +

 Timecode:Time

+

C‡: Timecode::Time

+
+ + + + + + + + + + + + + + + + +
Constructor
Timecode.Time (double)
Data Members
booldrop

Whether this Time uses dropframe Timecode

unsigned intframes

Timecode frames (not audio samples)

unsigned inthours
unsigned intminutes
boolnegative
doublerate

Frame rate of this Time

unsigned intseconds
unsigned intsubframes

Typically unused

 Vamp:Plugin

C‡: Vamp::Plugin

is-a: Vamp:PluginBase

@@ -4875,6 +4910,12 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C
  • ARDOUR.AutomationType.RecSafeAutomation
  • ARDOUR.AutomationType.TrimAutomation
  • ARDOUR.AutomationType.PhaseAutomation
  • +
  • ARDOUR.AutomationType.MidiCCAutomation
  • +
  • ARDOUR.AutomationType.MidiPgmChangeAutomation
  • +
  • ARDOUR.AutomationType.MidiPitchBenderAutomation
  • +
  • ARDOUR.AutomationType.MidiChannelPressureAutomation
  • +
  • ARDOUR.AutomationType.MidiNotePressureAutomation
  • +
  • ARDOUR.AutomationType.MidiSystemExclusiveAutomation
  •  ARDOUR.SrcQuality

    +

     ARDOUR.MidiPortFlags

    +

     ARDOUR.PlaylistDisposition

    - + -
    Ardour 5.5-27-ga2166a2  -  Mon, 05 Dec 2016 23:50:06 +0100
    +
    Ardour 5.5-66-g4992ed1  -  Thu, 08 Dec 2016 13:34:35 +0100
    -- 2.37.2