### Lua Reaper Array: Convert to Table Source: https://github.com/fliprubin/reaper-docs/blob/main/reaper_api_lua_part_4.md Returns a new Lua table containing values from the `reaper.array` object. An optional 1-based `offset` can specify the starting point, and if `size` is omitted, all available values from the offset are used. ```APIDOC {reaper.array}.table([offset, size]) offset: integer, optional. 1-based offset to start reading from array. size: integer, optional. Number of values to include in the table. If omitted, all available values from offset are used. ``` -------------------------------- ### Display Popup Menu in REAPER GFX API Source: https://github.com/fliprubin/reaper-docs/blob/main/reaper_api_lua_part_4.md Shows a popup menu at the current `gfx.x` and `gfx.y` coordinates. Menu items are defined by a string with fields separated by '|'. ```APIDOC gfx.showmenu("str") Parameters: str: String. A list of fields separated by '|' characters. Each field represents a menu item. Notes: Shows a popup menu at gfx.x,gfx.y. Fields can start with special characters. ``` -------------------------------- ### Configure Font in REAPER GFX API Source: https://github.com/fliprubin/reaper-docs/blob/main/reaper_api_lua_part_4.md Configures the font used for graphics display in REAPER. Allows setting font face, size, and style flags (italics, underline, bold). Affects `gfx.texth`. ```APIDOC gfx.setfont(idx[, "fontface", sz, flags]) Parameters: idx: Number. 0 for default bitmapped font (no configuration possible). 1-16 for a configurable font. fontface: String (optional). E.g., "Arial". sz: Number (optional). Font size 8-100. flags: String (optional). Multibyte character, can include 'i' for italics, 'u' for underline, or 'b' for bold. Notes: Flags may or may not be supported depending on the font and OS. After calling, gfx.texth may be updated to reflect the new average line height. ``` -------------------------------- ### Update Graphics Display in REAPER GFX API Source: https://github.com/fliprubin/reaper-docs/blob/main/reaper_api_lua_part_4.md Updates the graphics display, if a graphics window is currently open. ```APIDOC gfx.update() Notes: Updates the graphics display, if opened. ``` -------------------------------- ### Resize Image in REAPER GFX API Source: https://github.com/fliprubin/reaper-docs/blob/main/reaper_api_lua_part_4.md Resizes an image referenced by its index. The contents of the image become undefined after resizing. ```APIDOC gfx.setimgdim(image, w, h) Parameters: image: Number. Index of the image (0-1023). w: Number. New width (0-8192). h: Number. New height (0-8192). Notes: The contents of the image will be undefined after the resize. ``` -------------------------------- ### Perform Transformed Blit in REAPER GFX API Source: https://github.com/fliprubin/reaper-docs/blob/main/reaper_api_lua_part_4.md Blits a source image to a destination with transformation. Uses a table of S,T coordinates to define how source texture coordinates map to the destination. ```APIDOC gfx.transformblit(srcimg, destx, desty, destw, desth, div_w, div_h, table) Parameters: srcimg: Number. Source image index. destx: Number. Destination X coordinate. desty: Number. Destination Y coordinate. destw: Number. Destination width. desth: Number. Destination height. div_w: Number. Horizontal division count (2-64). div_h: Number. Vertical division count (2-64). table: Table or reaper.array. A table of 2*div_w*div_h values representing S,T coordinates in the source image. Treated as a left-right, top-bottom list of texture coordinates. Notes: Blits to destination at (destx,desty), size (destw,desth). ``` -------------------------------- ### Set Pixel Color in REAPER GFX API Source: https://github.com/fliprubin/reaper-docs/blob/main/reaper_api_lua_part_4.md Writes a pixel of the specified RGB color at the current `gfx.x` and `gfx.y` coordinates. ```APIDOC gfx.setpixel(r, g, b) Parameters: r: Number. Red component. g: Number. Green component. b: Number. Blue component. Notes: Writes a pixel of r,g,b to gfx.x,gfx.y. ``` -------------------------------- ### Write Value to Shared Memory in REAPER Source: https://github.com/fliprubin/reaper-docs/blob/main/reaper_api_lua_part_4.md Writes a number value to the shared memory segment currently attached via `gmem_attach()`. ```APIDOC reaper.gmem_write(index, value) Parameters: index: Number. Index within the ``` -------------------------------- ### Lua Reaper Array: Multiply Array Values Source: https://github.com/fliprubin/reaper-docs/blob/main/reaper_api_lua_part_4.md Multiplies values from a `reaper.array` object. It reads from a source offset and writes to a destination offset, both 1-based. An optional `size` parameter specifies the number of values to process. ```APIDOC {reaper.array}.multiply([src, srcoffs, size, destoffs]) src: reaper.array, optional. The source array to multiply from. srcoffs: integer, optional. 1-based offset to start reading from source. size: integer, optional. Number of values to multiply. destoffs: integer, optional. 1-based offset to start writing to destination. ``` -------------------------------- ### Lua Reaper Array: Resize Array Object Source: https://github.com/fliprubin/reaper-docs/blob/main/reaper_api_lua_part_4.md Resizes a `reaper.array` object to a new specified size. The `size` parameter must be within the valid range [0..max_size]. ```APIDOC {reaper.array}.resize(size) size: integer, required. The new size for the array (0 to max_size). ``` -------------------------------- ### Lua Reaper Array: Perform Inverse Real FFT Source: https://github.com/fliprubin/reaper-docs/blob/main/reaper_api_lua_part_4.md Performs a backwards complex-to-real Fast Fourier Transform (FFT) of a specified size. The `size` parameter must be a power of two between 4 and 32768. An optional `permute` parameter, if true, shuffles values into FFT-order before the IFFT. ```APIDOC {reaper.array}.ifft_real(size[, permute, offset]) size: integer, required. Power of two (4-32768 inclusive). permute: boolean, optional. If true, values will be shuffled to fft-order. offset: integer, optional. ``` -------------------------------- ### Attach to Shared Memory Segment in REAPER Source: https://github.com/fliprubin/reaper-docs/blob/main/reaper_api_lua_part_4.md Causes `gmem_read()` and `gmem_write()` to operate on a specified EEL2/JSFX/Video shared memory segment. Returns the previous segment name (6.20+). ```APIDOC reaper.gmem_attach(sharedMemoryName) Parameters: sharedMemoryName: String. The name of the shared memory segment. Set to empty string to detach. Returns: String (6.20+). The previous shared memory segment name. Notes: Causes gmem_read()/gmem_write() to read EEL2/JSFX/Video shared memory segment named by parameter. ``` -------------------------------- ### Draw Filled Triangle/Convex Polygon in REAPER GFX API Source: https://github.com/fliprubin/reaper-docs/blob/main/reaper_api_lua_part_4.md Draws a filled triangle or any convex polygon using a series of X,Y coordinate pairs. ```APIDOC gfx.triangle(x1, y1, x2, y2, x3, y3[, x4, y4...]) Parameters: x1, y1: Number. Coordinates of the first vertex. x2, y2: Number. Coordinates of the second vertex. x3, y3: Number. Coordinates of the third vertex. x4, y4...: Number (optional). Additional coordinates for a convex polygon. Notes: Draws a filled triangle, or any convex polygon. ``` -------------------------------- ### Read Value from Shared Memory in REAPER Source: https://github.com/fliprubin/reaper-docs/blob/main/reaper_api_lua_part_4.md Reads a number value from the shared memory segment currently attached via `gmem_attach()`. ```APIDOC reaper.gmem_read(index) Parameters: index: Number. Index within the shared memory segment (0 to 2^25 - 1). Returns: Number. Value from shared memory attached-to by gmem_attach(). ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.