fl_exec
Run Python code inside FL Studio's embedded interpreter to inspect or modify the open project—channels, mixer, plugins, transport, patterns—and return the assigned result or an error traceback.
Instructions
Run Python inside the running FL's embedded interpreter, where FL's modules (channels, mixer, plugins, transport, patterns, general ...) import. For live reads or changes that need several calls or logic; one call is simpler with fl_call. Returns {ok, value} with what the code assigns to result, or {ok: false, error} with the traceback. FL's sandbox refuses files, sockets and pipes. Changes act on the open project and are not saved. Launches FL if needed. Windows with FL Studio only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| out | No | write the result as JSON to this path (relative to the repo) and return only its size, for large reads; also when `result` is {'__out__': path, 'data': value} | |
| code | Yes | Python source; assign the answer to `result` | |
| timeout | No | seconds to wait for FL's answer |