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

Поділитися
Вставка
  • Опубліковано 12 вер 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

КОМЕНТАРІ • 81

  • @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 2 роки тому +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 Рік тому +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.

  • @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 :)

  • @blissorordeal
    @blissorordeal 2 роки тому +5

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

    • @blissorordeal
      @blissorordeal 2 роки тому

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

    • @aikelab
      @aikelab  2 роки тому +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 2 роки тому +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!

  • @tylergarrett
    @tylergarrett 3 місяці тому

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

  • @trardac
    @trardac Рік тому +1

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

  • @marcklein1390
    @marcklein1390 9 місяців тому +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;
    }
    }

  • @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.

  • @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 5 місяців тому

      same here, have you found a fix?

  • @kickeurrse
    @kickeurrse Рік тому

    Thanks ! Cool tutorial, really precious ;)

  • @atomictraveller
    @atomictraveller 2 роки тому +1

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

  • @treproductions9522
    @treproductions9522 2 місяці тому

    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?

  • @kirara_shiroyoru
    @kirara_shiroyoru 7 місяців тому

    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

  • @PrecodedOfficial
    @PrecodedOfficial 2 місяці тому

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

  • @sisi6679
    @sisi6679 2 місяці тому

    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?

  • @Neraikk
    @Neraikk 2 роки тому

    Thank you! Amazing tutorial!

  • @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 8 місяців тому

      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 6 місяців тому

      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.

  • @davil1493
    @davil1493 8 місяців тому

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

  • @marksparrows
    @marksparrows 2 роки тому

    This was great! Thank you

  • @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

  • @BIGpony777
    @BIGpony777 Рік тому +1

    how would i make it polyphonic?

  • @cedcanegrate
    @cedcanegrate Рік тому

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

  • @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 ! 🙏🏽

  • @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!

  • @marclingk4638
    @marclingk4638 Рік тому

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

  • @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

  • @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?

  • @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.

  • @marclingk4638
    @marclingk4638 11 місяців тому

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

  • @holyholywood5122
    @holyholywood5122 2 роки тому

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

  • @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 10 місяців тому

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

  • @m6ckm6ckm6ck2
    @m6ckm6ckm6ck2 Рік тому

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

  • @bogelmanDDD
    @bogelmanDDD Рік тому

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

  • @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.

  • @smart_bar
    @smart_bar Рік тому

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

  • @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 Рік тому +1

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

    • @tomcootemusic
      @tomcootemusic Рік тому

      @@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

  • @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.

  • @charlinhoful
    @charlinhoful 3 місяці тому

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

  • @itsjanak6337
    @itsjanak6337 Рік тому

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