19.01.2015 Views

VST Virtual Studio Technology

VST Virtual Studio Technology

VST Virtual Studio Technology

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>VST</strong><br />

<strong>Virtual</strong> <strong>Studio</strong> <strong>Technology</strong><br />

Intro to <strong>VST</strong> plug-ins & <strong>VST</strong>.NET<br />

Kevin Reed<br />

2012-2-21


What is <strong>VST</strong><br />

• an interface to<br />

integrate<br />

Audio Synthesizers Audio Effect Plugins<br />

DAW (Digital Audio Workstation)


History • 1996<br />

o SDK released by Steinberg in 1996<br />

o released with Cubase 3.02<br />

o included some basic effect plug-ins<br />

• 1999<br />

o included updates for <strong>VST</strong>i (virtual instruments)<br />

o Neon - the first <strong>VST</strong>i - 16-voice, 2-oscillator virtual<br />

analog synthesizer


Steinberg <strong>VST</strong> SDK<br />

• "Splitting up an effect into these two parts requires some<br />

extra efforts for an implementation of course." [1]<br />

Vst::IComponent<br />

Vst::IAudioProcessor<br />

Processor<br />

<strong>VST</strong>3 Audio Effect<br />

Vst::EditController<br />

Edit Controller<br />

"But this separation<br />

enables the host to run<br />

each component in a<br />

different context. It can<br />

even run them on<br />

different<br />

computers." [1]


Stienberg::IAudioProcessor<br />

• [1]<br />

1. Setup (configuration must happen before<br />

processing)<br />

a. Process Setup (parameters that cannot be changed<br />

during processing)<br />

Stienberg::Vst::ProcessSetup<br />

b. Dynamic Speaker Arrangements<br />

Stienberg::Vst::IAudioProcessor::setBusArrangements<br />

2. Process (implements actual processing)<br />

Stienberg::Vst:IAudioProcessor::process<br />

a. Block Size (processing done in blocks)<br />

b. Audio Buffers<br />

c. Parameters & Automation


<strong>VST</strong>.NET<br />

• "<strong>VST</strong>.NET does nothing with the C++ SDK classes that<br />

Steinberg provides. It interfaces at the lowest level with<br />

the C function pointers and opcodes and translates those<br />

to and from managed code (C# in this case)." [3]<br />

• Why <strong>VST</strong>.NET [2]<br />

• <strong>VST</strong>.NET is easier to learn than the native SDK API<br />

• You can program <strong>VST</strong> plug-ins in any .NET language<br />

• <strong>VST</strong>.NET provides a framework that simplifies and<br />

clarifies the <strong>VST</strong> interfacing options<br />

• It takes far less time to develop a managed <strong>VST</strong>.NET<br />

plug-in than to develop a C/C++ native <strong>VST</strong> plug-in<br />

• Good documentation<br />

• Existing native <strong>VST</strong> knowledge applies


Implementing an Audio Processor<br />

• using Jacobi.Vst.Core;<br />

using Jacobi.Vst.Framework;<br />

class AudioProcessor : IVstPluginAudioProcessor<br />

{<br />

public int BlockSize { get; set; }<br />

public int InputCount {<br />

get { return 2; }<br />

}<br />

public int OutputCount {<br />

get { return 2; }<br />

}<br />

public double SampleRate { get; set;}<br />

public int TailSize {<br />

get { return 0; }<br />

}


Audio Processor (cont.)<br />

• public void Process(VstAudioBuffer[] inputs, VstAudioBuffer[] outputs)<br />

{<br />

VstAudioBuffer input = inputs[0];<br />

VstAudioBuffer output = outputs[0]; for (int index = 0; index <<br />

output.SampleCount; index++)<br />

{<br />

output[index] = input[index];<br />

}<br />

input = inputs[1];<br />

output = outputs[1];<br />

}<br />

for (int index = 0; index < output.SampleCount; index++)<br />

{<br />

output[index] = input[index];<br />

}<br />

public bool SetPanLaw(VstPanLaw type, float gain)<br />

{<br />

return false;<br />

}<br />

}<br />

#endregion


Changing the Interface Manager<br />

• using Jacobi.Vst.Core;<br />

using Jacobi.Vst.Framework;<br />

using Jacobi.Vst.Framework.Plugin;<br />

class MyPlugin : VstPluginWithInterfaceManagerBase<br />

{<br />

public MyPlugin()<br />

: base("My Plugin",<br />

new VstProductInfo("My Product", "My Vendor", 1000),<br />

VstPluginCategory.Synth,<br />

VstPluginCapabilities.NoSoundInStop,<br />

0,<br />

0) // enter unique plugin ID<br />

{}<br />

protected override IVstPluginAudioProcessor CreateAudioProcessor<br />

(IVstPluginAudioProcessor instance)<br />

{<br />

if (instance == null) return new AudioProcessor(this);<br />

}<br />

// base class just returns 'instance'<br />

return base.CreateAudioProcessor(instance);<br />

}<br />

// other methods...


References<br />

• [1] - Stienberg <strong>VST</strong> SDK 3.5 Documentation<br />

• http://www.steinberg.net/en/company/developer.html<br />

• [2] - <strong>VST</strong>.NET Documentation<br />

• http://vstnet.codeplex.com/releases/view/<br />

58390#DownloadId=192723<br />

• [3] - Mark's Blog Cabin<br />

• http://obiwanjacobi.blogspot.com/2008/05/vstnet.html

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!