Skip to content

Commit

Permalink
deploy: b6ea131
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrabit committed Oct 11, 2023
1 parent 760e96d commit 5234b0a
Show file tree
Hide file tree
Showing 19 changed files with 93 additions and 93 deletions.
14 changes: 7 additions & 7 deletions .vst3_tutorials/advanced-techniques-tutorial/source/entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,25 @@ BEGIN_FACTORY_DEF ("Steinberg Media Technologies",
// its kVstAudioEffectClass component
DEF_CLASS2 (INLINE_UID_FROM_FUID(ProcessorUID),
PClassInfo::kManyInstances, // cardinality
kVstAudioEffectClass, // the component category (do not changed this)
kVstAudioEffectClass, // the component category (do not change this)
stringPluginName, // here the Plug-in name (to be changed)
Vst::kDistributable, // means that component and controller could be distributed on different computers
DataExchangeVST3Category, // Subcategory for this Plug-in (to be changed)
DataExchangeVST3Category, // Subcategory for this plug-in (to be changed)
FULL_VERSION_STR, // Plug-in version (to be changed)
kVstVersionString, // the VST 3 SDK version (do not changed this, use always this define)
kVstVersionString, // the VST 3 SDK version (do not change this, always use this define)
createProcessorInstance)// function pointer called when this component should be instantiated

// its kVstComponentControllerClass component
DEF_CLASS2 (INLINE_UID_FROM_FUID (ControllerUID),
PClassInfo::kManyInstances, // cardinality
kVstComponentControllerClass,// the Controller category (do not changed this)
stringPluginName "Controller", // controller name (could be the same than component name)
kVstComponentControllerClass,// the Controller category (do not change this)
stringPluginName "Controller", // controller name (can be the same as the component name)
0, // not used here
"", // not used here
FULL_VERSION_STR, // Plug-in version (to be changed)
kVstVersionString, // the VST 3 SDK version (do not changed this, use always this define)
kVstVersionString, // the VST 3 SDK version (do not change this, always use this define)
createControllerInstance)// function pointer called when this component should be instantiated

//----for others Plug-ins contained in this factory, put like for the first Plug-in different DEF_CLASS2---
//----for others plug-ins contained in this factory, same as for the first Plug-in different DEF_CLASS2---

END_FACTORY
4 changes: 2 additions & 2 deletions .vst3_tutorials/advanced-techniques-tutorial/source/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

#define stringOriginalFilename "advanced-techniques-tutorial.vst3"
#if SMTG_PLATFORM_64
#define stringFileDescription "advanced-techniques-tutorial VST3 (64Bit)"
#define stringFileDescription "advanced-techniques-tutorial VST 3 (64Bit)"
#else
#define stringFileDescription "advanced-techniques-tutorial VST3"
#define stringFileDescription "advanced-techniques-tutorial VST 3"
#endif
#define stringCompanyName "Steinberg Media Technologies\0"
#define stringLegalCopyright "Copyright(c) 2023 Steinberg Media Technologies."
Expand Down
2 changes: 1 addition & 1 deletion .vst3_tutorials/dataexchange-tutorial/source/controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class DataExchangeController : public Vst::EditControllerEx1, public Vst::IDataE
bool onBackgroundThread) override;
//---Interface---------
DEFINE_INTERFACES
// Here you can add more supported VST3 interfaces
// Here you can add more supported VST 3 interfaces
DEF_INTERFACE (Vst::IDataExchangeReceiver)
END_DEFINE_INTERFACES (EditController)
DELEGATE_REFCOUNT (EditController)
Expand Down
14 changes: 7 additions & 7 deletions .vst3_tutorials/dataexchange-tutorial/source/entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,25 @@ BEGIN_FACTORY_DEF ("Steinberg Media Technologies",
// its kVstAudioEffectClass component
DEF_CLASS2 (INLINE_UID_FROM_FUID(kDataExchangeProcessorUID),
PClassInfo::kManyInstances, // cardinality
kVstAudioEffectClass, // the component category (do not changed this)
kVstAudioEffectClass, // the component category (do not change this)
stringPluginName, // here the Plug-in name (to be changed)
Vst::kDistributable, // means that component and controller could be distributed on different computers
DataExchangeVST3Category, // Subcategory for this Plug-in (to be changed)
DataExchangeVST3Category, // Subcategory for this plug-in (to be changed)
FULL_VERSION_STR, // Plug-in version (to be changed)
kVstVersionString, // the VST 3 SDK version (do not changed this, use always this define)
kVstVersionString, // the VST 3 SDK version (do not change this, always use this define)
DataExchangeProcessor::createInstance) // function pointer called when this component should be instantiated

// its kVstComponentControllerClass component
DEF_CLASS2 (INLINE_UID_FROM_FUID (kDataExchangeControllerUID),
PClassInfo::kManyInstances, // cardinality
kVstComponentControllerClass,// the Controller category (do not changed this)
stringPluginName "Controller", // controller name (could be the same than component name)
kVstComponentControllerClass,// the Controller category (do not change this)
stringPluginName "Controller", // controller name (can be the same as the component name)
0, // not used here
"", // not used here
FULL_VERSION_STR, // Plug-in version (to be changed)
kVstVersionString, // the VST 3 SDK version (do not changed this, use always this define)
kVstVersionString, // the VST 3 SDK version (do not change this, always use this define)
DataExchangeController::createInstance)// function pointer called when this component should be instantiated

//----for others Plug-ins contained in this factory, put like for the first Plug-in different DEF_CLASS2---
//----for others plug-ins contained in this factory, same as for the first Plug-in different DEF_CLASS2---

END_FACTORY
2 changes: 1 addition & 1 deletion pages/FAQ/Communication.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ <h2 id="q-how-does-the-host-send-automation-data-to-my-vst-3-plug-in"><a class="
//...
}
</code></pre>
<p>Automation data is transmitted as a list of parameter changes. This list always contains enough information to transmit the original automation curve from the host in a sample accurate way. Check the <a href="../What+is+the+VST+3+SDK/Plug-in+Examples.html#again">AGain</a> example to see how it can be implemented.</p>
<p>Automation data is transmitted as a list of parameter changes. This list always contains enough information to transmit the original automation curve from the host in a sample-accurate way. Check the <a href="../What+is+the+VST+3+SDK/Plug-in+Examples.html#again">AGain</a> example to see how it can be implemented.</p>
<p>See also <a href="../Technical+Documentation/Parameters+Automation/Index.html">Parameters and Automation</a></p>
<hr />
<h2 id="q-how-report-to-the-host-that-the-plug-in-has-new-parameter-titles"><a class="header" href="#q-how-report-to-the-host-that-the-plug-in-has-new-parameter-titles">Q: How report to the host that the plug-in has new parameter titles?</a></h2>
Expand Down
2 changes: 1 addition & 1 deletion pages/FAQ/Processing.html
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ <h2 id="q-how-does-audio-processing-bypass-work"><a class="header" href="#q-how-
<p>In order to implement audio process bypassing, the plug-in can export a parameter which is additionally and exclusively flagged as having the attribute kIsBypass. When the user activates the plug-in bypass in the host, like all parameter changes, this is sent as part of the parameter data passed to the <a href="https://steinbergmedia.github.io/vst3_doc/vstinterfaces/classSteinberg_1_1Vst_1_1IAudioProcessor.html#a6b98eb31cf38ba96a28b303c13c64e13">IAudioProcessor::process</a> method.</p>
<p>The implementation of the bypass feature is entirely the responsibility of the plug-in:</p>
<p>The <a href="https://steinbergmedia.github.io/vst3_doc/vstinterfaces/classSteinberg_1_1Vst_1_1IAudioProcessor.html#a6b98eb31cf38ba96a28b303c13c64e13">IIAudioProcessor::process</a> method will continue to be called. The plug-in must take care of artifact-free switching (ramping/fade-in/fade-out, parallel processing or algorithm changes) and must also provide a delayed action if the plug-in has a latency and be sure that the output buffers are providing a copy of the input buffers (eventually delayed). No need to copy the input buffers to the output buffers when the pointers are the same and the plug-in has no latency!</p>
<p>This is the choice of the plug-in to handle/process the bypass (like any other parameters) sample accurate (by using the sampleOffset of the parameter change) or audio block based (not recommended when the audio block length is too large &gt; 1024).</p>
<p>This is the choice of the plug-in to handle/process the bypass (like any other parameters) sample-accurate (by using the sampleOffset of the parameter change) or audio block based (not recommended when the audio block length is too large &gt; 1024).</p>
<p>During bypass the process is still called, but if not, for some reason, the host may call a flush (using process call with null audio buffer).</p>
<blockquote>
<p><strong>Note</strong><br />
Expand Down
4 changes: 2 additions & 2 deletions pages/Technical+Documentation/Data+Exchange/Index.html
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ <h2 id="introduction"><a class="header" href="#introduction">Introduction</a></h
<p>Version 3.7.9 of the SDK contains the new <em>Data Exchange</em> API to send data from the realtime
processing function to the controller in a safe and efficient way.</p>
<p>As this API needs support from the host and not all hosts will provide this API in the beginning
the SDK contains a backwards compatibility layer that either uses the API directly if available or
uses an alternative method based on the IMessage API to emulate the API. See the
the SDK contains a backwards compatibility layer that either uses the API directly, if available, or
an alternative method based on the IMessage API to emulate the API. See the
<a href="../../Tutorials/Data+Exchange.html">tutorial</a> on how to use it.</p>
<h2 id="the-data-exchange-api"><a class="header" href="#the-data-exchange-api">The Data Exchange API</a></h2>
<p>The API consists of two interfaces, the <a href="https://steinbergmedia.github.io/vst3_doc/vstinterfaces/classSteinberg_1_1Vst_1_1IDataExchangeHandler.html">IDataExchangeHandler</a> which needs to be implemented by the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ <h4 id="text-input"><a class="header" href="#text-input">Text Input</a></h4>
<p>For reporting the results of a text input value change for a continuous or a discrete parameter, always call beginEdit, performEdit and endEdit in a row.</p>
<h3 id="automation-playback"><a class="header" href="#automation-playback">Automation Playback</a></h3>
<p>In <strong>VST 3</strong>, automation playback is the task of the plug-in and it is the host's task to provide the automation data. The only way for a parameter change to arrive in the processor is the processing call. Receiving parameter changes from the edit controller and playing back automation data is one and the same thing.</p>
<p>The need to perform all transformations, from the normalized GUI representation to the DSP representation, produces some overhead. Performing sample accurate automation requires even more overhead, because the DSP value must be calculated for each single sample. While this cannot be avoided entirely, it is the choice of the plug-in implementation how much processing time to spend on automation accuracy. The host always transmits value changes in a way that allows a sample accurate reconstruction of the underlying automation curve. The plug-in is responsible for the realization.</p>
<p>The need to perform all transformations, from the normalized GUI representation to the DSP representation, produces some overhead. Performing sample-accurate automation requires even more overhead, because the DSP value must be calculated for each single sample. While this cannot be avoided entirely, it is the choice of the plug-in implementation how much processing time to spend on automation accuracy. The host always transmits value changes in a way that allows a sample-accurate reconstruction of the underlying automation curve. The plug-in is responsible for the realization.</p>
<p><img src="../../../resources/tech_doc_12.jpg" alt="Tech_doc_12" /></p>
<p>The processor gets the automation data in the processing call by using queue of parameter changes for each parameter having automation data:</p>
<p>A <a href="https://steinbergmedia.github.io/vst3_doc/vstinterfaces/classSteinberg_1_1Vst_1_1IParameterChanges.html">IParameterChanges</a> has some <a href="https://steinbergmedia.github.io/vst3_doc/vstinterfaces/classSteinberg_1_1Vst_1_1IParamValueQueue.html">IParamValueQueues</a> (for a specific parameter ID) which has some Automation Points.</p>
Expand Down
24 changes: 12 additions & 12 deletions pages/Tutorials/Advanced+VST+3+techniques.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,22 +174,22 @@ <h1 id="advanced-vst-3-techniques"><a class="header" href="#advanced-vst-3-techn
</blockquote>
<p><strong>On this page:</strong></p>
<ul>
<li><a href="#part-1-sample-accurate-parameter-handling">Part 1: Sample accurate parameter handling</a></li>
<li><a href="#part-1-sample-accurate-parameter-handling">Part 1: Sample-accurate parameter handling</a></li>
<li><a href="#part-2-adding-32-and-64-bit-audio-processing">Part 2: Adding 32 and 64 bit audio processing</a></li>
<li><a href="#part-3-thread-safe-state-changes">Part 3: Thread safe state changes</a></li>
</ul>
<hr />
<blockquote>
<p>You'll find the source for this tutorial in the <a href="https://github.com/steinbergmedia/vst3_tutorials/blob/master/advanced-techniques-tutorial">tutorial repository</a></p>
</blockquote>
<p>In this tutorial you will learn:</p>
<p>In this tutorial, you will learn:</p>
<ul>
<li>How to add nearly sample accurate parameter changes to an audio effect</li>
<li>Using C++ templates to write one algorithm supporting 32 bit and 64 bit audio processing</li>
<li>Setting the state of the audio effect in a thread safe manner</li>
<li>How to add nearly sample-accurate parameter changes to an audio effect</li>
<li>How to use C++ templates to write one algorithm supporting 32 bit and 64 bit audio processing</li>
<li>How to set the state of the audio effect in a thread safe manner</li>
</ul>
<hr />
<h2 id="part-1-sample-accurate-parameter-handling"><a class="header" href="#part-1-sample-accurate-parameter-handling">Part 1: Sample accurate parameter handling</a></h2>
<h2 id="part-1-sample-accurate-parameter-handling"><a class="header" href="#part-1-sample-accurate-parameter-handling">Part 1: Sample-accurate parameter handling</a></h2>
<p>We will start by looking at this process function:</p>
<pre><code class="language-c++">void MyEffect::process (ProcessData&amp; data)
{
Expand Down Expand Up @@ -290,7 +290,7 @@ <h2 id="part-1-sample-accurate-parameter-handling"><a class="header" href="#part
}
</code></pre>
<p>in order to delegate the handling of the parameter changes to the <em>gainParameter</em> object.</p>
<p>Now we just need another small change in the process lambda to use the nearly sample accurate <em>gain</em> value. We have to call the <em>gainParameter</em> object to <em>advance</em> the parameter value:</p>
<p>Now we just need another small change in the process lambda to use the nearly sample-accurate <em>gain</em> value. We have to call the <em>gainParameter</em> object to <em>advance</em> the parameter value:</p>
<pre><code class="language-c++">auto doProcessing = [this] (ProcessData&amp; data) {
// get the gain value for this block
ParamValue gain = gainParameter.advance (data.numSamples);
Expand Down Expand Up @@ -337,13 +337,13 @@ <h2 id="part-1-sample-accurate-parameter-handling"><a class="header" href="#part
gainParameter.endChanges ();
}
</code></pre>
<p>Now we have nearly sample accurate parameter changes support in this example. Every 8 samples the <em>gain</em> parameter will be updated to the correct value.</p>
<p>It's very simple to make this 100% sample accurate, check out the <strong>AGain sample accurate</strong> example in the SDK.</p>
<p>Now we have nearly sample-accurate parameter changes support in this example. Every 8 samples the <em>gain</em> parameter will be updated to the correct value.</p>
<p>It's very simple to make this 100% sample-accurate, check out the <strong>AGain Sample Accurate</strong> example in the SDK.</p>
<hr />
<h2 id="part-2-adding-32-and-64-bit-audio-processing"><a class="header" href="#part-2-adding-32-and-64-bit-audio-processing">Part 2: Adding 32 and 64 bit audio processing</a></h2>
<p>The example currently only supports 32 bit processing. Now we will add 64 bit processing.</p>
<p>As you may have noticed above the <em>ProcessDataSlicer</em> uses a template parameter for its process function. This template parameter <em>SampleSize</em> defines the bit depth of the audio buffers in the <em>ProcessData</em> structure. This is currently hard-coded to be <em>SymbolicSampleSizes::kSample32</em>.</p>
<p>In order to support <em>SymbolicSampleSizes::kSample64</em> we only have to make a few changes to the code. First we adopt the algorithm part by introducing a new templated method to our effect:</p>
<p>In order to support <em>SymbolicSampleSizes::kSample64</em> we only have to make a few changes to the code. First, we adopt the algorithm part by introducing a new templated method to our effect:</p>
<pre><code class="language-c++">template &lt;SymbolicSampleSizes SampleSize&gt;
void MyEffect::process (ProcessData&amp; data)
{
Expand Down Expand Up @@ -442,7 +442,7 @@ <h2 id="part-2-adding-32-and-64-bit-audio-processing"><a class="header" href="#p
kResultFalse;
}
</code></pre>
<p>Now we have sample accurate parameter changes and 32 and 64 bit audio processing.</p>
<p>Now we have sample-accurate parameter changes and 32 and 64 bit audio processing.</p>
<hr />
<h2 id="part-3-thread-safe-state-changes"><a class="header" href="#part-3-thread-safe-state-changes">Part 3: Thread safe state changes</a></h2>
<p>One common issue in this domain is that the plug-in state coming from a preset or a DAW project is set by the host from a non realtime thread.</p>
Expand Down Expand Up @@ -501,7 +501,7 @@ <h2 id="part-3-thread-safe-state-changes"><a class="header" href="#part-3-thread
return AudioEffect::terminate ();
}
</code></pre>
<p>If the model data uses more memory and you want to get rid of it earlier you have to use a timer or similar to call the clear_ui method a little bit after the setState method was called. But this is not the scope of this tutorial.</p>
<p>If the model data uses more memory and you want to get rid of it in advance, use a timer or something similar to call the clear_ui method a little bit after the setState method was called. But this is not the scope of this tutorial.</p>
<p>If you want to use the utility classes, you will find them in the sdk at:</p>
<p><em>public.sdk/source/vst/utility/processdataslicer.h</em><br />
<em>public.sdk/source/vst/utility/sampleaccurate.h</em><br />
Expand Down
Loading

0 comments on commit 5234b0a

Please sign in to comment.