FL Studio SDK - Understanding how to write FL Studio plugins... timing and events

Discuss how to use FL Studio

Return to “FL Studio Users Forum (Looptalk)”

Forum rules
Please read them here.
[You can only see part of this thread as you are not logged in to the forums]
FleetingShadow
Tue Sep 11, 2018 7:21 am

x

FL Studio SDK - Understanding how to write FL Studio plugins... timing and events

Let's say that I want to write a pair of plugins. One takes input from the Piano Roll, and just looks for note-on/note-off events of different colors. The other one is a gain control with an ADSR - which is triggered by note-on/note-off effects of a specific color.

So on 3 mixer tracks, I add my effect plugin. On track 1, I set it to respond to Pink notes coming from my generator. On track 2, I set it to respond to Blue notes coming from my generator. On track 3, I add it, and set it to respond to Green notes.

The two DLLs communicate via some kind of back channel mechanism (shared memory, with named events - the details aren't important). Once they're paired together in the UI, the generator forwards note on/offs to the effect, which uses it to control starting the ADSR, sustaining the note, and then triggering the release.

Now for the questions:

I don't fully understand the event model. I've read the docs several time now, but I'm not sure how I can keep both plugins in sync.

1) Are generators always processed before Mixers operate in their data? (So I don't have to worry about a mixer racing ahead)
2) Do I get any kind of regular tick which lets me send information between the two plugins to tell them when a note on/off occurs? (FPF_WantNewTick sounds like it's what I need - I just wouldn't generate any output, or register any controller outputs).
3) How do effect plugins get updates on tempo/time/ticks?
4) Related to 3)... Do the plugins get events dispatched, then a ProcessEvent call for the time between events, then more events get dispatchd, and so on?

I'm desperately trying to avoid writing a full VST3 solution, given that FL Studio's API is much more compact and easily understandable. I just need to know if what I'm trying is possible, or not :)

Thanks!
Si









Return to “FL Studio Users Forum (Looptalk)”