Manual

The FL Studio Script Builder allows any MIDI device to be customized for use with FL Studio.


YouTube Overview

Introduction

The layout is built by adding outputs (knobs, buttons, etc.) that match the MIDI controller's layout. Clicking on an output highlights it. Pressing or turning the corresponding device's button or knob, the MIDI data will automatically be set for the layout. A function can be selected from a variety of options for FL Studio to act out when it is used. Two functions are available per output. To access the second function, Shift functionality must be assigned to a button to toggle between the two.

The script functionality includes basic transport control, window management, copy/pasting, random note generation and much more. It also allows buttons to act as a keyboard, provide sequencer, and performance controls. The script is designed to allow the same buttons to control each of these, depending on the active mode.

The script builder has two parts. The layout configuration and the script itself. The script can be downloaded from the GitHub for this project. Follow the instructions there to install before creating the layout.

Once the layout is created on the website, click the Build Layout button. The layout data that appears can be copied and pasted into the config_layout.py. It can alternatively be downloaded as a .txt file, converted by changing .txt to .py, and pasted into the appropriate folder to replace the config_layout.py file there. Up to 10 loadouts can be saved in you browser's storage.

To make full use of the script builder, use Chrome or Firefox. Safari does not allow MIDI connections to the browser. The shortcuts described below can vastly simplify the process of setting up a controller.


Building the Layout

To get started, select a MIDI device from the select box at the top left of the page. Multiple options may appear depending on what is connected to your computer. Any output from the controller should appear in the output box on the left.

Some controllers have more than one connection, so make sure the appropriate one is selected for the button or encoder being set. If the device is not appearing, make sure it is not connected to anything else on your computer(FL Studio, for example).

The seven output types found at the top row each have different actions that can be set to each. Clicking on these buttons will display its corresponding section below. Left clicking the button that appears for the type will add a output. Outputs can always be removed. If no MIDI data is entered they will be ignored. The slider next to the section name sets how many columns are used for each section. This helps better replicate the layout of your controller. Blank spaces can be added for Buttons and Encoders by right clicking the respective buttons. To create a new row, enough blanks will have to be added to fill the current row.

Keyboard and Sequencer will automatically load a set amount of outputs with each press. Multiple sequences and keyboard octaves can be added. More on this below.

To configure the outputs, click the output on the screen you want to set. It should now have a green border. Press the corresponding output on your controller and the MIDI data should automatically appear for the selected output. For buttons, the orange LED should be selected if the output is Toggle and unselected if Momentary. The action you want to the output to trigger can be selected from the drop down. The script allows for a second action to be associated with the button via a "Shift" option. One of the actions that can be selected is "Shift" which can toggle between the two layers of actions. See the Shift entry in the function descriptions for more info.

Shortcuts

Double clicking the 'x' will delete the output. Double clicking a blank space will remove it. Right clicking the number above will clear the MIDI data. Double clicking the top function entry will set the second entry to the same function.

Keyboard Shortcuts:

b - add button

v - add blank button

e - add encoder

w - add blank encoder

p - add performance

o - add blank performance

k - add blank led

l - add led

. - select next output

, - select previous output

t - increment track numbers

r - repeat track numbers


The Auto Button

Some of the output sections have an Auto button. This can greatly simplify the process of inputting MIDI data. If, with most controllers, the MIDI CC numbers are sequential, the Auto Button can be used to automatically fill the outputs. Select the first output and add the MIDI data. With that output selected, pressing the Auto button will auto-fill the rest of the inputs in that section, adding one CC increment for each output. Any output can be used as a starting point. Any data will be overwritten, so this process can be done multiple times in a section.

In the performance section, this behaves a bit differently, as described below.


Load Layout

Some controllers have preset layouts that have been created to ease the layout creation process. If your layout is an option, click to load the layout. Clear all outputs before loading or the new layout will be added to what is already on the page.


Performance

This script allows basic control of Performance mode in FL Studio. The buttons set here will simply toggle clips on and off. Currently, no control of LEDs is possible. These buttons will control FL Studio's Performance mode when it is active, Song Mode is selected and the Playlist is in focus. You do not explicitly activate Performance Mode.

When setting up the layout, for the button's function, choose the row which the button is a part of. The Col number will correspond to the column in the Performance layout. To significantly ease the process, use the width slider to set the desired number of columns. If you highlight and set the MIDI info for the first button, you can press the Auto button to have the rest of the layout filled out automatically. Depending on your controller's MIDI layout, you may need to repeat this for each row or adjust the MIDI info individually. The column and row number will be set for each.


Sequencer

Buttons can be set to toggle channel steps in Sequencer mode. Having a sequencer set also allows control over step parameters by controlling FL Studio's graph editor.

Adding a sequencer will add 16 steps to the layout. There is no limit on the number of sequences that can be added. Setting the functionality to a number will toggle that step of a selected channel on/off when Sequencer is set through the Change Mode function and the Channel window is focused. Other functionality can be set as well to be active while in sequence mode.

The Default Setting section of the layout has some import controls for the sequencer. The sequencer can be toggled to Always On if dedicated sequencer controls are desired. Setting the correct sequence length has important implications as well.

Setting the Default sequence length allows users to control multiple channels. For example, if a controller has 32 pads, 16 pads can be used to control the steps of a selected channel and the next 16 pads can control the next channel. To accomplish this, two sequences can be added with functions set to 1-32. If the sequence length is set to 16, two channels will be controlled. If the length is set to 32, the pads would control steps 1-32 of the selected channel. If more than 32 steps are needed, they will have to be added by editing the code.

As with other output types, the Auto button will automatically increment MIDI data. The Steps button will increment step numbers up to 32. Left-clicking increments the top number, while right-clicking increments the bottom value. Double-clicking will increment both top and bottom.


Keyboard

Buttons can also be set to act as a keyboard. Standard keyboard keys do not need to be set on the layout. Through the script, the keys can be set to only play selected scales or purely Chromatic.

Keys are added one octave at a time but can be left blank if not needed. Although any note can be selected for each output, it is strongly advised to leave the preset selections as the script will adjust these notes for different scales. If more than one octave is added make sure to increment the TRK number for all the keys of each additional octave. These do not represent octaves in the sense of C5, C6, etc. They are merely a count of how many octaves are set. They should start from 1 and increase from there. The Auto button can assist in setting the MIDI data if the controller CCs are sequential. Auto can only count from up C.


LEDs

Currently, control over LED lighting on controllers from the script is limited to start, stop, record, shift and sequencer steps. While it is possible to use the MIDI controller to input the MIDI data, the LEDs MIDI control may not directly correlate the data the button outputs. For most controllers, it will likely be necessary to find the MIDI information in the controller's manual and input it manually. The MIDI ID and CC are the only relevant information. The third entry does not matter as long as a number is entered. LED control should be considered experimental as the script might not be able to account for how every manufacturer handles LED control.