From fa5c66e2671092fbc294a68426bd76bbfd5b3fb5 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 10 Jul 2016 16:34:19 +0200 Subject: [PATCH] update lua class doc --- .../24_lua-scripting/02_class_reference.html | 109 +++++++++++++++--- 1 file changed, 91 insertions(+), 18 deletions(-) diff --git a/_manual/24_lua-scripting/02_class_reference.html b/_manual/24_lua-scripting/02_class_reference.html index 8940880e..c5fda362 100644 --- a/_manual/24_lua-scripting/02_class_reference.html +++ b/_manual/24_lua-scripting/02_class_reference.html @@ -525,6 +525,7 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C Methods ChanCountcount () AudioBufferget_audio (unsigned long) + MidiBufferget_midi (unsigned long) boolsameinstance (BufferSet)

 ARDOUR:ChanCount

@@ -557,8 +558,12 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C Constructor ℂARDOUR.ChanMapping () Methods + ChanCountcount () unsigned intget (DataType, unsigned int)

get buffer mapping for given data type and pin

from
numeric source id
type
data type

Returns mapped buffer number (or ChanMapping::Invalid)

+ boolis_monotonic () +

Test if this mapping is monotonic (useful to see if inplace processing is feasible)

Returns true if the map is a strict monotonic set

+ unsigned intn_total () voidset (DataType, unsigned int, unsigned int)

set buffer mapping for given data type

from
numeric source id
to
buffer
type
data type
@@ -611,6 +616,8 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C

C/C++ Shared Memory

A convenience class representing a C array of float[] or int32_t[] data values. This is useful for lua scripts to perform DSP operations directly using C/C++ with CPU Hardware acceleration.

Access to this memory area is always 4 byte aligned. The data is interpreted either as float or as int.

This memory area can also be shared between different instances or the same lua plugin (DSP, GUI).

Since memory allocation is not realtime safe it should be allocated during dsp_init() or dsp_configure(). The memory is free()ed automatically when the lua instance is destroyed.

+ + @@ -971,6 +978,14 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C
Constructor
ARDOUR.DSP.DspShm (unsigned long)
Methods
voidallocate (unsigned long)

[re] allocate memory in host's memory space

s
size, total number of float or integer elements to store.
...send (--lua--)

Transmit an OSC message

Path (string) and type (string) must always be given. The number of following args must match the type. Supported types are:

'i': integer (lua number)

'f': float (lua number)

'd': double (lua number)

'h': 64bit integer (lua number)

's': string (lua string)

'c': character (lua string)

'T': boolean (lua bool) -- this is not implicily True, a lua true/false must be given

'F': boolean (lua bool) -- this is not implicily False, a lua true/false must be given

lua:
lua arguments: path, types, ...

Returns boolean true if successful, false on error.

+

 ARDOUR:LuaTableRef

+

C‡: ARDOUR::LuaTableRef

+
+ + + + +
Methods
...get (--lua--)
...set (--lua--)

 ARDOUR:Meter

C‡: ARDOUR::Meter

@@ -1293,8 +1308,7 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C

A named object associated with a Session. Objects derived from this class are expected to be destroyed before the session calls drop_references().

- - + @@ -1321,7 +1335,7 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C - + @@ -1617,8 +1631,8 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C - - + + @@ -1630,7 +1644,7 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C - + @@ -1643,11 +1657,11 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C - + - + @@ -1660,10 +1674,9 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C - - - - + + +
Methods
voidadd_region (Region, long, float, bool)

Note: this calls set_layer (..., DBL_MAX) so it will reset the layering index of region

voidadd_region (Region, long, float, bool, int)
Regioncombine (RegionList)
unsigned intcount_regions_at (long)
Playlistcut (AudioRangeList&, bool)
RegionListPtrregions_with_start_within (Range)
voidremove_region (Region)
voidsplit (long)
voidsplit_region (Region, long)
voidsplit_region (Region, long, int)
Regiontop_region_at (long)
Regiontop_unmuted_region_at (long)
voiduncombine (Region)
boolcaptured ()
voidclear_sync_position ()
boolcovers (long)
voidcut_end (long)
voidcut_front (long)
voidcut_end (long, int)
voidcut_front (long, int)
DataTypedata_type ()
boolexternal ()
boolhidden ()
boollocked ()
voidlower ()
voidlower_to_bottom ()
voidmove_start (long)
voidmove_start (long, int)
voidmove_to_natural_position ()
boolmuted ()
voidnudge_position (long)
voidset_hidden (bool)
voidset_initial_position (long)

A gui may need to create a region, then place it in an initial position determined by the user. When this takes place within one gui operation, we have to reset _last_position to prevent an implied move.

voidset_length (long)
voidset_length (long, int)
voidset_locked (bool)
voidset_muted (bool)
voidset_opaque (bool)
voidset_position (long)
voidset_position (long, int)
voidset_position_locked (bool)
voidset_start (long)
voidset_sync_position (long)
LuaTable(long, ...)sync_offset (int&)
longsync_position ()

