This project has moved and is read-only. For the latest updates, please go here.

Change vst parameters from sequencer?

Topics: Host Development, Midi, Plugin Parameters
Feb 21, 2015 at 8:51 AM
Hello. Will first say that i really like VST.NET and it is going preaty good with my application.

But now I wounder how I will animate vst parameters from sequencer.

Is it a VstMidiEvent who will pass the changed parameter? Like this:

Or is it Another way to do it?

Right now I just set the parameter directly, like Volyme = value, Pan = value and so on. But if a parameter is changeing very often, more often than the buffer size it will be wrong.

Regards :)
Feb 21, 2015 at 3:30 PM
Thank you.

Typically a host can manipulate the parameters a VST plugin publishes directly. So if you implement parameters in the normal VST.NET way (see the delay sample), the host should be able to see those and manipulate them. You can test this by bringing up the VST plugin UI in the Host (if you do not implement the UI yourself). The host should generate the UI for all the parameters it can find on your VST plugin. Some hosts will also allow incoming MIDI to be mapped to VST plugin parameters, but not all.

You can still intercept MIDI yourself (ProcessEvents) and process it any way you like inside your VST plugin. But I wouldn't bother unless you want to do something special with it... The Midi Note Mapper and Note Sampler sample projects demonstrate how you could handle ProcessEvents (check the source code tab).

Hope it helps,
Feb 21, 2015 at 8:54 PM
Thanks you. I really thought it seems trange, so I googled more about it and saw this forum:

And it seems that FL studio and other DAW application splits the buffer size to smaller Peaces to get an accurate animation.
But I will do that as well and continue with my application :)
Feb 22, 2015 at 7:43 AM
In the case of parameter automation, the host calls into the plugin with a SetParameter method just before Process(replacing). That means that the new parameter value is active for the entire block (BlockSize) of samples that is passed. That means that parameter value changes are not sample accurate. To remedy this, the current sample block is split on the moment the paramater change has to happen. So the first call to Process only contains the sample before the parameter change, then the parameter is changed and then a second call to Process to handle the samples after the parameter change.

Important to note is that you should always look at the actual size of the buffer that is passed to Process - for it can be smaller than the BlockSize occasionally.

Hope it helps,
Feb 22, 2015 at 7:57 AM
Aahh ahokey now I got it! Thank you very much! Now back to work! :)