This file was auto-generated with zdoccer.js 2.0.3
- @holzchopf/flstudio-control-surface-state
- The state format
class FLControlSurfaceStatetype FLCSSControlTypeName = keyof typeof FLCSSControlTypeRawtype FLCSSControlTypeId = typeof FLCSSControlTypeRaw[FLCSSControlTypeName]const FLCSSControlType =class FLCSSEventGroupgetEventOfType<T extends FLCSSEvent>(type: FLCSSEventTypeId): T|undefinedgetEventOfTypeName<T extends FLCSSEvent>(type: FLCSSEventTypeName): T|undefinedgetEventsOfType<T extends FLCSSEvent>(type: FLCSSEventTypeId): T[]|undefinedgetEventsOfTypeName<T extends FLCSSEvent>(type: FLCSSEventTypeName): T[]|undefinedgetEvents(): FLCSSEvent[]setEvents(events: FLCSSEvent[])
type FLCSSEventTypeName = keyof typeof FLCSSEventTypeRawtype FLCSSEventTypeId = typeof FLCSSEventTypeRaw[FLCSSEventTypeName]const FLCSSEventType =abstract class FLCSSEventclass FLCSSBinaryEvent extends FLCSSEventclass FLCSSStringEvent extends FLCSSEventclass FLCSSStartControlEvent extends FLCSSEventclass FLCSSEnableControlEvent extends FLCSSEventfunction createEvent(type: number, buffer?: ArrayBuffer)class FLCSSOptions extends FLCSSEventGroupclass FLCSSControl extends FLCSSEventGroup
original Markdown from src/_preamble.md
Allows to read and write FL Studio Control Surface states. The main goal of this package is to modify Control Surface states.
The state consists of a header, followed by body consisting of a variable number of events. I chose the name event because the official documentation for the .flp file format - which used a similar "event" based approach - called those data packages events.
The header typically 4 bytes long. Probably indicating the format version, it is usually the number 1 stored as uint32le
| Offset | Format | Description | Typical Value |
|---|---|---|---|
| 0 | uint32le | version | 0x01 00 00 00 |
The body is of variable length and consists of events. Each event has this structure:
| Offset | Format | Description | Typical Value |
|---|---|---|---|
| 0 | uint32le | type | |
| 4 | uint64le | size (byte) of event data | |
| 12 | - | event data |
All events can be grouped into Control Surface options (types 20xx) or controls (types 21xx). Listed here are event types typically found:
This event is typically 64 bytes long and contains Control Surface settings:
| Offset | Format | Description | Typical Value |
|---|---|---|---|
| 0 | uint32le | skip (skip # numbers for the next control's name) | |
| 4 | uint32le | flags Bit 0: edit Bit 1: hide buttons Bit 2: hide labels |
|
| 8 | uint32le | grid size |
The rest of the data is typically set to 0x00.
This event is typically 8 bytes long.
| Offset | Format | Description |
|---|---|---|
| 0 | uint32le | width |
| 4 | uint32le | height |
This event is typically 4 bytes long.
| Offset | Format | Description | Typical Value |
|---|---|---|---|
| 0 | uint32le | unknown | 0x02 00 00 00 |
This event is typically 32 bytes long.
| Offset | Format | Description | Typical Value |
|---|---|---|---|
| 0 | uint32le | control type |
The rest of the data is typically set to 0x00.
This event is typically 0 bytes long.
This event is typically 12 bytes long and describes how to expose this control. A Control can have multiple of these events (i.e. X/Y Controllers have two).
| Offset | Format | Description | Typical Value |
|---|---|---|---|
| 0 | float32le | current value | |
| 4 | float32le | default value | |
| 8 | uint32le | list index |
The value of this event is a utf-16le string.
This event is typically 16 bytes long and describes the position and size of the control.
| Offset | Format | Description | Typical Value |
|---|---|---|---|
| 0 | float32le | x center coordinate | |
| 4 | float32le | y center coordinate | |
| 8 | float32le | width | |
| 12 | float32le | height |
The value of this event is a utf-16le string. It typically contains all the definitons a .ilcontrol file contains.
The value of this event is a utf-16le string. It typically contains the color definitions from the ILControl event.
The value of this event is a utf-16le string. It typically contains the property definitions from the ILControl event.
transformed Javadoc from src/fl-control-surface.ts
Class representing an FL Studio Control Surface plugin state.
State version number.
Surface options.
Controls on this surface.
Creates the binary data for this surface and returns it.
Sets this surface's values from binary data.
- param
bufferβ Binary data.
transformed Javadoc from src/flcss-control-type.ts
Known control type names.
Known control type IDs.
Types of controls in a FLCSSStartControlEvent π‘΅.
Returns the name of a given control type ID, or 'unknown'.
- param
idβ Control type ID.
Returns the ID for a given control type name, or undefined
- param
nameβ Control type name.
transformed Javadoc from src/flcss-event-group.ts
Class representing a group of FLCSSEvent π‘΅s.
Returns the first event in this group of given type id.
- param
typeβ FLCSSEventTypeId π‘΅
Returns the first event in this group of given type name.
- param
typeβ FLCSSEventTypeName π‘΅
Returns all events in this group of given type id.
- param
typeβ FLCSSEventTypeId π‘΅
Returns all events in this group of given type name.
- param
typeβ FLCSSEventTypeName π‘΅
Returns the FLCSSEvent π‘΅s making up this group.
Sets the FLCSSEvent π‘΅s making up this group.
transformed Javadoc from src/flcss-event-type.ts
Known event names.
Known event IDs.
Types of the events in an FLCSSEventGroup π‘΅.
Returns the name of a given event ID, or 'unknown'.
- param
idβ Event ID.
Returns the ID for a given event name, or undefined
- param
nameβ Event name.
transformed Javadoc from src/flcss-event.ts
Base class for state events.
Numeric FLCSSEventType π‘΅.
Name of FLCSSEventType π‘΅. Readonly.
Returns this event's binary data.
Sets this event's binary data.
- param
bufferβ Binary data.
Event with unspecified binary data.
Event with string value data.
Event starting a new FLCSSControl π‘΅
Describes how a control is exposed. Enabled controls will have at least one of these events.
Factory function to create a new specific FLCSSEvent.
- param
typeβ FLCSSEventType. - param
valueβ Binary data for this event.
transformed Javadoc from src/flcss-options.ts
Class representing control surface options. Extends FLCSSEventGroup π‘΅.
Settings event.
Settings event.
transformed Javadoc from src/flcss-surface-control.ts
Class representing a control on the surface. Extends FLCSSEventGroup π‘΅.
Start event.
End event.
Enable events.
Name event.
Dimension event.
ILControl event.
Color event.
Properties event.