Returns Sync position in session time

voidtrim_end (long)
new_endpoint
New region end point, such that, for example, a region at 0 of length 10 has an endpoint of 9.
voidtrim_front (long)
voidtrim_to (long, long)
voidtrim_end (long, int)
voidtrim_front (long, int)
voidtrim_to (long, long, int)
boolvideo_locked ()
boolwhole_file ()
@@ -2601,6 +2614,17 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C Methods RouteListroutelist () +

 C:ByteArray

+

C‡: unsigned char*

+
+ + + + + + + +
Methods
LuaMetaTablearray ()
LuaTableget_table ()
unsigned char*offset (unsigned int)
boolsameinstance (unsigned char*)
voidset_table (LuaTable {unsigned char})

 C:DoubleVector

C‡: std::vector<double >

@@ -2765,8 +2789,6 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C Methods Contextcontext ()

Returns a context object to perform operations on the surface

- unsigned char*get_data () -

Get a pointer to the data of the image surface, for direct inspection or modification.

Return value: a pointer to the image data of this surface or NULL if is not an image surface.

intget_height ()

Gets the height of the ImageSurface in pixels

intget_stride () @@ -2782,8 +2804,6 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C Constructor ℂCairo.PangoLayout (Context, std::string) Methods - intget_character_count () -

Returns the number of Unicode characters in the the text of layout.

Returns The number of Unicode characters in the text of layout.

EllipsizeModeget_ellipsize ()

Gets the type of ellipsization being performed for layout. See set_ellipsize()

Use is_ellipsized() to query whether any paragraphs were actually ellipsized.

Returns The current ellipsization mode for layout.

...get_pixel_size (--lua--) @@ -3002,6 +3022,54 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C unsigned longsize () LuaTabletable () +

 PBD:RingBuffer8

+

C‡: PBD::RingBufferNPT<unsigned char>

+
+ + + + + + + + + + + + +
Constructor
PBD.RingBuffer8 (unsigned long)
Methods
voidincrement_read_ptr (unsigned long)
voidincrement_write_ptr (unsigned long)
unsigned longread (unsigned char*, unsigned long)
unsigned longread_space ()
voidreset ()
unsigned longwrite (unsigned char*, unsigned long)
unsigned longwrite_one (unsigned char)
unsigned longwrite_space ()
+

 PBD:RingBufferF

+

C‡: PBD::RingBufferNPT<float>

+
+ + + + + + + + + + + + +
Constructor
PBD.RingBufferF (unsigned long)
Methods
voidincrement_read_ptr (unsigned long)
voidincrement_write_ptr (unsigned long)
unsigned longread (FloatArray, unsigned long)
unsigned longread_space ()
voidreset ()
unsigned longwrite (FloatArray, unsigned long)
unsigned longwrite_one (float)
unsigned longwrite_space ()
+

 PBD:RingBufferI

+

C‡: PBD::RingBufferNPT<int>

+
+ + + + + + + + + + + + +
Constructor
PBD.RingBufferI (unsigned long)
Methods
voidincrement_read_ptr (unsigned long)
voidincrement_write_ptr (unsigned long)
unsigned longread (IntArray, unsigned long)
unsigned longread_space ()
voidreset ()
unsigned longwrite (IntArray, unsigned long)
unsigned longwrite_one (int)
unsigned longwrite_space ()

 PBD:Stateful

C‡: PBD::Stateful

@@ -3461,6 +3529,7 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C
  • ARDOUR:Locations
  • ARDOUR.LuaAPI
  • ARDOUR:LuaOSC:Address
  • +
  • ARDOUR:LuaTableRef
  • ARDOUR:Meter
  • ARDOUR:MeterSection
  • ARDOUR:MetricSection
  • @@ -3524,6 +3593,7 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C
  • ArdourUI:TimeSelection
  • ArdourUI:TrackSelection
  • ArdourUI:TrackViewList
  • +
  • C:ByteArray
  • C:DoubleVector
  • C:FloatArray
  • C:IntArray
  • @@ -3546,6 +3616,9 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C
  • PBD:Controllable
  • PBD:ID
  • PBD:IdVector
  • +
  • PBD:RingBuffer8
  • +
  • PBD:RingBufferF
  • +
  • PBD:RingBufferI
  • PBD:Stateful
  • PBD:StatefulDestructible
  • PBD:StatefulDestructiblePtr
  • @@ -3554,6 +3627,6 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C
  • PBD:XMLNode
  • Timecode:BBT_TIME
  • - + -
    Ardour 5.0-pre0-406-g3267b48  -  Mon, 04 Jul 2016 00:40:28 +0200
    +
    Ardour 5.0-pre0-573-g7745a37  -  Sun, 10 Jul 2016 16:26:53 +0200