Control surfaces represent a control on a device. The are instantiated during
the construction of Device
objects, and are indirectly mapped to by plugins,
via the ControlShadow
type.
This is all the control surfaces defined in the control_surfaces
module.
Classes labelled with *
have a Master
variant, which represents that
control surface, but specifically for the master channel.
Note
: Represents a note eventModWheel
: Represents a modulation wheelStandardModWheel
: a mod wheel that behaves in the standard way
PitchWheel
: Represents a pitch bend wheelStandardPitchWheel
: a pitch wheel that behaves in the standard wayData2PitchWheel
: a pitch wheel that only sends pitch data in thedata2
byte of the event.
AfterTouch
: Represents after-touch eventsChannelAfterTouch
NoteAfterTouch
Pedal
: Represents a foot pedalSustainPedal
SostenutoPedal
SoftPedal
Button
: Represents a button (used by many transport controls)ControlSwitchButton
: Used as a command for plugins to switch modes, for example switching from omni mode to sequencer mode in the channel rack.JogWheel
: Represents an encoder used for transport and navigation.StandardJogWheel
: Scrolling and changing selectionShiftedJogWheel
: Scrolling and changing selection, but along the opposite axisMoveJogWheel
: Moving selection
TransportButton
: Buttons used for transportPlayButton
StopButton
LoopButton
: Toggle FL Studio's loop modeRecordButton
FastForwardButton
RewindButton
MetronomeButton
NavigationButton
: Buttons used for navigating FL StudioDpadButtons
: Buttons used for directionsDirectionUp
DirectionDown
DirectionLeft
DirectionRight
DirectionSelect
NextPrevButton
: Next and previous buttonsDirectionNext
DirectionPrevious
FaderButton
* : Represents a button commonly found near a fader.GenericFaderButton
* : A button that can act as a mute or solo controlMuteButton
* : A mute track buttonSoloButton
* : A solo track buttonArmButton
* : An arm track buttonSelectButton
* : A select track button
Fader
* : Represents a fader (linear slider).Knob
* : Represents a knob (rotating dial).ModXY
: 2D modulation surfaceModX
: 2D modulation surface (X component)ModY
: 2D modulation surface (Y component)
Encoder
: Represents an encoder (endlessly rotating dial)DrumPad
: Represents a drum padMacroButton
: Represents a button used to perform some action in FL StudioSaveButton
: SaveUndoRedoButton
: Redo if possible, otherwise undoUndoButton
: UndoRedoButton
: RedoQuantizeButton
: QuantizeCaptureMidiButton
: Dump score log to selected pattern
ActivityButton
:SwitchActiveButton
: Button that switches between plugins and windows for controllers designed with a split activity schemeSwitchActivePluginButton
: Switch activity to the active pluginSwitchActiveWindowButton
: Switch activity to the active windowSwitchActiveToggleButton
: Toggle activity between plugins and windows
PauseActiveButton
: Pause updating of the active plugin and window.
HintMsg
: A control that shouldn't map to any events, but which should use anAnnotationManager
to display the contents of FL Studio's hint panel.NotifMsg
: A control that shouldn't map to any events, but which should use anAnnotationManager
to display notification messages.NullEvent
: Used to handle events that the script should ignore
Control surfaces can be instantiated by providing any of the following arguments:
-
event_pattern
: an event pattern that can be used to recognize the event. If not provided, the control can never be matched. -
value_strategy
: a value strategy that can be used to determine a value from events. If not provided, the control won't get values. -
coordinate
: the coordinate of the control. Defaults to(0, 0)
. -
annotation_manager
: anAnnotationManager
. -
color_manager
: aColorManager
-
value_manager
: aValueManager
As well as this, some control surfaces provide class methods to create instances without specifying all the properties.
As a general rule of thumb, new control surfaces types shouldn't be created except for those that don't match any existing types. This should be discussed in the Discord server before creating one. This is because having more control surface types will make it harder to assign controls easily within plugins.
By default, the provided control surfaces don't provide any advanced functionality such as color or annotation support. If a control on your device supports this, or requires logic that doesn't work well with the parent class (such as the M-Audio Hammer 88 Pro's pitch wheel), it should implement it in a child class to the control surface it most accurately represents, and then implement any required functions.
-
tick(self)
: Called when a tick happens. This should be used to send any events required to keep the control functioning. For example, if your controller is prone to losing LED colors randomly (like the Novation Launchkey Mk2 Series), it can send out a color update every few ticks. Note that these events should be limited to reduce slowness. -
@staticmethod isPress(value: float) -> bool
: Should return whether a particular value is equivalent to a button press (as opposed to a lift), used to detect double presses. By default this is implemented for most control surfaces, but can be overridden if needed.