### LXEngine Configuration and Lifecycle Source: https://chromatik.co/api/heronarts/lx/LXEngine Methods for loading, starting, stopping, and disposing of the LXEngine. ```APIDOC ## LXEngine Configuration ### Description Loads the LX component from a JSON object. ### Method `load(LX lx, JsonObject obj)` ### Endpoint N/A (Instance Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None (Method is void) #### Response Example None --- ## LXEngine Lifecycle ### Description Starts the engine thread. ### Method `start()` ### Endpoint N/A (Instance Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None (Method is void) #### Response Example None --- ## LXEngine Lifecycle ### Description Stops the engine thread. ### Method `stop()` ### Endpoint N/A (Instance Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None (Method is void) #### Response Example None --- ## LXEngine Lifecycle ### Description Invoked when a component is being removed from the system and will no longer be used. ### Method `dispose()` ### Endpoint N/A (Instance Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None (Method is void) #### Response Example None ``` -------------------------------- ### LXPreferences Initial Loading Methods Source: https://chromatik.co/api/heronarts/lx/LXPreferences This snippet covers methods for loading initial project and schedule configurations. It includes variations for loading with or without file overrides and fallback options. ```java public void loadInitialProject(File overrideProjectFile) public void loadInitialProject(File overrideProjectFile, File fallbackProjectFile) public void loadInitialSchedule() ``` -------------------------------- ### MidiFighterTwister Remote Control Methods (Java) Source: https://chromatik.co/api/heronarts/lx/midi/surface/MidiFighterTwister Methods related to remote control functionality, including getting the length and start of the remote control, and checking if it's an auxiliary control. ```java int getRemoteControlLength() int getRemoteControlStart() boolean isRemoteControlAux() ``` -------------------------------- ### LXVirtualParameter Methods Source: https://chromatik.co/api/heronarts/lx/parameter/LXVirtualParameter Documentation for the methods available in the LXVirtualParameter class, including getting and setting parameter values and retrieving the real parameter. ```APIDOC ## Methods ### `getRealParameter()` **Description:** Returns the underlying real parameter to operate on. This method is abstract and must be implemented by subclasses. **Method:** `protected abstract LXParameter` **Endpoint:** N/A ### `reset()` **Description:** Resets the value of the parameter to its default, if available. This method is inherited from `LXParameter`. **Method:** `public final LXParameter` **Endpoint:** N/A **Returns:** `this` (the LXVirtualParameter instance) ### `setValue(double value)` **Description:** Sets the value of the parameter. This method is inherited from `LXParameter`. **Method:** `public final LXParameter` **Endpoint:** N/A **Parameters:** - **value** (double) - Required - The value to set for the parameter. **Returns:** `this` (the LXVirtualParameter instance) ### `getValue()` **Description:** Retrieves the current value of the parameter. **Method:** `public double` **Endpoint:** N/A **Returns:** Parameter value as a double. ### `getValuef()` **Description:** Utility helper function to get the value of the parameter as a float. **Method:** `public float` **Endpoint:** N/A **Returns:** Parameter value as a float. ### `getLabel()` **Description:** Gets the label for this parameter. This method is inherited from `LXParameter` and `LXPath`. **Method:** `public String` **Endpoint:** N/A **Returns:** Label of the parameter. ``` -------------------------------- ### Create New Project Source: https://chromatik.co/api/heronarts/lx/LX Initializes a new, empty project. This method resets the system to a blank project state. ```java public void newProject() ``` -------------------------------- ### Get Modulation Target Source: https://chromatik.co/api/heronarts/glx/ui/component/UIParameterControl Fetches the target for compound modulation. As defined by the `UIModulationTarget` interface, this method returns the specific target component for a complex modulation setup. ```java public LXCompoundModulation.Target getModulationTarget() Specified by: `getModulationTarget` in interface `UIModulationTarget` ``` -------------------------------- ### LXMidiEngine Constructor and Initialization Source: https://chromatik.co/api/heronarts/lx/midi/LXMidiEngine Documentation for the constructor and initialization methods of the LXMidiEngine. ```APIDOC ## LXMidiEngine Constructor ### Description Initializes a new instance of the LXMidiEngine. ### Method `LXMidiEngine(LX lx)` ### Parameters - **lx** (LX) - Required - The main LX system instance. ## Initialize LXMidiEngine ### Description Initializes the MIDI engine. This method should be called after the engine has been loaded. ### Method `void initialize()` ## Load LXMidiEngine ### Description Loads the LXMidiEngine component, potentially from a JSON object. ### Method `void load(LX lx, JsonObject object)` ### Parameters - **lx** (LX) - Required - The main LX system instance. - **object** (JsonObject) - Required - The JSON object containing configuration for the engine. ``` -------------------------------- ### Get Preset Folder Source: https://chromatik.co/api/heronarts/lx/LX Gets the folder designated for holding presets specific to a given LXComponent device. ```Java public File getPresetFolder(LXComponent device) Get the folder to hold presets for a device Parameters: `device` - Device Returns: Folder that holds presets for this device ``` -------------------------------- ### System Initialization and Configuration Source: https://chromatik.co/api/heronarts/lx/LX Functions for initializing and configuring the LX system, including creating new projects, setting the system speed, and managing model import and schedule loading flags. ```java void newProject() void setModelImportFlag(boolean modelImport) void setScheduleLoadingFlag(boolean scheduleLoading) void setSpeed(double speed) ``` -------------------------------- ### Get UI.Position.Source Enum Constants (Java) Source: https://chromatik.co/api/heronarts/glx/ui/class-use/UI.Position.Source This snippet demonstrates how to retrieve UI.Position.Source enum constants in Java. It includes methods to get a specific constant by its name or to get an array of all declared constants. These methods are essential for working with the UI.Position.Source enum. ```java UI.Position.Source source = UI.Position.Source.valueOf("NAME"); UI.Position.Source[] sources = UI.Position.Source.values(); ``` -------------------------------- ### GET /getModulationEngine Source: https://chromatik.co/api/heronarts/lx/LXDeviceComponent Gets the modulation engine implementation for this component. This is used to access and control modulation effects within the system. ```APIDOC ## GET /getModulationEngine ### Description Gets the modulation engine implementation for this component. This is used to access and control modulation effects within the system. ### Method GET ### Endpoint /getModulationEngine ### Parameters #### Path Parameters None #### Query Parameters None ### Request Example None ### Response #### Success Response (200) - **modulationEngine** (LXModulationEngine) - The modulation engine instance. #### Response Example ```json { "modulationEngine": "" } ``` ``` -------------------------------- ### LXMidiDevice Method Details Source: https://chromatik.co/api/heronarts/lx/midi/LXMidiDevice Detailed explanations for each method in the LXMidiDevice class. ```APIDOC ## LXMidiDevice Method Details ### `close` `protected abstract void close()` Closes the MIDI device. Abstract method to be implemented by subclasses. ### `open` `public final LXMidiDevice open()` Opens the device for input or output. Simply sets the enabled flag to true, which implementation classes should observe and attempt to comply with. Returns: this ### `getName` `public String getName()` Get the name of the device. Specified by: `getName` in interface `LXMidiTerminal` Returns: Device name ### `toString` `public String toString()` Returns a string representation of the device. Overrides: `toString` in class `Object` ### `getDescription` `public String getDescription()` Get a description of this device. Returns: Device description ### `onEnabled` `protected abstract void onEnabled(boolean enabled)` Subclasses have this method invoked when the enabled state changes. Parameters: `enabled` - Enabled state, if newly set to true, attempt to open ``` -------------------------------- ### Assign LXParameter to Modulate Start Value Source: https://chromatik.co/api/heronarts/lx/modulator/LXRangeModulator Assigns an LXParameter to dynamically modulate the start value of this LXRangeModulator. Returns the modulator instance for chaining. ```java public LXRangeModulator setStartValue(LXParameter startValue) ``` -------------------------------- ### Get Media Path Source: https://chromatik.co/api/heronarts/lx/LX Retrieves the root media path for storing LX-related objects and extensions. This is a utility function to get the base directory for media content. ```Java public String getMediaPath() Get the root media path for storage of LX-related objects and extensions Returns: File path to root storage location of LX-related content ``` -------------------------------- ### SoundStage Initialization and Loading Source: https://chromatik.co/api/heronarts/lx/audio/SoundStage Information on how to initialize and load the SoundStage component. ```APIDOC ## SoundStage Initialization and Loading ### Description Details on how to construct and load data into the SoundStage component. ### Constructor #### `SoundStage(LX lx)` - **Description**: Constructs a new SoundStage instance. - **Parameters**: - **lx** (LX) - The main ChromaTik LX object. ### Methods #### `load(LX lx, JsonObject obj)` - **Description**: Loads the LX component from a JSON object. - **Parameters**: - **lx** (LX) - The main ChromaTik LX object. - **obj** (JsonObject) - The JSON object containing the SoundStage data. ``` -------------------------------- ### LXMidiMapping Static Factory and Utility Methods Source: https://chromatik.co/api/heronarts/lx/midi/LXMidiMapping This snippet shows static methods for creating LXMidiMapping instances and utility methods for creating parameter types. The `create` methods handle instantiation from different inputs, while `makeDiscreteRangeParameter` and `makeBoundedRangeParameter` assist in parameter setup. ```java public static LXMidiMapping create(LX lx, JsonObject object) { // Implementation to create LXMidiMapping from a JsonObject return null; } public static LXMidiMapping create(LX lx, LXShortMessage message, LXNormalizedParameter parameter) { // Implementation to create LXMidiMapping from an LXShortMessage and parameter return null; } public static LXMidiMapping move(LX lx, JsonObject object, String fromPath, String toPath) { // Implementation to move a MIDI mapping return null; } protected static DiscreteParameter makeDiscreteRangeParameter(DiscreteParameter parameter, boolean on, String label, String description) { // Implementation to create a DiscreteParameter return null; } protected static BoundedParameter makeBoundedRangeParameter(LXNormalizedParameter parameter, boolean on, String label, String description) { // Implementation to create a BoundedParameter return null; } ``` -------------------------------- ### MidiFilterParameter Constructor Examples Source: https://chromatik.co/api/heronarts/lx/midi/MidiFilterParameter Examples demonstrating how to instantiate the MidiFilterParameter class. The first constructor takes a label, while the second allows for an initial enabled state to be set. ```java // Constructor with label only MidiFilterParameter filter1 = new MidiFilterParameter("MyFilter"); // Constructor with label and initial enabled state MidiFilterParameter filter2 = new MidiFilterParameter("AnotherFilter", true); ``` -------------------------------- ### LXMidiDevice Constructor Details Source: https://chromatik.co/api/heronarts/lx/midi/LXMidiDevice Detailed explanation of the LXMidiDevice constructor. ```APIDOC ## LXMidiDevice Constructor Details ### `LXMidiDevice` `protected LXMidiDevice(LXMidiEngine engine, MidiDevice device)` Constructor for LXMidiDevice. ``` -------------------------------- ### Get Normalized Parameter Value (Java) Source: https://chromatik.co/api/heronarts/lx/parameter/CompoundDiscreteParameter Gets the value of the parameter in a normalized space, ranging from 0 to 1. This method is specified by the LXNormalizedParameter interface and overrides the getNormalized method in the DiscreteParameter class. ```Java public double getNormalized() ``` -------------------------------- ### LXStudio.Plugin Interface Source: https://chromatik.co/api/heronarts/lx/studio/LXStudio.Plugin The LXStudio.Plugin interface provides methods for initializing the UI and handling UI readiness. It extends the basic LXPlugin interface. ```APIDOC ## Interface LXStudio.Plugin ### Description An LXStudio plugin has a couple extra methods that go beyond the basic LXPlugin interface, which allow the plugin to bootstrap additional extensions at appropriate times in the LX initialization process. ### Methods #### `initializeUI(LXStudio lx, LXStudio.UI ui)` ##### Description This method is invoked to initialize UI state. At this point, the UI object has been constructed, but it has not had any elements added to it. This is an appropriate time for a plugin to register UI handlers, etc. ##### Parameters * **lx** (LXStudio) - LX instance * **ui** (LXStudio.UI) - UI instance #### `onUIReady(LXStudio lx, LXStudio.UI ui)` ##### Description This method is invoked after the UI is completely ready. At this point the UI has been built. Project files have not been loaded yet. Custom components may be added to the completely constructed UI at this point. ##### Parameters * **lx** (LXStudio) - LX instance * **ui** (LXStudio.UI) - UI instance ### Inherited Methods from `LXPlugin` * `dispose` * `initialize` ``` -------------------------------- ### ArtNetDatagram Methods Source: https://chromatik.co/api/heronarts/lx/output/ArtNetDatagram Details the available methods for interacting with an ArtNetDatagram object, including setting and getting the universe number, getting the data length, controlling sequence numbering, and accessing buffer offsets. ```APIDOC ## ArtNetDatagram Methods ### Description This section details the various methods available for managing and querying ArtNetDatagram properties. ### Method Details #### `setUniverseNumber(int universeNumber)` Sets the universe number for the ArtNetDatagram. **Parameters:** - `universeNumber` (int) - The new universe number. **Returns:** - `ArtNetDatagram` - The current ArtNetDatagram instance for chaining. #### `getUniverseNumber()` Gets the current universe number of the ArtNetDatagram. **Returns:** - `int` - The universe number. #### `getDataLength()` Gets the fixed data payload length of the ArtNetDatagram. **Returns:** - `int` - The data length. #### `setSequenceEnabled(boolean sequenceEnabled)` Enables or disables the incrementing and sending of sequence numbers. **Parameters:** - `sequenceEnabled` (boolean) - `true` if sequence numbers should be incremented and transmitted, `false` otherwise. **Returns:** - `ArtNetDatagram` - The current ArtNetDatagram instance for chaining. #### `getDataBufferOffset()` Gets the offset into the raw byte buffer where color data is written. **Description copied from class:** `LXBufferOutput` Offset into raw byte buffer where color data is written. **Specified by:** - `getDataBufferOffset` in class `LXBufferOutput` **Returns:** - `int` - The offset into the raw byte buffer for color data. #### `updateSequenceNumber()` Updates the sequence number in the packet when appropriate, as part of the protocol. **Description copied from class:** `LXDatagram` Subclasses may override to update a sequence number in the packet when appropriate as part of the protocol. **Overrides:** - `updateSequenceNumber` in class `LXDatagram` ``` -------------------------------- ### Get UIRuler.MarkerLocation Enum Constants (Java) Source: https://chromatik.co/api/heronarts/lx/studio/ui/timeline/lane/class-use/UIRuler.MarkerLocation Demonstrates how to retrieve all enum constants of UIRuler.MarkerLocation and how to get a specific constant by its name. These methods are essential for working with enum types in Java. ```java static UIRuler.MarkerLocation UIRuler.MarkerLocation.valueOf(String name) Returns the enum constant of this class with the specified name. static UIRuler.MarkerLocation[] UIRuler.MarkerLocation.values() Returns an array containing the constants of this enum class, in the order they are declared. ``` -------------------------------- ### GLXWindow Class Overview Source: https://chromatik.co/api/heronarts/glx/class-use/GLXWindow Provides an overview of the GLXWindow class, including its fields, methods, and constructors as used in the heronarts.glx package. ```APIDOC ## GLXWindow Class ### Description The `GLXWindow` class represents the window that runs the application and is a key component within the `heronarts.glx` package. ### Fields #### `GLX.window` - **Type**: `final GLXWindow` - **Description**: The window that runs this application. ### Methods #### `GLXApp.buildLXInstance(GLXWindow window, GLX.Flags flags)` - **Description**: Abstract method to build an LX instance. - **Returns**: `protected abstract GLX` #### `GLXWindow.Delegate.onContentScaleChanged(GLXWindow window, float contentScaleX, float contentScaleY)` - **Description**: Callback for when the content scale of the window changes. - **Returns**: `void` #### `GLXWindow.Delegate.onDropFile(GLXWindow window, String fileName)` - **Description**: Callback for when a file is dropped onto the window. - **Returns**: `void` #### `GLXWindow.Delegate.onFramebufferSizeChanged(GLXWindow window, float framebufferWidth, float framebufferHeight)` - **Description**: Callback for when the framebuffer size of the window changes. - **Returns**: `void` #### `GLXWindow.Delegate.onShutdown(GLXWindow window)` - **Description**: Callback for when the window is shutting down. - **Returns**: `void` #### `GLXWindow.Delegate.onWindowClose(GLXWindow window)` - **Description**: Callback for when the window close event is triggered. - **Returns**: `void` #### `GLXWindow.Delegate.onZoomChanged(GLXWindow window, float uiZoom)` - **Description**: Callback for when the UI zoom level of the window changes. - **Returns**: `void` #### `GLXWindow.Delegate.setClipboardText(GLXWindow window, String clipboardText)` - **Description**: Sets the text content of the window's clipboard. - **Returns**: `void` ### Constructors #### `GLX(GLXWindow window)` - **Description**: Constructor for GLX, taking a GLXWindow. - **Modifier**: `protected` #### `GLX(GLXWindow window, GLX.Flags flags)` - **Description**: Constructor for GLX, taking a GLXWindow and flags. - **Modifier**: `protected` #### `GLX(GLXWindow window, GLX.Flags flags, LXModel model)` - **Description**: Constructor for GLX, taking a GLXWindow, flags, and an LXModel. - **Modifier**: `protected` ``` -------------------------------- ### GLXWindow Constructor and Initialization Source: https://chromatik.co/api/heronarts/glx/GLXWindow Initializes a new GLXWindow instance. This constructor must be run on the main thread. ```APIDOC ## GLXWindow Constructor ### Description Initializes a new GLXWindow. This class must be run on the main thread. ### Method `GLXWindow(GLX.Flags flags)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Constructor Details * **`GLXWindow(GLX.Flags flags)`**: Initializes the GLXWindow with the specified flags. ### Request Example ```java GLX.Flags flags = new GLX.Flags(); // Assuming GLX.Flags has a default constructor GLXWindow window = new GLXWindow(flags); ``` ### Response #### Success Response (200) N/A (Constructor) #### Response Example N/A ``` -------------------------------- ### Get LXMatrix.BufferOrder Enum Constants Source: https://chromatik.co/api/heronarts/lx/transform/class-use/LXMatrix.BufferOrder Retrieve specific LXMatrix.BufferOrder enum constants by name or get all declared constants as an array. These methods are useful for accessing and iterating over the available buffer order types. ```java static LXMatrix.BufferOrder LXMatrix.BufferOrder.valueOf(String name) Returns the enum constant of this class with the specified name. static LXMatrix.BufferOrder[] LXMatrix.BufferOrder.values() Returns an array containing the constants of this enum class, in the order they are declared. ``` -------------------------------- ### Get Media Path Relative to Type Source: https://chromatik.co/api/heronarts/lx/LX Gets the path to a file relative to a base media path. This is useful for writing file names into project files, allowing for organized storage within different media types. ```Java public String getMediaPath(LX.Media type, File file) Gets the path to a file relative to a base media path. Useful for writing file names into project files. Parameters: `type` - Media type `file` - File Returns: Relative path to file, from media type base, or absolute if outside of media container ``` -------------------------------- ### LX Instantiation and Loading Source: https://chromatik.co/api/heronarts/lx/class-use/LX Methods related to instantiating the LX registry and loading various LX components from JSON objects. ```APIDOC ## LX Instantiation and Loading ### Description Provides methods for instantiating the LX registry and loading data for various LX components, including devices, preferences, and serializable objects. ### Methods #### `instantiateRegistry(LX lx)` * **Description**: Subclasses may override to provide an enhanced registry with support for more types. * **Method**: Protected LXRegistry #### `load(LX lx, JsonObject obj)` * **Description**: Loads the LX component. * **Method**: void (for LXComponent, LXDeviceComponent, LXEngine, LXPreferences, LXRegistry, LXRegistry.Plugin, LXSerializable) #### `load(LX lx, JsonObject object)` * **Description**: Loads the LX component from a JSON object. * **Method**: void (for LXPreferences, LXRegistry) #### `load(LX lx, JsonObject object)` * **Description**: Loads the LX plugin from a JSON object. * **Method**: void (for LXRegistry.Plugin) ``` -------------------------------- ### Get UISlider.Direction Enum Constants (Java) Source: https://chromatik.co/api/heronarts/glx/ui/component/class-use/UISlider.Direction Demonstrates how to retrieve specific enum constants by name or get all available constants of UISlider.Direction. These methods are essential for programmatic control and iteration over slider directions. ```Java UISlider.Direction directionByName = UISlider.Direction.valueOf("HORIZONTAL"); UISlider.Direction[] allDirections = UISlider.Direction.values(); ``` -------------------------------- ### LXMidiDevice Constructor Summary Source: https://chromatik.co/api/heronarts/lx/midi/LXMidiDevice Information about the constructor used to initialize an LXMidiDevice instance. ```APIDOC ## LXMidiDevice Constructor Summary ### Constructor - **`LXMidiDevice(LXMidiEngine engine, MidiDevice device)`**: Protected constructor to initialize the LXMidiDevice. ``` -------------------------------- ### Get DiscreteParameter Raw Value (Java) Source: https://chromatik.co/api/heronarts/lx/parameter/DiscreteParameter Retrieves the current value of the discrete parameter as an integer. This represents the raw numerical value. Methods are available to get the current value and its base value. ```java public int getValuei() ``` ```java public int getBaseValuei() ``` -------------------------------- ### Chromatik Application Entry Point Source: https://chromatik.co/api/heronarts/lx/studio/Chromatik The main method serves as the entry point for the Chromatik application. It can be used to launch the application with specified arguments, potentially initializing the studio in headless mode. ```java public static void main(String[] args) ``` -------------------------------- ### LXPreferences Other Loading Methods Source: https://chromatik.co/api/heronarts/lx/LXPreferences This snippet includes additional methods for loading preferences and EULA acceptance status. It covers loading general settings, window configurations, and the End User License Agreement. ```java public void loadWindowSettings() public void loadEULA() public void load() ``` -------------------------------- ### SoundObjectEffect.MaskMode Enum Methods (Java) Source: https://chromatik.co/api/heronarts/lx/effect/audio/SoundObjectEffect.MaskMode Provides Java methods for the SoundObjectEffect.MaskMode enum, including static methods to get all values or retrieve a specific constant by name, and an instance method to get a string representation. ```java public static SoundObjectEffect.MaskMode[] values() { // Returns an array containing the constants of this enum class, in the order they are declared. } public static SoundObjectEffect.MaskMode valueOf(String name) { // Returns the enum constant of this class with the specified name. // Throws IllegalArgumentException or NullPointerException if the name is invalid or null. } public String toString() { // Returns a string representation of the enum constant. // Overrides the default toString() method from the Enum class. } ``` -------------------------------- ### System Operations Source: https://chromatik.co/api/heronarts/lx/midi/LXMidiEngine Methods for panic, saving devices, and general saving/loading. ```APIDOC ## panic ### Description Triggers a panic state, likely to reset or stop all MIDI output. ### Method POST ### Endpoint /websites/chromatik_co_api/panic ### Response #### Success Response (200) - **status** (string) - Indicates the panic operation status. ## saveDevices ### Description Saves the current state of all connected MIDI devices. ### Method POST ### Endpoint /websites/chromatik_co_api/saveDevices ### Response #### Success Response (200) - **status** (string) - Indicates the save operation status. ## save ### Description Serializes the LX component and its parameters. Subclasses may override to perform more saving. ### Method POST ### Endpoint /websites/chromatik_co_api/save ### Parameters #### Request Body - **lx** (LX) - Required - The LX instance. - **object** (JsonObject) - Required - The object to serialize into. ### Response #### Success Response (200) - **status** (string) - Indicates the save operation status. ## load ### Description Loads the LX component, restoring its state, parameters, and children. ### Method POST ### Endpoint /websites/chromatik_co_api/load ### Parameters #### Request Body - **lx** (LX) - Required - The LX instance. - **object** (JsonObject) - Required - The object to deserialize from. ### Response #### Success Response (200) - **status** (string) - Indicates the load operation status. ``` -------------------------------- ### Get DiscreteParameter Index (Java) Source: https://chromatik.co/api/heronarts/lx/parameter/DiscreteParameter Retrieves the current index of the discrete parameter. This corresponds to the position of the current value within the available options. Methods are provided to get the current index and its base index. ```java public int getIndex() ``` ```java public int getBaseIndex() ``` -------------------------------- ### Get Scaling Exponent (Java) Source: https://chromatik.co/api/heronarts/lx/parameter/NormalizedParameter Gets the exponent used for scaling a parameter across its normalized range. A default value of 1 indicates linear scaling. This method is specified by the LXNormalizedParameter interface. ```Java public double getExponent() // Description copied from interface: LXNormalizedParameter // Gets the exponent used for scaling this parameter across its normalized range. Default is 1 which means linear scaling. // Specified by: getExponent in interface LXNormalizedParameter // Returns: scaling exponent ``` -------------------------------- ### init Method Source: https://chromatik.co/api/heronarts/lx/studio/ui/fixture/UIFixtureArranger Initializes the UI fixture arranger. ```APIDOC ## POST /init ### Description Initializes the UI fixture arranger. This method should be called before arranging any UI fixtures. ### Method POST ### Endpoint /init ### Parameters #### Query Parameters - **None** #### Request Body - **None** ### Request Example ```javascript // Assuming you have an instance of UIFixtureArranger named 'arranger' arranger.init(); ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the initialization. Example: "initialized" #### Response Example ```json { "status": "initialized" } ``` ``` -------------------------------- ### LXSnapshotEngine - Constructor Details Source: https://chromatik.co/api/heronarts/lx/snapshot/LXSnapshotEngine Details of the LXSnapshotEngine constructor. ```APIDOC ## Constructor Details ### `LXSnapshotEngine` `public LXSnapshotEngine(LX lx)` ``` -------------------------------- ### Get Text3d.VerticalAlignment Enum Constants (Java) Source: https://chromatik.co/api/heronarts/glx/shader/class-use/Text3d.VerticalAlignment Demonstrates how to retrieve the enum constant by name or get all constants from the Text3d.VerticalAlignment enum. This is useful for dynamic retrieval and iteration over enum values. Requires the Text3d.VerticalAlignment enum definition. ```java Text3d.VerticalAlignment alignmentByName = Text3d.VerticalAlignment.valueOf("CENTER"); Text3d.VerticalAlignment[] allAlignments = Text3d.VerticalAlignment.values(); ``` -------------------------------- ### Define QuadraticEnvelope with various LXParameter combinations Source: https://chromatik.co/api/heronarts/lx/parameter/class-use/LXParameter These constructors define a QuadraticEnvelope, which creates a quadratic interpolation between a start and end value over a specified period. They support different combinations of double and LXParameter types for start value, end value, and period. ```Java QuadraticEnvelope(double startValue, double endValue, LXParameter periodMs) ``` ```Java QuadraticEnvelope(double startValue, LXParameter endValue, double periodMs) ``` ```Java QuadraticEnvelope(double startValue, LXParameter endValue, LXParameter periodMs) ``` ```Java QuadraticEnvelope(LXParameter startValue, double endValue, double periodMs) ``` ```Java QuadraticEnvelope(LXParameter startValue, double endValue, LXParameter periodMs) ``` ```Java QuadraticEnvelope(LXParameter startValue, LXParameter endValue, double periodMs) ``` ```Java QuadraticEnvelope(LXParameter startValue, LXParameter endValue, LXParameter periodMs) ``` ```Java QuadraticEnvelope(String label, double startValue, double endValue, LXParameter periodMs) ``` ```Java QuadraticEnvelope(String label, double startValue, LXParameter endValue, double periodMs) ``` ```Java QuadraticEnvelope(String label, double startValue, LXParameter endValue, LXParameter periodMs) ``` ```Java QuadraticEnvelope(String label, LXParameter startValue, double endValue, double periodMs) ``` ```Java QuadraticEnvelope(String label, LXParameter startValue, double endValue, LXParameter periodMs) ``` ```Java QuadraticEnvelope(String label, LXParameter startValue, LXParameter endValue, double periodMs) ``` ```Java QuadraticEnvelope(String label, LXParameter startValue, LXParameter endValue, LXParameter periodMs) ``` -------------------------------- ### Project and File Management Source: https://chromatik.co/api/heronarts/lx/LX Functions for handling project files, including getting preset folders, project files, and components by ID. Also includes methods for opening and saving projects, with options for version checking. ```java File getPresetFolder(LXComponent device) File getProject() LXComponent getProjectComponent(int projectId) void openProject(File file) void openProject(File file, boolean checkVersion) void saveProject() void saveProject(File file) ``` -------------------------------- ### UIMidiSurfaces Constructor Source: https://chromatik.co/api/heronarts/lx/studio/ui/midi/UIMidiSurfaces Initializes a new instance of the UIMidiSurfaces class. ```APIDOC ## UIMidiSurfaces Constructor ### Description Initializes a new instance of the UIMidiSurfaces class with the specified UI, MIDI engine, and width. ### Method CONSTRUCTOR ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java UIMidiSurfaces midiSurfaces = new UIMidiSurfaces(ui, midiEngine, 100.0f); ``` ### Response #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### Define LinearEnvelope with various LXParameter combinations Source: https://chromatik.co/api/heronarts/lx/parameter/class-use/LXParameter These constructors define a LinearEnvelope, which creates a linear interpolation between a start and end value over a specified period. They support different combinations of double and LXParameter types for start value, end value, and period. ```Java LinearEnvelope(double startValue, double endValue, LXParameter periodMs) ``` ```Java LinearEnvelope(double startValue, LXParameter endValue, double periodMs) ``` ```Java LinearEnvelope(double startValue, LXParameter endValue, LXParameter periodMs) ``` ```Java LinearEnvelope(LXParameter startValue, double endValue, double periodMs) ``` ```Java LinearEnvelope(LXParameter startValue, double endValue, LXParameter periodMs) ``` ```Java LinearEnvelope(LXParameter startValue, LXParameter endValue, double periodMs) ``` ```Java LinearEnvelope(LXParameter startValue, LXParameter endValue, LXParameter periodMs) ``` ```Java LinearEnvelope(String label, double startValue, double endValue, LXParameter periodMs) ``` ```Java LinearEnvelope(String label, double startValue, LXParameter endValue, double periodMs) ``` ```Java LinearEnvelope(String label, double startValue, LXParameter endValue, LXParameter periodMs) ``` ```Java LinearEnvelope(String label, LXParameter startValue, double endValue, double periodMs) ``` ```Java LinearEnvelope(String label, LXParameter startValue, double endValue, LXParameter periodMs) ``` ```Java LinearEnvelope(String label, LXParameter startValue, LXParameter endValue, double periodMs) ``` ```Java LinearEnvelope(String label, LXParameter startValue, LXParameter endValue, LXParameter periodMs) ``` -------------------------------- ### LXMidiMapping Creation Source: https://chromatik.co/api/heronarts/lx/midi/class-use/LXMidiMapping Endpoints for creating new LXMidiMapping instances. ```APIDOC ## POST /api/midi/mappings/create ### Description Creates a new LXMidiMapping from a JSON object. ### Method POST ### Endpoint /api/midi/mappings/create ### Parameters #### Request Body - **lx** (object) - Required - The LX instance. - **object** (JsonObject) - Required - The JSON object representing the mapping. ### Request Example ```json { "lx": { ... }, "object": { ... } } ``` ### Response #### Success Response (200) - **LXMidiMapping** (object) - The created LXMidiMapping instance. #### Response Example ```json { "mapping": { ... } } ``` ## POST /api/midi/mappings/create/message ### Description Creates a new LXMidiMapping from an LXShortMessage and LXNormalizedParameter. ### Method POST ### Endpoint /api/midi/mappings/create/message ### Parameters #### Request Body - **lx** (object) - Required - The LX instance. - **message** (LXShortMessage) - Required - The MIDI message. - **parameter** (LXNormalizedParameter) - Required - The normalized parameter. ### Request Example ```json { "lx": { ... }, "message": { ... }, "parameter": { ... } } ``` ### Response #### Success Response (200) - **LXMidiMapping** (object) - The created LXMidiMapping instance. #### Response Example ```json { "mapping": { ... } } ``` ``` -------------------------------- ### GrayTable Field and Method Details in Java Source: https://chromatik.co/api/heronarts/lx/color/GradientUtils.GrayTable Details the 'lut' field, which is a lookup table for gray values, and the 'get' and 'update' methods. The 'get' method retrieves a grayscale color based on brightness, while 'update' refreshes the lookup table. ```java public final int[] lut // Lookup table of gray values public int get(float b) // Gets the LUT grayscale color for this brightness value public void update() ``` -------------------------------- ### UIMidiSurfaces Constructor Source: https://chromatik.co/api/heronarts/lx/studio/ui/midi/UIMidiSurfaces Initializes a new instance of the UIMidiSurfaces class. ```APIDOC ## UIMidiSurfaces Constructor ### Description Constructs a new UIMidiSurfaces object with the specified UI, MIDI engine, and width. ### Method `UIMidiSurfaces(UI ui, LXMidiEngine midiEngine, float w)` ### Parameters * **ui** (UI) - The UI instance to associate with this component. * **midiEngine** (LXMidiEngine) - The MIDI engine to use for MIDI surface management. * **w** (float) - The initial width of the MIDI surfaces component. ``` -------------------------------- ### LXChannel Pattern Management Source: https://chromatik.co/api/heronarts/lx/mixer/LXChannel Provides methods for retrieving and manipulating the list of LXPattern objects associated with an LXChannel. This includes getting all patterns, accessing a pattern by index or label, getting patterns by class name, and setting, adding, removing, or moving patterns within the channel. ```java public final List getPatterns() public final LXPattern getPattern(int index) public final LXPattern getPattern(String label) public final LXPattern getPatternByClassName(String className) public final LXChannel setPatterns(LXPattern[] patterns) public final LXChannel addPattern(LXPattern pattern) public final LXChannel addPattern(LXPattern pattern, int index) public final LXChannel removePattern(LXPattern pattern) public LXChannel movePattern(LXPattern pattern, int index) ``` -------------------------------- ### UI2dComponent Constructors Source: https://chromatik.co/api/heronarts/glx/ui/UI2dComponent Provides details on how to initialize a UI2dComponent. ```APIDOC ## Constructors ### `UI2dComponent()` Creates a new UI2dComponent with default values. ### `UI2dComponent(float x, float y, float width, float height)` Creates a new UI2dComponent with specified position and dimensions. - **x** (float) - The x-coordinate of the component. - **y** (float) - The y-coordinate of the component. - **width** (float) - The width of the component. - **height** (float) - The height of the component. ``` -------------------------------- ### Get Directory Name for LX.Media Enum Constant (Java) Source: https://chromatik.co/api/heronarts/lx/LX.Media This snippet illustrates how to get the directory name associated with an LX.Media enum constant. This method is specific to the LX framework and likely returns a string representation suitable for file system operations. ```java public String getDirName() { // Returns the directory name for this enum constant. } ``` -------------------------------- ### Instantiation Source: https://chromatik.co/api/heronarts/lx/LX Methods for instantiating various LX components, models, fixtures, modulators, patterns, and effects, with error handling for instantiation failures. ```APIDOC ## POST /instantiate/can_instantiate ### Description Checks if a given class can be instantiated as an LXComponent. ### Method POST ### Endpoint /instantiate/can_instantiate ### Parameters #### Request Body - **className** (string) - Required - The fully qualified name of the class to check. ### Response #### Success Response (200) - **canInstantiate** (boolean) - True if the class can be instantiated, false otherwise. #### Response Example ```json { "canInstantiate": true } ``` ## POST /instantiate/model ### Description Instantiates an LXModel based on the provided class name. ### Method POST ### Endpoint /instantiate/model ### Parameters #### Request Body - **className** (string) - Required - The fully qualified name of the LXModel class to instantiate. ### Throws - **LX.InstantiationException** - If the model cannot be instantiated. ### Response #### Success Response (200) - **instance** (LXModel) - The instantiated LXModel object. #### Response Example ```json { "instance": { ... LXModel object ... } } ``` ## POST /instantiate/component ### Description Instantiates an LXComponent based on the provided class name and type. ### Method POST ### Endpoint /instantiate/component ### Parameters #### Request Body - **className** (string) - Required - The fully qualified name of the LXComponent class to instantiate. - **type** (Class) - Required - The expected type of the LXComponent. ### Throws - **LX.InstantiationException** - If the component cannot be instantiated. ### Response #### Success Response (200) - **instance** (T) - The instantiated LXComponent object. #### Response Example ```json { "instance": { ... LXComponent object ... } } ``` ## POST /instantiate/component/cls ### Description Instantiates an LXComponent based on the provided class and type. ### Method POST ### Endpoint /instantiate/component/cls ### Parameters #### Request Body - **cls** (Class) - Required - The class of the LXComponent to instantiate. - **type** (Class) - Required - The expected type of the LXComponent. ### Throws - **LX.InstantiationException** - If the component cannot be instantiated. ### Response #### Success Response (200) - **instance** (T) - The instantiated LXComponent object. #### Response Example ```json { "instance": { ... LXComponent object ... } } ``` ## POST /instantiate/fixture ### Description Instantiates an LXFixture based on the provided class name. ### Method POST ### Endpoint /instantiate/fixture ### Parameters #### Request Body - **className** (string) - Required - The fully qualified name of the LXFixture class to instantiate. ### Throws - **LX.InstantiationException** - If the fixture cannot be instantiated. ### Response #### Success Response (200) - **instance** (LXFixture) - The instantiated LXFixture object. #### Response Example ```json { "instance": { ... LXFixture object ... } } ``` ## POST /instantiate/fixture/cls ### Description Instantiates an LXFixture based on the provided class. ### Method POST ### Endpoint /instantiate/fixture/cls ### Parameters #### Request Body - **cls** (Class) - Required - The class of the LXFixture to instantiate. ### Throws - **LX.InstantiationException** - If the fixture cannot be instantiated. ### Response #### Success Response (200) - **instance** (LXFixture) - The instantiated LXFixture object. #### Response Example ```json { "instance": { ... LXFixture object ... } } ``` ## POST /instantiate/modulator ### Description Instantiates an LXModulator based on the provided class name. ### Method POST ### Endpoint /instantiate/modulator ### Parameters #### Request Body - **className** (string) - Required - The fully qualified name of the LXModulator class to instantiate. ### Throws - **LX.InstantiationException** - If the modulator cannot be instantiated. ### Response #### Success Response (200) - **instance** (LXModulator) - The instantiated LXModulator object. #### Response Example ```json { "instance": { ... LXModulator object ... } } ``` ## POST /instantiate/modulator/cls ### Description Instantiates an LXModulator based on the provided class. ### Method POST ### Endpoint /instantiate/modulator/cls ### Parameters #### Request Body - **cls** (Class) - Required - The class of the LXModulator to instantiate. ### Throws - **LX.InstantiationException** - If the modulator cannot be instantiated. ### Response #### Success Response (200) - **instance** (LXModulator) - The instantiated LXModulator object. #### Response Example ```json { "instance": { ... LXModulator object ... } } ``` ## POST /instantiate/pattern ### Description Instantiates an LXPattern based on the provided class name. ### Method POST ### Endpoint /instantiate/pattern ### Parameters #### Request Body - **className** (string) - Required - The fully qualified name of the LXPattern class to instantiate. ### Throws - **LX.InstantiationException** - If the pattern cannot be instantiated. ### Response #### Success Response (200) - **instance** (LXPattern) - The instantiated LXPattern object. #### Response Example ```json { "instance": { ... LXPattern object ... } } ``` ## POST /instantiate/pattern/cls ### Description Instantiates an LXPattern based on the provided class. ### Method POST ### Endpoint /instantiate/pattern/cls ### Parameters #### Request Body - **cls** (Class) - Required - The class of the LXPattern to instantiate. ### Throws - **LX.InstantiationException** - If the pattern cannot be instantiated. ### Response #### Success Response (200) - **instance** (LXPattern) - The instantiated LXPattern object. #### Response Example ```json { "instance": { ... LXPattern object ... } } ``` ## POST /instantiate/effect ### Description Instantiates an LXEffect based on the provided class name. ### Method POST ### Endpoint /instantiate/effect ### Parameters #### Request Body - **className** (string) - Required - The fully qualified name of the LXEffect class to instantiate. ### Throws - **LX.InstantiationException** - If the effect cannot be instantiated. ### Response #### Success Response (200) - **instance** (LXEffect) - The instantiated LXEffect object. #### Response Example ```json { "instance": { ... LXEffect object ... } } ``` ## POST /instantiate/effect/cls ### Description Instantiates an LXEffect based on the provided class. ### Method POST ### Endpoint /instantiate/effect/cls ### Parameters #### Request Body - **cls** (Class) - Required - The class of the LXEffect to instantiate. ### Throws - **LX.InstantiationException** - If the effect cannot be instantiated. ### Response #### Success Response (200) - **instance** (LXEffect) - The instantiated LXEffect object. #### Response Example ```json { "instance": { ... LXEffect object ... } } ``` ``` -------------------------------- ### Get Normalized Value of DiscreteParameter (Java) Source: https://chromatik.co/api/heronarts/lx/parameter/DiscreteParameter Provides access to the parameter's value in a normalized space, ranging from 0 to 1. This is useful for interpolating or comparing parameter values across different ranges. It includes methods to get the normalized value and convert from a normalized value. ```java public double getNormalized() Description copied from interface: `LXNormalizedParameter` Gets the value of the parameter in a normalized space from 0 to 1 Returns: Value of parameter, normalized to range from 0 to 1 ``` ```java public double getValueFromNormalized(double normalized) Description copied from interface: `LXNormalizedParameter` Get the equivalent raw parameter value from a normalized value Parameters: `normalized` - Normalized value Returns: The equivalent raw value ``` ```java protected int normalizedToValue(double normalized) ``` -------------------------------- ### UIContextButton.HorizontalDirection Enum Source: https://chromatik.co/api/heronarts/glx/ui/component/class-use/UIContextButton.HorizontalDirection Provides methods to get enum constants and values. ```APIDOC ## UIContextButton.HorizontalDirection Enum ### Description Represents the horizontal direction for UIContextButton, specifically when a context menu opens. ### Methods #### `static UIContextButton.HorizontalDirection valueOf(String name)` Returns the enum constant of this class with the specified name. - **name** (String) - The name of the enum constant to return. #### `static UIContextButton.HorizontalDirection[] values()` Returns an array containing the constants of this enum class, in the order they are declared. ### Request Example ```json { "method": "GET", "endpoint": "/enum/UIContextButton.HorizontalDirection/values" } ``` ### Response #### Success Response (200) - **values** (Array) - An array of enum constant names. #### Response Example ```json { "values": ["LEFT", "RIGHT"] } ``` ```