Expand description
The FL Plugin SDK helps you to make plugins for FL Studio. For more information about FL Studio, visit the website.
Note that this SDK is not meant to make hosts for FL plugins.
§How to use this library
You should implement Plugin
and export it with
create_plugin!
.
To talk to the host use Host
, which is passed to the plugin’s
constructor.
examples/simple.rs
in the code repo provides you with more details.
§Types of plugins
There are two kinds of Fruity plugins: effects and generators. Effects are plugins that receive some audio data from FL Studio and do something to it (apply an effect). Generators on the other hand create sounds that they send to FL Studio. Generators are seen as channels by the user (like the SimSynth and Sytrus). The main reason to make something a generator is that it needs input from the FL Studio pianoroll (although there are other reasons possible).
§Installation
Plugins are installed in FL Studio in subfolders of the FL Studio\Plugins\Fruity
folder on
Windows and FL\ Studio.app/Contents/Resources/FL/Plugins/Fruity
for macOS.
Effects go in the Effects subfolder, generators are installed in the Generators subfolder. Each plugin has its own folder.
The name of the folder has to be same as the name of the plugin. On macOS the plugin (.dylib)
also has to have _x64
suffix.
Modules§
- host
- Plugin’s host (FL Studio).
- plugin
- Plugin related stuff.
- voice
- Voices used by generators to track events like their instantiation, release, freeing and processing some events.
Macros§
- create_
plugin - Exposes your plugin from DLL. Accepts type name as input. The type should implement
Plugin
trait.
Structs§
- Button
0
for release,1
for switch (if release is not supported),2
for hold (if release should be expected).- Hold
false
for release,true
for hold.- Jog
- Value is an integer increment.
- Message
BoxFlags - Message box flags (see https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-messagebox).
- Midi
Message - MIDI message.
- Name
Color - Name of the color (or MIDI channel) in Piano Roll.
- Note
- This type represents a note in
Notes
. - Notes
- Collection of notes, which you can add to the piano roll using
Host::on_message
with messageplugin::message::AddToPianoRoll
. - Notes
Flags - Notes parameters flags.
- Param
Menu Entry - Describes an item that should be added to a control’s right-click popup menu.
- Param
Menu Item Flags - Parameter popup menu item flags.
- Parameter
Flags - Parameter flags.
- Process
Mode Flags - Processing mode flags.
- Process
Param Flags - Processing parameters flags.
- Sample
Load Flags - Sample loading flags.
- Song
Time - Song time in bar:step:tick format.
- Time
- Time.
- Time
Signature - Time signature.
- Value
Ptr - Raw pointer to value.
Enums§
- Message
BoxResult - The result returned by a message box.
- Time
Format - Time format.
- Transport
- if
Jog
,StripJog
,MarkerJumpJog
,MarkerSelJog
,Previous
orNext
don’t answer,PreviousNext
will be tried. So it’s best to implement at leastPreviousNext
.
Constants§
- CURRENT_
SDK_ VERSION - Current FL SDK version.
- WAVETABLE_
SIZE - Size of wavetable used by FL.
Traits§
- AsRaw
Ptr - For types, which can be represented as
intptr_t
. - From
RawPtr - For conversion from
intptr_t
.