Fl Studio Script Builder is Python script which allows any MIDI controller to work with FL Studio. The layout can be custom designed by the user through a web app available at www.midicontrol.cc.
Download by clicking the green Code button above and selecting Download ZIP. Unzip the download and place the folder in the following directory:
%userprofile%\Documents\Image-Line\FL Studio\Settings\Hardware
When unzipped, everything should be in a folder named something like fl-studio-all-devices. This entire folder should be placed in the above directory.
Two files in the folder allow user control of the script functionality. The first, config.py, can be edited by the user. Descriptions of what each setting affects are in that file. It can be opened in a text editor or IDE to be edited but the name must not be changed.
The second file is config_layout.py. This file should be empty when downloaded. The layout data generated by the web app listed above, should be placed here. It can be copy and pasted into this file. It can also be downloaded directly from the website but it will in the form of a .txt file. It must be converted to a .py file. This can be accomplished by simply renaming the file and changing txt to py. If, on Windows, you do not see .txt, click View on the File Explorer and check the File Name Extensions option.
Upon opening FL Studio, go to MIDI Options and select the controller. Under device scripts, select the no_defaults script.
If you have more than one contoller that uses the script, you will need additional instances of it. An additional copy of the folder will be needed for each. The folder can be named anything. Rename the device_no-default.py file. It MUST start with device_ . It can be named anything else after. For example,
device_no-default.py
can be changed to
device_korg_nanoKontrol2.py
Open this file and edit the first line. As is, the first line is # name=No Default. Again, it must start with # name= but after that it can be named anything. This is what will appear in the list of available scripts under MIDI Options.
# name=No Default
can be change to
# name=Korg nanoKontrol2
Once created, it may be easier in certain situations to edit the config_layout.py file directly, rather than using the web app. Even users with no coding experience should have little issue.
Before editing, it may be helpful to reformat the code for better legibility. Search the web for a Python reformatter and past the output back into the file.
The options.txt file is a reference for the function names that can be assigned to controller outputs. Open the options.txt file in the script folder to find the correct data to input. As an example, we can edit the button currently set to metronome to focus the browser instead. Looking at config_layout, we find this entry,
"8": {
"actions": ["metronome", "escape"],
"channel": 1,
"midi": [176, 49, 0, 176],
"toggle": 0,
"track": 0,
},
options.txt has this entry:
Focus Browser - focus_browser
Copy the function name and replace the previous entry resulting it:
"8": {
"actions": ["focus_browser", "escape"],
"channel": 1,
"midi": [176, 49, 0, 176],
"toggle": 0,
"track": 0,
},
The first entry, the one changed here, controls the function when unshifted. Escape will be active when shift is active.
If you have issues, in FL Studio, go to View and click Script Output. Copy the error info you see there. Either create a github issue or, presuming you found out about this script via YouTube, post a the issue there with the copied data.
If a process error appears, it is likely due to an error with the dictionary in the layout_config.py file.