From e9607bc8c4713fa3e50f036684683105c3811668 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 4 Jul 2016 00:41:20 +0200 Subject: [PATCH] update lua class doc --- .../24_lua-scripting/02_class_reference.html | 101 +++++++++++++++++- 1 file changed, 96 insertions(+), 5 deletions(-) diff --git a/_manual/24_lua-scripting/02_class_reference.html b/_manual/24_lua-scripting/02_class_reference.html index 0153bf4..8940880 100644 --- a/_manual/24_lua-scripting/02_class_reference.html +++ b/_manual/24_lua-scripting/02_class_reference.html @@ -597,6 +597,8 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C Methods voidcompute (Type, double, double, double)

setup filter, compute coefficients

type
filter type (LowPass, HighPass, etc)
freq
filter frequency
Q
filter quality
gain
filter gain
+ voidconfigure (double, double, double, double, double) +

setup filter, set coefficients directly

floatdB_at_freq (float)

filter transfer function (filter response for spectrum visualization)

freq
frequency

Returns gain at given frequency in dB (clamped to -120..+120)

voidreset () @@ -623,6 +625,20 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C IntArrayto_int (unsigned long)

access memory as integer array

off
offset in shared memory region

Returns int_32_t[]

+

 ARDOUR:DSP:FFTSpectrum

+

C‡: ARDOUR::DSP::FFTSpectrum

+
+ + + + + + + + + + +
Constructor
ARDOUR.DSP.FFTSpectrum (unsigned int, double)
Methods
voidexecute ()

process current data in buffer

floatfreq_at_bin (unsigned int)
floatpower_at_bin (unsigned int, float)

query

b
the frequency bin 0 .. window_size / 2
norm
gain factor (set equal to for 1/f normalization)

Returns signal power at given bin (in dBFS)

voidset_data_hann (FloatArray, unsigned int, unsigned int)

 ARDOUR:DSP:LowPass

C‡: ARDOUR::DSP::LowPass

@@ -918,6 +934,8 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C
+ + @@ -1295,6 +1313,7 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C + @@ -2736,6 +2755,59 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C
Methods
LuaTablehsla_to_rgba ()

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)

Processornew_plugin (Session, std::string, PluginType, std::string)
voidraise_region (Region)
voidraise_region_to_top (Region)
Regionregion_by_id (ID)
RegionListPtrregion_list ()
RegionListPtrregions_at (long)
RegionListPtrregions_touched (long, long)
start
Range start.
end
Range end.

Returns regions which have some part within this range.

voidunset_dash ()

This function disables a dash pattern that was set with set_dash()

+

 Cairo:ImageSurface

+

C‡: LuaCairo::ImageSurface

+
+

wrap RefPtr< Cairo::ImageSurface >

Image surfaces provide the ability to render to memory buffers either allocated by cairo or by the calling code. The supported image formats are those defined in Cairo::Format.

+ + + + + + + + + + + + + + + +
Constructor
Cairo.ImageSurface (Format, int, int)
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 ()

Returns the stride of the image surface in bytes (or 0 if surface is not an image surface). The stride is the distance in bytes from the beginning of one row of the image data to the beginning of the next row.

intget_width ()

Gets the width of the ImageSurface in pixels

voidset_as_source (Context, int, int)
+

 Cairo:PangoLayout

+

C‡: LuaCairo::PangoLayout

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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--)

Determines the logical width and height of a Pango::Layout in device units.

std::stringget_text ()

Gets the text in the layout. The returned text should not be freed or modified.

Returns The text in the layout.

WrapModeget_wrap ()

Gets the wrap mode for the layout.

Use is_wrapped() to query whether any paragraphs were actually wrapped.

Returns Active wrap mode.

boolis_ellipsized ()

Queries whether the layout had to ellipsize any paragraphs.

This returns true if the ellipsization mode for layout is not Pango::ELLIPSIZE_NONE, a positive width is set on layout, and there are paragraphs exceeding that width that have to be ellipsized.

Returns true if any paragraphs had to be ellipsized, false otherwise.

boolis_wrapped ()

Queries whether the layout had to wrap any paragraphs.

This returns true if a positive width is set on layout, ellipsization mode of layout is set to Pango::ELLIPSIZE_NONE, and there are paragraphs exceeding the layout width that have to be wrapped.

Returns true if any paragraphs had to be wrapped, false otherwise.

voidset_ellipsize (EllipsizeMode)

Sets the type of ellipsization being performed for layout. Depending on the ellipsization mode ellipsize text is removed from the start, middle, or end of text so they fit within the width and height of layout set with set_width() and set_height().

If the layout contains characters such as newlines that force it to be layed out in multiple paragraphs, then whether each paragraph is ellipsized separately or the entire layout is ellipsized as a whole depends on the set height of the layout. See set_height() for details.

ellipsize
The new ellipsization mode for layout.
voidset_markup (std::string)

Sets the layout text and attribute list from marked-up text (see markup format). Replaces the current text and attribute list.

markup
Some marked-up text.
voidset_text (std::string)

Set the text of the layout.

text
The text for the layout.
voidset_width (int)

Sets the width to which the lines of the Pango::Layout should wrap or ellipsized. The default value is -1: no width set.

width
The desired width in Pango units, or -1 to indicate that no wrapping or ellipsization should be performed.
voidset_wrap (WrapMode)

Sets the wrap mode; the wrap mode only has effect if a width is set on the layout with set_width(). To turn off wrapping, set the width to -1.

wrap
The wrap mode.
voidshow_in_cairo_context (Context)

 Evoral:Beats

C‡: Evoral::Beats

@@ -3068,8 +3140,6 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C
  • ARDOUR.PresentationInfo.Flag.Selected
  • ARDOUR.PresentationInfo.Flag.Hidden
  • ARDOUR.PresentationInfo.Flag.GroupOrderSet
  • -
  • ARDOUR.PresentationInfo.Flag.GroupMask
  • -
  • ARDOUR.PresentationInfo.Flag.SpecialMask
  • ARDOUR.PresentationInfo.Flag.StatusMask
  •  ARDOUR.AutoStyle

    @@ -3174,6 +3244,24 @@ Pointer Classes cannot be created in lua scripts. It always requires a call to C
  • Cairo.Operator.Over
  • Cairo.Operator.Add
  • +

     Cairo.Format

    + +

     Pango.EllipsizeMode

    + +

     Pango.WrapMode

    +

     LuaSignal.LuaSignal

    - + -
    Ardour 5.0-pre0-25-g46ae5aa  -  Wed, 01 Jun 2016 16:01:28 +0200
    +
    Ardour 5.0-pre0-406-g3267b48  -  Mon, 04 Jul 2016 00:40:28 +0200
    -- 2.37.2