Crate fpsdk

Source
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.
MessageBoxFlags
Message box flags (see https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-messagebox).
MidiMessage
MIDI message.
NameColor
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 message plugin::message::AddToPianoRoll.
NotesFlags
Notes parameters flags.
ParamMenuEntry
Describes an item that should be added to a control’s right-click popup menu.
ParamMenuItemFlags
Parameter popup menu item flags.
ParameterFlags
Parameter flags.
ProcessModeFlags
Processing mode flags.
ProcessParamFlags
Processing parameters flags.
SampleLoadFlags
Sample loading flags.
SongTime
Song time in bar:step:tick format.
Time
Time.
TimeSignature
Time signature.
ValuePtr
Raw pointer to value.

Enums§

MessageBoxResult
The result returned by a message box.
TimeFormat
Time format.
Transport
if Jog, StripJog, MarkerJumpJog, MarkerSelJog, Previous or Next don’t answer, PreviousNext will be tried. So it’s best to implement at least PreviousNext.

Constants§

CURRENT_SDK_VERSION
Current FL SDK version.
WAVETABLE_SIZE
Size of wavetable used by FL.

Traits§

AsRawPtr
For types, which can be represented as intptr_t.
FromRawPtr
For conversion from intptr_t.