Console¶
The Console is a pre-built mixing and FX management subsystem distributed as a separate library (_CONSOLE-K7), not part of the IVLS SDK itself. It handles channel volumes, send levels, insert FX chains, master FX, and the FX edit pane UI. Products import it and configure it through a set of CONSOLE_CONFIG defines and a single response function hook.
Why Console Exists¶
Building a mixing UI from scratch — with FX slots, send routing, channel strips, an edit pane, and all the widget binding — is substantial work that is identical across instruments. Console packages all of it as a reusable library node. Products define their channel count and widget locations, and Console provides the entire mixing layer.
Key Concepts¶
Importing Console¶
Console is brought in via a single node import that pulls in all UI widgets, engine nodes, and callback infrastructure:
import '_CONSOLE-K7/node-import.ksp'CONSOLE_CONFIG Defines¶
The per-product console-config.ksp sets defines before Console initializes. These tell Console where its widgets live and how many channels to activate.
Standard single stereo channel (Sylvan Phrases):
define CONSOLE_CONFIG.ENABLED_CHANNELS := 1
define CHANNEL_WIDGET_LOCATION := Console.Channel
define CHANNEL_FX_WIDGET_LOCATION := Console.Channel
define MASTER_WIDGET_LOCATION := Console.Master
define MASTER_FX_WIDGET_LOCATION := Console.MasterFx
define EDIT_PANE_WIDGET_LOCATION := Console.FxEdit
define EDIT_PANE_MODEL_LOCATION := Console.FxEdit.Models
define GLOBAL_FX_SWITCH := FxEnableFor a 4-channel mic mixer (close, room, overhead, spot): CONSOLE_CONFIG.ENABLED_CHANNELS := 4.
console.config() Macro¶
After the defines, the product supplies a console.config() macro that sets runtime options. Console calls this during its own init sequence. It sets channel display names, enables FX routing modes, defines the edit pane bounding box, and supplies widget sizing constants and picture names from the Console skin bundle.
console.ui_cb.response¶
This function is the product's hook into Console widget events. Console calls it whenever a user interacts with a channel fader, send knob, enable button, or similar control. The product declares it once in console-config.ksp:
function console.ui_cb.response(ch, slot, type)
select type
case console.ui.cb_type.CHANNEL_VOLUME
set_engine_par(ENGINE_PAR_VOLUME, console.channel_data[ch].volume, ch, -1, -1)
case console.ui.cb_type.CHANNEL_ENABLED
purge.execute()
case console.ui.cb_type.CHANNEL_SEND
// ch = channel, slot = send slot index
case console.ui.cb_type.MASTER_VOLUME
// update master output volume
end select
end functionAlways use console.ui.cb_type.* named constants rather than raw integers. Console's internal numbering can change between library versions.
For simple products (like Sylvan), Console's built-in engine integration handles volume and FX automatically — the response body can be empty.
Console Purge Response¶
When a channel is toggled on or off, purge.execute() must be called to re-evaluate group states (see purge). Without it, toggling a channel off does not evict its groups from RAM.
Mic Mixer Variant¶
For a 4-channel mic mixer:
define CONSOLE_CONFIG.ENABLED_CHANNELS := 4Console indexes channel widgets as Console.Channel.Ch0 through Console.Channel.Ch3. A typical Tokyo Scoring-style response:
function console.ui_cb.response(ch, slot, type)
select type
case console.ui.cb_type.CHANNEL_ENABLED
// ch: 0=Close, 1=Room, 2=Overhead, 3=Spot
purge.execute()
case console.ui.cb_type.CHANNEL_VOLUME
// Apply volume to the corresponding group bus
end select
end functionctrl_link_add for Console-Linked Parameters¶
Some Engine Box parameters appear both in the main UI and on Console channel strips. ctrl_link_add adds a secondary widget to an existing parameter binding:
function plc.layers.console_widget_override()
<! for l in range(0, 4) !>
plc.layers.ctrl_link_add(<:l:>, plc.layers.par.ENABLE,
get_ui_id(console.ui.Channel.Ch<:l:>.Enabled))
<! endfor !>
end functionWhen plc.layers[l].enable changes, both the rack enable button and the Console channel enable button update. Call this function from cb PostReload so the link is re-established after every preset load.
Connections to Other Parts of IVLS¶
Console integrates with purge (channel enable/disable triggers group eviction), engine-box (via ctrl_link_add for shared parameters), and ui-callbacks (the console.ui_cb.response hook parallels the general callback system).
Patterns and Caveats¶
- Console requires that
console-config.kspbe imported before the Console node-import. The defines and macro must exist before Console initializes. - The
GLOBAL_FX_SWITCHdefine names the widget that bypasses all FX. This widget must exist in the UI tree at the specified name. - Edit pane coordinate constants (
PANE_TOP,PANE_BOTTOM,PANE_LEFT,PANE_RIGHT) define the FX edit pane's display area within the instrument UI. Incorrect values cause the pane to appear off-screen. - Products using a different skin must supply matching picture names (
KNOB_PIC,BTN_PIC, etc.) from their own skin bundle.
Related¶
- purge — channel enable/disable must trigger purge.execute()
- engine-box — ctrl_link_add links Console widgets to box parameters