Skip to content

Table Pars

Tables Variant

Import

import "_IVLS/std-library/nodes/components/engine-box/table-pars.ksp"

Overview

Tables Variant

LIBRARY MODULE

Parameter engine variant for array/table storage without modulation support.

  • Data.Tables.Create(name) — creates engine with 2D persistent data[] and data.buffer[]
  • Data.Tables.Functions(name) — generates table-specific functions; disables modulation, randomization, display
  • Generates per-parameter indexed accessor properties via Data._TableParProperty
  • Table data addressed by DIMS + table index; no scalar value operations

API

Properties

Name Description
property #name#.ctrl_id Gets or sets the bound UI control ID for a table parameter.
property #name#.i Gets or sets table value at index, triggering control update on set.
property #name#.i.back_only Gets or sets table value at index without triggering a control update.
property #par# Gets or sets table value at index for this parameter.
property par.#meta_par# Gets or sets the #meta_par# metadata value for a parameter.
property par.#meta_par#.all Sets #meta_par# metadata for all dimension combinations of a parameter (write-...

Macros

Name Description
Data.Tables.ACCB(#name#) Table variant of ACCB for async_complete callback; delegates to Data.ACCB.
Data.Tables.Create(#name#) Creates a table-based parameter engine for parameters that are themselves arrays.
Data.Tables.Functions(#name#) Generates table-specific functions and disables inapplicable base functions.
Data.Tables.Listen(#widget#, #name#, #par#) Table variant of Listen; delegates to Data.Listen.
Data.Tables.PCCB(#name#) Table variant of PCCB for persistence_changed callback, without validation or mo...
Data.Tables.SnapLoaded(#name#) Table variant of SnapLoaded; delegates to Data.SnapLoaded.
Data.Tables.SnapLocked(#name#) Table variant of SnapLocked; delegates to Data.SnapLocked.
Data.Tables.UICBS(#name#) Table variant of UICBS for ui_controls callback, without XY pad handling.

Functions

Name Description
#name#.load_defaults() Overrides base load_defaults to delegate to the table-specific hook.
#name#.receive_uicb(data_id, null) Handles table UI callback with modified signature.
#name#.submit_idx_value(#name#.DIMS, ui_id, idx, value) Submits single table index value.
#name#.submit_table(#name#.DIMS, ui_id) Submits entire table from UI widget.
#name#.update_ctrl_value(#name#.DIMS) Overrides base update_ctrl_value for table engines.
#name#.update_multiplex_ctrl(#name#.DIMS) Overrides base update_multiplex_ctrl for table engines.
#name#.update_table_widget(#name#.DIMS, ui_id) Writes all table indices to a table widget.
#name#.write_idx_value(#name#.DIMS, idx, value) Writes single table index to storage.
#name#.write_value(#name#.DIMS, ui_id_src) Writes all table values from source widget to storage.

Properties

property #name#.ctrl_id

Gets or sets the bound UI control ID for a table parameter.


property #name#.i

Gets or sets table value at index, triggering control update on set.


property #name#.i.back_only

Gets or sets table value at index without triggering a control update.


property #par#

Gets or sets table value at index for this parameter.


property par.#meta_par#

Gets or sets the #meta_par# metadata value for a parameter.


property par.#meta_par#.all

Sets #meta_par# metadata for all dimension combinations of a parameter (write-only).


Macros

Data.Tables.ACCB(#name#)

Table variant of ACCB for async_complete callback; delegates to Data.ACCB.

Parameter Description
#name# engine namespace

Side effects:

  • Delegates to Data.ACCB()

Data.Tables.Create(#name#)

Creates a table-based parameter engine for parameters that are themselves arrays.

Preconditions:

  • #name#.DIMS, #name#.SIZES, #name#.TABLE_SIZE, #name#.par.MEMBERS must be defined
  • data.engine_id.#name# must be defined as a unique engine ID
Parameter Description
#name# engine namespace

Side effects:

Name Type Purpose
#name#.data[] int[] Table data storage (SIZES x TABLE_SIZE)
#name#.data.buffer[] int[] Table buffer (SIZES x TABLE_SIZE)
  • Generates #name#.i, #name#.i.back_only, #name#.ctrl_id properties
  • Generates per-parameter properties via Data._TableParProperty
  • Calls Data._CreateCommon() at end

Notes: No modulation array is created for table engines. Many standard API functions are disabled (randomization, range conversion, etc.).


Data.Tables.Functions(#name#)

Generates table-specific functions and disables inapplicable base functions.

Preconditions:

  • Data.Tables.Create() must have been called first
Parameter Description
#name# engine namespace

Side effects:

  • Calls Data.Functions() to generate base functions
  • Adds table-specific functions (update_table_widget, submit_table, etc.)
  • Overrides many base functions with empty bodies

Notes:

The following base functions are disabled/overridden for table engines: validate, reset_modulation, set_range, set_random_range, _set_range, ranges.ctrl_to_engine, ranges.engine_to_ctrl, ranges._ctrl_to_engine, ranges._engine_to_ctrl, _read_from_ui, _write_to_ui, _submit_value, uicb_intercept, submit_value, read_value, read_value.live, par_cb, _par_cb, par_disp, _par_disp, get_par_disp, process_engine, write_meta, set_meta_par_all, push_defaults_to_ctrls, randomize, randomize_group, randomize_all, reset_randomize_memory, restore_randomize_memory.


Data.Tables.Listen(#widget#, #name#, #par#)

Table variant of Listen; delegates to Data.Listen.

Parameter Description
#widget# UI widget ID
#name# engine namespace
#par# parameter identifier

Side effects:

  • Delegates to Data.Listen()

Data.Tables.PCCB(#name#)

Table variant of PCCB for persistence_changed callback, without validation or modulation reset.

Parameter Description
#name# engine namespace

Side effects:

  • Calls #name#.check_version.response() for version migration
  • Updates #name#.saved_version to current version
  • Updates all controls
  • Pushes defaults to controls

Data.Tables.SnapLoaded(#name#)

Table variant of SnapLoaded; delegates to Data.SnapLoaded.

Parameter Description
#name# engine namespace

Side effects:

  • Delegates to Data.SnapLoaded()

Data.Tables.SnapLocked(#name#)

Table variant of SnapLocked; delegates to Data.SnapLocked.

Parameter Description
#name# engine namespace

Side effects:

  • Delegates to Data.SnapLocked()

Data.Tables.UICBS(#name#)

Table variant of UICBS for ui_controls callback, without XY pad handling.

Parameter Description
#name# engine namespace

Side effects:

  • Dispatches standard control events to #name#.receive_uicb() with (data_id, -1) signature
  • Dispatches multiplexed control events to #name#.multiplex.to_engine()

Functions

#name#.load_defaults()

Overrides base load_defaults to delegate to the table-specific hook. Calls #name#.table.load_defaults() which is empty by default and can be overridden.

Side effects:

  • Calls #name#.table.load_defaults()

#name#.receive_uicb(data_id, null)

Handles table UI callback with modified signature. Overrides base receive_uicb to accept (data_id, null) signature.

Parameter Type Description
data_id int encoded parameter data ID
null int unused parameter (for signature compatibility)

Side effects:

  • Decodes dimensions from data_id
  • Calls #name#.uicb_table_intercept() hook
  • Calls #name#.write_value() to store table data

#name#.submit_idx_value(#name#.DIMS, ui_id, idx, value)

Submits single table index value. Use for per-index updates rather than full table submission.

Parameter Type Description
#name#.DIMS dimension coordinates
ui_id int table widget UI ID
idx int table index to update
value int new value for this index

Side effects:

  • Calls #name#.uicb_table_idx_intercept() hook
  • Calls #name#.write_idx_value() to store value
  • Calls #name#.update_ctrl_value() to sync UI

#name#.submit_table(#name#.DIMS, ui_id)

Submits entire table from UI widget. Reads all values from a table widget and stores them.

Parameter Type Description
#name#.DIMS dimension coordinates
ui_id int table widget UI ID

Side effects:

  • Calls #name#.uicb_table_intercept() hook
  • Calls #name#.write_value() to store table data

#name#.update_ctrl_value(#name#.DIMS)

Overrides base update_ctrl_value for table engines. Routes the update to multiplex or direct table widget sync depending on par_multiplex state.

Parameter Description
#name#.DIMS dimension coordinates identifying the parameter

Side effects:

  • Calls #name#.multiplex.to_ui() if par_multiplex is TRUE
  • Calls #name#.update_table_widget() with the bound ctrl id if a ctrl is assigned

#name#.update_multiplex_ctrl(#name#.DIMS)

Overrides base update_multiplex_ctrl for table engines. Routes the update to multiplex UI sync if par_multiplex is enabled.

Parameter Description
#name#.DIMS dimension coordinates identifying the parameter

Side effects:

  • Calls #name#.multiplex.to_ui() if par_multiplex is TRUE

#name#.update_table_widget(#name#.DIMS, ui_id)

Writes all table indices to a table widget. Syncs complete table data to a UI table control.

Parameter Type Description
#name#.DIMS dimension coordinates
ui_id int table widget UI ID

Side effects:

  • Sets CONTROL_PAR_VALUE for each index in the table widget

#name#.write_idx_value(#name#.DIMS, idx, value)

Writes single table index to storage.

Parameter Type Description
#name#.DIMS dimension coordinates
idx int table index to write
value int value to store

Side effects:

  • Writes to #name#.data[..., idx] and #name#.data.buffer[..., idx]

#name#.write_value(#name#.DIMS, ui_id_src)

Writes all table values from source widget to storage. Overrides base write_value to read from a table widget.

Parameter Type Description
#name#.DIMS dimension coordinates
ui_id_src int source table widget UI ID

Side effects:

  • Reads CONTROL_PAR_VALUE for each table index
  • Writes to #name#.data[] and #name#.data.buffer[]

Example

// TODO: Add usage example

See Also