Skip to content

Vel Volume

Stl.VelVolume

Import

import "_IVLS/std-library/nodes/components/vel-volume.ksp"

Node: Stl.VelVolume

Uses: Init

Overview

Stl.VelVolume

Provides velocity-to-volume mapping for the IVLS standard library. Loads a lookup table (vel_db) indexed by velocity and a VelVolume control value, then exposes interpolation helpers to compute the resulting volume in millidB.

API

Nodes

Name Description
node Stl.VelVolume Node that manages velocity-to-volume mapping state, loading the vel_db lookup ta...

Functions

Name Description
vel_vol.calc_vel_mdb_mod(input, vel) -> return Computes the velocity-based volume modifier in millidB by linearly interpolating...
vel_vol.steps(arg) -> rs Returns the fractional step offset within a VelVolume stride for the given contr...
vel_vol.x(arg) -> rs Returns the lower table column index for the given VelVolume control value.
vel_vol.y(arg) -> rs Returns the upper table column index (y) for interpolation, clamped so it does n...

Nodes

node Stl.VelVolume

Callbacks: Init

Node that manages velocity-to-volume mapping state, loading the vel_db lookup table on init and providing interpolation functions for computing velocity-based volume adjustments.


Functions

vel_vol.calc_vel_mdb_mod(input, vel) -> return

Computes the velocity-based volume modifier in millidB by linearly interpolating between two adjacent vel_db entries for the given control and velocity values.

Parameter Type Description
input integer VelVolume control value (0 to 1000)
vel integer MIDI velocity (0 to 127)

Returns: return — volume modifier in millidB


vel_vol.steps(arg) -> rs

Returns the fractional step offset within a VelVolume stride for the given control value.

Parameter Type Description
arg integer VelVolume control value (0 to 1000)

Returns: rs — step remainder within the current stride (0 to VEL_MOD_STRIDE-1)


vel_vol.x(arg) -> rs

Returns the lower table column index for the given VelVolume control value.

Parameter Type Description
arg integer VelVolume control value (0 to 1000)

Returns: rs — lower column index into vel_db (0 to 10)


vel_vol.y(arg) -> rs

Returns the upper table column index (y) for interpolation, clamped so it does not exceed the last valid column (10).

Parameter Type Description
arg integer VelVolume control value (0 to 1000)

Returns: rs — upper column index into vel_db (0 to 10)


Example

// TODO: Add usage example

See Also