This project has moved. For the latest updates, please go here.

Newbee on board

Dec 3, 2009 at 2:40 AM

First of all, a million thanks for a great and generous effort, obiwanjacobi!

I have just started my journey in the VST world. So I am still fumbling aroud to find a way into the code. I have transferred the two assemblies to my computer, and they build and run as they should. A good start in other wordss.

I am heading towards making a vst plugin that can take on any number of input channels, do some DSP and deliver audio to a different number of output channels. The DSP is quite CPU intensive. Most of the work will take place in separate threads, perhaps also in a separate dll. But it will be made such that it can deliver output in the same instance as it receives input. The plugin will initiate the DSP, feed it with input and capture processed data. Also, the DSP will have an extensive GUI. The plan is to use c# for the overall structure and GUI, and with unmanaged code through pointers. I have a dedicated DSP library that will do all the heavy work so I will keep most of the memory management and calculations outside the .net environment.

I am also thinking about making a simple vst host for this plugin. I need to have a complete understanding of the vst stream to get to where I want and it may come in handy for later steps.

Needless to say, your toolbox comes in very handy. It will probably save me months of work.

I have a  couple of startup questions though.

How and where do the vst host sample connect to a sound card?

The samples.delay plugin seems to modify just one word at a time. What about the rest of the buffer? Or do the inputs and output buffers have buffer length = 1?

And finally - given the task I'm at - can you give me a suggestion of a good approach? Which pieces should I bring to the puzzle in order to get a speedy start that also has a future?

Kind regards,

Bernt

Coordinator
Dec 3, 2009 at 8:21 AM

Thanx! Welcome on board, Bernt!

Well, it sounds to me that you have got it all figured out! ;-) Just remember that VST.NET Interop will change the GCSettings.LatenceMode temporarily during Process and Get/SetParameter calls. So its best to pre-allocate managed memory upfront (large allocations during LowLatency mode is "sub optimal" ;-). 

"How and where do the vst host sample connect to a sound card?"

It doesn't. Checkout ASIO.NET on codeproject.com or NAudio here on codeplex. VST.NET only support the communication with the (managed/unmanaged) plugin. Thats it. All other aspects are specific to what kind of host you want to implement. It has a VstAudio(Precision)BufferManager class that will allocate unmanaged memory for the audio buffers (one allocation for all buffers) but thats about the only "extra".

"The samples.delay plugin seems to modify just one word at a time. What about the rest of the buffer? Or do the inputs and output buffers have buffer length = 1?"

Its just a delay (not a reverb) so it just add the delayed sound to the current sound playing on a per-sample-basis (and adds that sample to the end of the buffer).

"And finally - given the task I'm at - can you give me a suggestion of a good approach? Which pieces should I bring to the puzzle in order to get a speedy start that also has a future?"

Like I said: what you explained sounds like a good approach. Doing a variable number of input- and output channels can be tricky (I've heard - have no experience with it myself). Check out the UpdatePluginInfo method on the IVstHostCommandStub interface. Call that to update the underlying (AEffect) structure that contains the number of input and output channels. There is something in VST called VaraibleIO but VST.NET does not support that (yet ;-). Create an Issues and get people to vote for it if you want/need it.

Finally, check out this forum at KVRAudio. This is were most of the plugin gurus hang out. Any VST.NET specific questions you can ask here on this discussion list.

Good luck with your project.

Grtx, Marc