|
|
Image-Line Software
FL Studio Remote Scripting
FL Studio Remote (FLS Remote) is a free Android or iOS, Tablet or Phone, user-configurable MIDI controller application for FL Studio. Just open FL Studio on your computer and FL Studio Remote on your mobile device and you will be controlling it from your phone or tablet. You can use up to 15 devices, in any combination of Android and iOS simultaneously.
Available in: FL Studio Remote 2.1 / FL Studio 2025.2 and later
Custom Python Scripts for FL Studio Remote
Purpose
Custom Python Scripts allow you to trigger macros from FL Studio Remote pads. This system is infinitely expandable, limited only by the scripting API, and does not require further updates to FL Studio Remote itself.
Getting Started
On the FL Studio Computer Side
- Create your script file (e.g.
myscript.pyscript). Use short names without spaces or special characters.
- The script must define a function with the same name as the file (e.g.
def myscript(...):).
- If the first line begins with
#usage:, it will be treated as a description and sent to FL Studio Remote as documentation (parameters, purpose, etc.). Use ANSI encoding and avoid special characters.
- Save scripts to:
[user data]/FL Studio/Settings/FL Studio Remote Scripts
- All main FL API modules (channels, playlist, patterns, etc.) are preloaded — no need to import them manually.
Example Script
When the Channel Rack is in Loop Starter mode, re-rolls a Channel's Audio Loop
#usage: 2 parameters, chanIndex and useGlobalIndex
def myscript(chanIndex, useGlobalIndex):
channels.rerollLoopStarterLoop(chanIndex, useGlobalIndex)
On the FL Studio Remote Side
- Add a new pad to your layout.
- Edit pad settings and set Mode to Script.
- In the Script field, enter
myscript.
- In the Params field, enter
1,1.
- Pressing the pad will now execute
channels.rerollLoopStarterLoop(1,1), rerolling the Loopstarter loop on channel 1 (if applicable).
Using Control Values as Parameters
You can reference knob or slider values as parameters using the metafunction cc(chan,num), which returns the value of CC #num on MIDI channel #chan. NOTE: This overrides any existing cc function in Python.
Notes
- If a script fails, errors are shown in the debug log panel. You can also (Right-Click) 'Enable FL Studio Remote' checkbox in the MIDI Settings and enable 'Script debugging mode' to make debugging easier (scripts will be always reloaded before execution, and errors will be shown as message boxes).
- A default script called
flrInit runs at device initialization. You can define utility functions here.
- By default,
flrInit provides these helper functions:
mapToRange(value, minValue, maxValue) – Map 0–1 input to a numeric range.
mapToIntRange(value, minValue, maxValue) – Same as above, but returns an integer.
mapToValues(value, values) – Map 0–1 input to a set of discrete values (e.g. [1,2,4,8,16]).
noteToNum(note) – Convert note names (e.g. "C#", "D") to numeric values (0–11).
Example: Using CC Values with Utility Functions
#usage: Fill each "param1" steps of the selected channel, with an offset of "param2" steps
def filleach(n, o):
chanIndex = channels.selectedChannel(0, 0, 1)
channels.fillEachNSteps(chanIndex, n, o, 1)
For example, assign a fader to MIDI channel 10, CC 1, and a pad to run the filleach script. In the pad’s Params field, enter:
maptovalues(cc(10,1), [1,2,4,8,16]), 0
Pressing the pad will now fill every 1, 2, 4, 8, or 16 steps depending on the fader’s position.
Plugin Credits:
Code: Andrey Shakhmin, Pierre M. (ShiniKnobz).
Presets: Andrey Shakhmin, Pierre M. (ShiniKnobz), Arlo (nucleon).
Debugging and testing: Andrey Shakhmin, Sylvain R. (Sickness).
|