Skip to main content

CoreModule

namespace CoreModule

The CoreModule serves as the backbone of the application, organizing and executing foundational logic.
It provides a centralized system for managing interactions, parameter transformations, and application state,
ensuring seamless operation and integration of various components.

Members​

DataManager​

static

Class representing a data manager for handling track data and UI placeholders.

ParameterManager​

static

DEFAULT_TRACK_ID​

static

Default track ID used across the application.

Type: string

TRACK_ID​

static

Currently active track ID. Initially set to null.

Type: string | null

PRIORITY_MAP​

static

Defines priority levels for various controller types.

Type: object

DEFAULT_PRIORITY​

static

Fallback priority value for undefined controller types.

Type: number

MIDI_SUPPORTED​

static

Indicates whether the browser supports the Web MIDI API.

Type: boolean

linear​

static

Linear transformation (identity).
Suitable for parameters where linear scaling is appropriate.

Type: Transformation

PROPERTYTYPEDESCRIPTION
forwardfunction

Returns the input value unchanged.

inversefunction

Returns the input value unchanged.

logarithmic​

static

Logarithmic transformation.
Converts a normalized [0,1] value to a dB scale suitable for audio volume.
Handles edge cases by clamping input to avoid invalid logarithmic operations.

Type: Transformation

PROPERTYTYPEDESCRIPTION
forwardfunction

Maps normalized [0,1] to dB scale.

inversefunction

Maps dB scale back to normalized [0,1].

setupInteractions​

static

Sets up interactions for dynamic placeholder updates.
Initializes ButtonGroups and registers MIDI controllers if supported.

Returns: void

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
dataManagerDataManager

The shared DataManager instance.

audioPlayerAudioPlayer

The shared AudioPlayer instance.

Throws:

Will log an error if Bootstrap is not loaded.

registerMenuItemsWithMIDIController​

static

Registers all dropdown items in the initialized ButtonGroups with MIDIController.
Ensures that MIDI interactions are properly linked to the corresponding UI elements.

Returns: void

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
buttonGroupsArray<ButtonGroup>

List of initialized ButtonGroup instances.

applyColorsFromTrackData​

static

Applies color configurations to the document based on track data.
Updates CSS variables and redraws UI components to reflect new colors.

Returns: void

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
trackDataobject

The track data containing color information.

updateKnobsFromTrackData​

static

Dynamically creates and updates knobs based on track data.
Configures UI components for sound engine parameters.

Returns: void

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
trackDataobject

The track data containing sound engine parameters.

Throws:

Will log an error if track data or sound engine information is missing.

initializeApp​

staticasync

Initializes the application.
Fetches track data, sets up the scene, and configures interactions.

Throws:

Will log an error if initialization fails.

initializeRootParams​

static

Initializes root parameters for the ParameterManager.
Dynamically maps parameters to the manager based on track data.

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
parameterManagerParameterManager

Instance of the ParameterManager to configure.

trackDataObject

Data for the current track.

trackData.soundEngineObject

Sound engine data for the track.

trackData.soundEngine.soundEngineParamsObject

Parameters for the sound engine.