VST plugin HOST application programming in C++

In this tutorial we will build a simple VST plugin host application in C++.

Topics include: displaying information about the plugin, processing MIDI events and playing MIDI tunes through the plugin, saving audio output to a .wav file, and displaying the plugin's editor (if it has one). The development environment for the project is Visual Studio C++ and Steinberg's VST SDK 2.4. A framework, such as JUCE or iPlug, will NOT be used.

This tutorial is now presented as a series of videos. The following is a summary of the material in each video, as well as, links to the videos on YouTube.

Tut 1: Starting out. Setting up, tools needed, goals of the project. Where to find useful information. A brief look at some of Steinberg's VST program samples. Writing our first simple program to display information about a plugin.


Tut 2: Detailed explanation of audio data processing. Reading a MIDI (.mid) file and processing MIDI events through a VSTi plugin, i.e. generating audio output.


Tut 3: Explanation of the WAVE audio format. Saving the audio output generated in Tut 2 to a WAVE (.wav) file.


Tut 4.1: Interfacing to the computer's audio driver. Playing audio output from the plugin in (almost) real-time. Buffers play a crucial role in the implementation.


Tut 4.2: Testing with a number of different plugins and fixing errors.


Tut 5: In this 5th episode plugin generated audio data is output in real-time through the computer's audio interface.


Tut 6: Further enhancements are added to the program.


Tut 7: In this tutorial the Host will display the plugin's editor in a window. A menu driven user interface is also provided. To play MIDI songs with the plugin's editor open makes using the application more enjoyable.


Tut 8: In this last episode of the tutorial series we add a piano keyboard and play tunes through the plugin. An implementation of a circular (or bounded) buffer is presented. Program execution is runnning on different threads.

...



11 comments:

  1. Just what I've been looking for. Great work, thanks.

    ReplyDelete
  2. Thank you very much for this series of videos it really helps me for what I want to create. 👍 Indeed you are the only one I found explaining this, as you said in the introduction, this subject is a bit like black magic on the internet 😂 I'll work to understand everything in the source code then I'll work the steinberg vst3 documentation. These videos are the startpoint of a big project for me thank you. 👍

    ReplyDelete
    Replies
    1. Here it is:
      https://drive.google.com/file/d/1Q-wNnRzcXwco9CWW401IUcyb0ZHyqfFD/view?usp=sharing
      Good luck with your project.

      Delete
    2. Thank you very much have a good day

      Delete
  3. Hi, picman. I have to say that you made such a marvelous tutorial. All those years we cannot find even one detailed tutorial for how to made a vst plugin host. I'm developing an open source desktop music software and your excellent work helps me such a lot. When I finished my project I will upload it to github and introduce your tutorial to the others.

    ReplyDelete
    Replies
    1. I'm glad you found the tutorials useful. Good luck with your project.

      Delete
  4. Hi picman. Great turorial! Unfortunately I cannod find VST2 SDK anywhere on the net. :-( I did some tests using VST3 SDK but I heavily failed.
    Any plans to provide a similar one using VST3 SDK?

    ReplyDelete
    Replies
    1. Hi Frank, I'm surprised you couldn't find it. I show the site in the first tutorial at about 4 minutes into the video. But for convenience, here is the link:
      https://archive.org/details/VST2SDK
      (planning to do one with VST3 in the *distant* future)

      Delete
  5. Hi Picman. No clue why I didn't see it in Video. of course it's there!!! :-)
    Thanks a lot!!!

    ReplyDelete