VST3 SDK Tutorial: Create your own VST3 Synth plug-in

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ต.ค. 2024
  • How to make a synthesizer application VST plug-in with GUI.
    This tutorial explains signal processing C++ programming with VST3 SDK, VSTGUI and VST3 Project Generator.
    VST3 effect tutorial: • Create a VST3 Plugin t...
    Development tools download sites:
    visualstudio.m...
    cmake.org/
    www.steinberg....
    #VST #Plugin #Synthesizer

ความคิดเห็น • 83

  • @dethswurl117
    @dethswurl117 2 ปีที่แล้ว +16

    11:39 - I found a fix for the "setlocal" error!
    1. Expand the "Predefined" folder in Visual Studio's _Solution Explorer_
    2. Right click "ALL_BUILD", then click "Properties"
    3. In the new window, expand *Configuration Properties* -> *Build Events*
    4. Click each "Pre-Build Event", "Pre-Link Event", and "Post-Build Event" and _double click "Use In Build" to set it to _*__No_*
    5. Click "Apply"
    5. Repeat steps 2-5 for "ZERO_CHECK"
    6. Repeat steps 2-5 for "SineSynth"
    Should give you an errorless build :)

    • @Krzychu-bh4rl
      @Krzychu-bh4rl ปีที่แล้ว

      I can confirm it works

    • @brianmac8260
      @brianmac8260 ปีที่แล้ว

      the setlocal error is becasue VS is trying to write to system path. The VST still builds. You can copy it manually into programfiles/commonfiles/vst3. Create the vst3 folder if it doesn't exist on your machine and drop your new vst in there!

    • @Krzychu-bh4rl
      @Krzychu-bh4rl ปีที่แล้ว

      @@brianmac8260 Yes, but during development it is more convenient to run plugin by "play" button inside VS. Moreover, how about debugginng?

    • @bootylordmusic1304
      @bootylordmusic1304 ปีที่แล้ว

      You can also run VS as an admin if you really want it to be simple.

    • @wilma7612
      @wilma7612 ปีที่แล้ว

      just run visual studio as admin and open the project inside of visual studio

  • @MonteMusicChannel
    @MonteMusicChannel 3 ปีที่แล้ว +22

    Thank you so much for the tutorial ! That's what i've been looking for a long time. There are many JUCE tutorials out there but almost none explaining the VST3 SDK which is for free. More of those would be much appreciated including the usage of VSTGUI.

    • @JayJay-ki4mi
      @JayJay-ki4mi 2 ปีที่แล้ว +3

      JUCE is just a large library of "solved problems". Want a delay ... here it's done for you. I am finding Will Perkle's synth book good, but Synthlab is awful so I'm implementing what I learn in this book using a VST. This video has helped a lot too.

    • @marclingk4638
      @marclingk4638 ปีที่แล้ว

      The JUCE GUI ist more complicated also and not grafic orientated. (prepare all in grafic programs) JUCE looks more minimalistic, not always my taste. And I don't want a JUCE advertising in front of my work.

  • @Luk3r
    @Luk3r ปีที่แล้ว +14

    You're a legend. In a world full of people making bullshit videos explaining nothing useful, you're out here actually spreading valuable info.

  • @blissorordeal
    @blissorordeal 3 ปีที่แล้ว +5

    Awesome Tutorial! Thank you very much! I just started with Vst3 SDK today and this is very helpful!

    • @blissorordeal
      @blissorordeal 3 ปีที่แล้ว

      @aikelab Is there a simple way to output a squarewave as fOsc2, or is it more complicated?

    • @aikelab
      @aikelab  3 ปีที่แล้ว +4

      1) the simple way is the following:
      outL[i] += fOsc2 * (sin(fOsc2Phase) > 0.f ? 1.f : -1.f);
      however it generates alias noise on high pitch
      2) the solution is generating square wave by additive synthesis:
      float freq = fFrequency * 2.f;
      float nyquistFreq = data.processContext->sampleRate / 2.f;
      float signal = 0.f;
      for (int32 n = 1; n < 10; n+=2) {
      if (n * freq < nyquistFreq)
      signal += sin(n * fOsc2Phase) / (float)n;
      }
      outL[i] += fOsc2 * signal;

    • @blissorordeal
      @blissorordeal 3 ปีที่แล้ว +1

      @@aikelab Thank you ever so much! I learned the Fourier transformation years ago and can see some parallels now. Thanks for the help that is not taken for granted! Have a nice day!

  • @Krzychu-bh4rl
    @Krzychu-bh4rl ปีที่แล้ว +1

    Thank you for delaying all my ongoing appointments :)
    And now seriously - I'm glad I found your channel. After finishing my analog polysynth project I planned to move to digital synth DIY on STM32 uC, but there is still need to build hardware. building VST is much better option, as I don't have to make ANY hardware. Moreover, thanks to fact that it uses C++ I can simply copy existing code from STM32 to VST plugin (You can see that I have a digital string machine demo on my channel).
    Then I have also to study your Blender tutorials. It's just the second day for me now, but thank you for introducing me into VST dev world :)

  • @marcklein1390
    @marcklein1390 10 หลายเดือนก่อน +1

    Thank you very much for this excellent tutorial.
    The "setlocal" error can be a bit misleading. One additional cause for this message is that an validator is running that checks the plug-in for VST 3 conformity.
    I got 2 errors:
    1) [Parameters Flush (no Buffer)]
    So if data.numSamples==0, then the data.outputs value is a nullptr.
    2) [In: Mono: 1 Channels, Out: Mono: 1 Channels]
    If the output is mono, only data for one channel should be generated.
    For a successful validation I adjusted the generator like this:
    if (data.numSamples != 0) {
    Vst::Sample32* outL = data.outputs[0].channelBuffers32[0];
    Vst::Sample32* outR = data.outputs[0].channelBuffers32[1];
    for (int32 i = 0; i < data.numSamples; i++) {
    outL[i] = fOsc1 * sin(fOsc1Phase);
    outL[i] += fOsc2 * sin(fOsc2Phase);
    outL[i] *= fVolume;
    if (data.outputs[0].numChannels > 1) {
    outR[i] = outL[i];
    }
    fOsc1Phase += fDeltaAngle;
    fOsc2Phase += fDeltaAngle * 2.f;
    }
    }

  • @tylergarrett
    @tylergarrett 4 หลายเดือนก่อน

    woh kick ass walkthrough, going to be watching this very slowly a few times.

  • @treproductions9522
    @treproductions9522 3 หลายเดือนก่อน

    Hello, so when i click create at around step 1:35, it says could not find any instance of Visual Studio. i have the latest build (currently) of visual studio installed. but I've noticed the project generator only has up to version 17 2022 listed. is that an issue? Do I need to download a older version of vs code for this to work?

  • @ninjacodertech
    @ninjacodertech ปีที่แล้ว +2

    im getting the error: Command PhaseScriptExecution failed with a nonzero exit code. how do i fix it? btw im using xcode on an arm64 mac

    • @mystkmusic
      @mystkmusic 6 หลายเดือนก่อน

      same here, have you found a fix?

  • @sisi6679
    @sisi6679 3 หลายเดือนก่อน

    hey so everything went fine up until trying to get it to open in a DAW. I checked the files of the vst folder it created, and the "x86_64-win" folder is empty. Every other vst in my vst3 folder that has a folder has a vst file in that folder. but mine is missing for the vst I created. any reason why?

  • @PrecodedOfficial
    @PrecodedOfficial 4 หลายเดือนก่อน

    i cant do anything on the vst project generator, all options are disabled for some reason

  • @trardac
    @trardac 2 ปีที่แล้ว +1

    Will you continue making these tutorials? They are rare and very helpful.

  • @marclingk4638
    @marclingk4638 ปีที่แล้ว

    As soon as I add Vst::Sample32 * outL = data.outputs[0].channelBuffers32[0]; to the process, it crashes the validator. What can I do?

  • @kirara_shiroyoru
    @kirara_shiroyoru 8 หลายเดือนก่อน

    Can this plugin create chords? I created a similar plugin according to this video and used it in LMMS through Element plugin(since LMMS does not directly support vst3), but it can only play one note per time and cannot play chords, and I'm not sure it is due to the plugin or Element

  • @VKHSD
    @VKHSD ปีที่แล้ว

    i need help creating a new knob and variable. i tried my best but it keeps opening a UI editor whenever I open my plugin

  • @marclingk4638
    @marclingk4638 ปีที่แล้ว

    You made a lot of corrections to the vstsdk. IS thaere a copy of this new template somewhere i the net?

  • @davil1493
    @davil1493 9 หลายเดือนก่อน

    i have a question, how can i do to edit the ui editor? im just editing de knob and, nothing was saving.

  • @AudioLit-bz7wg
    @AudioLit-bz7wg ปีที่แล้ว

    Hello I got an error when I build in Xcode with the buffer definition in 6:43 (seems that doesnt recognise the buffer), I am with the latest version of VST3 and XCode 14.2. Any help will be appreciated. Thanks.

  • @mynameisjeff9124
    @mynameisjeff9124 2 ปีที่แล้ว +3

    Does anyone know why people use JUCE instead of using the VST SDK directly? JUCE seems much more complicated for being a basically a VST wrapper

    • @aikelab
      @aikelab  2 ปีที่แล้ว +5

      I think the main reason is that JUCE can generate VST for Windows and AU for Mac.
      Also, JUCE provides more documentation such as example programs and tutorials than VST SDK.
      And JUCE's GUI library has more modern design than VST GUI.
      But that's right, the VST SDK is simpler than JUCE.
      So we need more VST SDK tutorials.
      This is why that I made this video.

    • @marksparrows
      @marksparrows 2 ปีที่แล้ว

      Because Juce shows a nice "made with Juce" logo when you start your plugin... Joking

  • @Krzychu-bh4rl
    @Krzychu-bh4rl ปีที่แล้ว

    One more thing - if you want to debug plugin using Steinberg host - installed ASIO is MANDATORY to run that thing - in other case "processing" function will not run even to check variables in VS debugger.

  • @holyholywood5122
    @holyholywood5122 2 ปีที่แล้ว

    why my project still couldn't build even in administrator mode? setlocal error not handled by admin mode. please help

  • @BIGpony777
    @BIGpony777 ปีที่แล้ว +1

    how would i make it polyphonic?

  • @MonteMusicChannel
    @MonteMusicChannel 2 ปีที่แล้ว +1

    I have one question: How do you get rid of the "click" sound at the NoteOff phase. Like adding a fast fade out at the end.

    • @aikelab
      @aikelab  2 ปีที่แล้ว +1

      Exactly. The ADSR Envelope Generator processing is needed to rid the noise, but this tutorial does not implement it.
      I didn't find the example code of simple EG implementation.
      The example synth code of vstsdk maybe help you. but it slightly complex.
      github.com/steinbergmedia/vst3_public_sdk/blob/9589800ed94573354bc29de45eec5744523fbfcb/samples/vst/note_expression_synth/source/note_expression_synth_voice.h#L426-L443

    • @MonteMusicChannel
      @MonteMusicChannel 2 ปีที่แล้ว

      @@aikelab Thank you for pointing me into the right direction ! Looking forward to the next VST SDK Tutorials ! 🙏🏽

  • @PollederBoss
    @PollederBoss 2 ปีที่แล้ว +1

    Nice tutorial. It compiled succsessful as vst instrument and I can use it in my Daw. I can move the two knobs but there is no sound comming out?

    • @pedronconceicao
      @pedronconceicao 9 หลายเดือนก่อน

      Hello, @PollederBoss. Did you manage to get it working? I just followed this tutorial and I am able to open the plugin in Reaper and get sound from it. But the knobs are not doing any changes to the sound.

    • @TheSongManipulator
      @TheSongManipulator 7 หลายเดือนก่อน

      Same. My compile seems to have worked and my DAW recognizes the plugin as a virtual instrument, and I can see the oscillator parameters, but unfortunately there is no sound.

  • @smart_bar
    @smart_bar ปีที่แล้ว

    fl studio 12 doesn't find plugin by some reason (
    works only in 20 ..

  • @bogelmanDDD
    @bogelmanDDD ปีที่แล้ว

    And how to make the signal come from the midi keyboard?

  • @m6ckm6ckm6ck2
    @m6ckm6ckm6ck2 ปีที่แล้ว

    could someone possibly tell me what a note on and note off event it? thank u

  • @cedcanegrate
    @cedcanegrate ปีที่แล้ว

    Great tutorial! If I would like to draw in the user interface the waveform in real time how can I do?

  • @euphemir1596
    @euphemir1596 2 ปีที่แล้ว

    Nice tutorial, thanks! Unfortunately, VST Project Generator doesn't work on my computer, I tried to use the HelloWorld example but it appears in my DAW only as an effect, not as an Instrument. Do you know how to change from Audio Effect to Instrument in code?

  • @tomcootemusic
    @tomcootemusic 2 ปีที่แล้ว

    Your starter tutorials seemed really promising but these look like quite old versions of software and I can't get it to work with the current downloads.
    I'm getting this error when I click on Create in CMake:
    The CMAKE_CXX_COMPILER: wcl386 is not a full path and was not found in the PATH.
    Tell CMake where to find the compiler by setting either the environment
    variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
    to the compiler, or to the compiler name if it is in the PATH.
    CMake is automatically finding the correct version of Visual Studio Community Edition (Visual Studio 17 2022) and all the up to date compilers are installed. From what I understand it should find them correctly.
    Any ideas? Thanks.

    • @dreisemesterzumerfolgdsze3453
      @dreisemesterzumerfolgdsze3453 2 ปีที่แล้ว +1

      make sure you chose the right development environment in the project maker

    • @tomcootemusic
      @tomcootemusic 2 ปีที่แล้ว

      @@dreisemesterzumerfolgdsze3453 Thanks. I found that most of these kind of tutorials go out of date pretty quickly but I do now have C++ and JUCE up and running, and I've released a couple of free VSTs.

    • @b1tw0nder
      @b1tw0nder ปีที่แล้ว

      my comment keeps glitching YT.

    • @b1tw0nder
      @b1tw0nder ปีที่แล้ว

      oddly it keeps vanishing. and erroring when I edit

  • @atomictraveller
    @atomictraveller 2 ปีที่แล้ว +1

    it took me a wile to properly get through this, but thanks, from xoxos :)

  • @Krzychu-bh4rl
    @Krzychu-bh4rl ปีที่แล้ว

    Question regarding building finished plugin - is there a way to include all resources into .vst3 file? I can see that every plugin I have so far have only .vst file inside C:\Program Files\Common. Is it possible to do it myself?

    • @profbperrin
      @profbperrin ปีที่แล้ว

      I have the same question, did you find a solution?

    • @Krzychu-bh4rl
      @Krzychu-bh4rl ปีที่แล้ว

      @@profbperrin Unfortunatelly no, VST3 requires specific directories to be made. I suppose that in case of my Arturia plugins pack needed data are in different location, but I have no idea how to set it up.

  • @raycksantos3178
    @raycksantos3178 ปีที่แล้ว

    Hello friend, would this process work to create a virtual instrument? like a guitar? Have you ever done something like this?
    thanks in advance for the tutorials, it has helped a lot

    • @xx4248
      @xx4248 11 หลายเดือนก่อน

      If you can't even play a guitar you are never getting fucked

  • @kickeurrse
    @kickeurrse ปีที่แล้ว

    Thanks ! Cool tutorial, really precious ;)

  • @brianmac8260
    @brianmac8260 2 ปีที่แล้ว +1

    Is VSTGUI just the XML file? Isn't there a drag and drop interface? Please do a Standalone app sometime. Subbed.

    • @aikelab
      @aikelab  2 ปีที่แล้ว +1

      XML (or JSON) of VSTGUI defines the layout of GUI. If the GUI has only simple knobs, simple sliders, etc..., VSTGUI is almost XML only like this video.
      If you hope custom GUI or custom behavior, you must write the GUI behavior in C++.
      VSTGUI 4.7 or later provides a new drag & drop interface. (ex. IDragCallback)

    • @brianmac8260
      @brianmac8260 2 ปีที่แล้ว

      @@aikelab I tried before with SDK/CMake/VisualStudio, i got frustrated. could not get it to work. Yesterday, I tried again, Downloaded everything, Cmake, error, Visual Studio not open. I got Linux SDK, opened QT pointed to the cmake file, it works immediately but no Project Generator. You must do it manually. I will try VS again later.

    • @aikelab
      @aikelab  2 ปีที่แล้ว

      @@brianmac8260 The VST plugin development on Linux will be complicated.
      VST3 Project Generator is for Windows / macOS only, not for Linux.

    • @brianmac8260
      @brianmac8260 2 ปีที่แล้ว

      @@aikelab Yes. But I found the problem in Windows. Cmake had left an entry in the registry from my last attempt, which I deleted. I reinstalled and Visual Studio opened from Project Generator. Just finished the Fuzz project. Thank you very much!

  • @itsjanak6337
    @itsjanak6337 ปีที่แล้ว

    12:09 i copied the folder to VST folder but in my FL its not showing, what should i do?

    • @marclingk4638
      @marclingk4638 ปีที่แล้ว

      Is your FL ready for VST3?

    • @itsjanak6337
      @itsjanak6337 ปีที่แล้ว

      @@marclingk4638 its fixed now lol

  • @marksparrows
    @marksparrows 2 ปีที่แล้ว

    This was great! Thank you

  • @Neraikk
    @Neraikk 2 ปีที่แล้ว

    Thank you! Amazing tutorial!

  • @charlinhoful
    @charlinhoful 4 หลายเดือนก่อน

    Meu Deus um monte de códigos pra gerar dos knobs ,desisto

  • @omarlopezrincon
    @omarlopezrincon 2 ปีที่แล้ว

    I started following you with your first tutorial and you are becoming real good man !!! Congrats !!! love your channel since day 1.