Learn Modern C++ by Building an Audio Plugin (w/ JUCE Framework) – Full Course

Wordpress sites

In this tutorial you will learn modern C++ by building an audio plugin with the JUCE Framework.

✏️ This course was developed by Matkat Music. Check him out on YouTube and Instagram:
πŸ”—
πŸ”—

πŸ’» Code:
πŸ’» Download the completed plugin:

πŸŽ‰ Check out the PFM::C++ for musicians course:

⭐️ Extra Resources ⭐️
πŸ”— Starting from scratch on MacOS:
πŸ”— Starting from scratch on Windows:
πŸ”— Configuring VisualStudio to run AudioPluginHost automatically on Windows:

⭐️ Course Contents ⭐️
⌨️ (0:00:00) Part 1 – Intro
⌨️ (0:02:29) Part 2 – Setting up the Project
⌨️ (0:16:51) Part 3 – Creating Audio Parameters
⌨️ (0:30:32) Part 4 – Setting up the DSP
⌨️ (0:38:55) Part 5 – Setting up Audio Plugin Host
⌨️ (0:44:28) Part 6 – Connecting the Peak Params
⌨️ (0:55:50) Part 7 – Connecting the LowCut Params
⌨️ (1:06:27) Part 8 – Refactoring the DSP
⌨️ (1:26:46) Part 9 – Adding Sliders to GUI
⌨️ (1:40:12) Part 10 – Draw the Response Curve
⌨️ (2:05:02) Part 11 – Build the Response Curve Component
⌨️ (2:10:44) Part 12 – Customize Slider Visuals
⌨️ (3:03:05) Part 13 – Response Curve Grid
⌨️ (3:27:03) Part 14 – Spectrum Analyzer
⌨️ (4:16:55) Part 15 – Bypass Buttons

Learn to code for free and get a developer job:

Read hundreds of articles on programming:

And subscribe for new videos on technology every day:

52 thoughts on “Learn Modern C++ by Building an Audio Plugin (w/ JUCE Framework) – Full Course”

  1. Azizbek Xushnazarov

    Finally a teacher that teachs how to create audio plugin.
    We know there are a lot of audio editor plugins to use free but making our own one is really helpfull to learn modern c++.
    Thank you man you deserve an award!

    1. What’s this software name man I have to install them actually my English isn’t good thats why I ask you?m

    2. yea I was trying to make a plugin and didn’t found any video then today I check he came with the video

    3. Malindi Nanayakkara

      Are you an audio engineer bro ? 😁✌🏻 If you are nice to meet ya fellow audio engineer

  2. Oleksandr Lohvinenko

    Great job, thanks, that’s really awesome! I didn’t even dream to build up my own audio plugin/synth, but now I know exactly where to learn fundamentals.

  3. Rusrec Noneya

    I just had two worlds collide when I saw this video. Been playing guitar for decades, now trying to learn to code in my 50s. I use VSTs all the time, and Im super stoked to be learning to code my own EQ. Thanks for what you are doing, not all heroes wear capes.

    1. @Rusrec Noneya I went back to school in CS when Covid hit (was a musician, so it was a good move). A did a little DAW for some class, and it was really satisfying!
      Keep at it!

  4. This is great, though I can see most people still getting lost in the very verbose and exacting syntax of C++. Make sure you get a strong handle on strong typing, and understand C++ style classes, namespaces, pointers, and inhertance well or your brain will explode at some point. Expecially if you come from a scripting language background

    1. Hi rob i am learning dsa in c++ and i can say i have a good hold of c++ if not data structures. I was looking for some projects for my resume and i don’t know if these projects put off recruiters. I have no connections with my seniors since we are in a pandemic. What do you recommend? Should i build this or pass?

    1. Konstantin Rebrov

      @JR2 Media Not all the C++ tutorials on YouTube, but all the C++ tutorials on this channel. That would take not long time.

    2. @Konstantin Rebrov I know, it was a bit of joke because this channel has lots of very long videos.

  5. Abhijeet Jain

    Hello @Matkat Music, great work and great plugin. Really appreciate the work and the efforts you put into this video. However, I am following your tutorial on Windows 10 machine with VS19 and at 41:13 you are adding AUAudioFilePlayer which I am unable to find in on my plugin list.

    I have read the mail and I downloaded the plugin you ported but its for Xcode only and not for VS19 and hence I am stuck again without audioplayer.

    Kindly help me with this.

    Thanks

    1. @Ralu Vi Hello, for me it works using Windows 10 and VS 2022 community edition.
      You need to build the audio file player vst3, then you go to the folder where the plug-in is built. You can then just drag the vst3 into the vst plugin list of the audio plugin host. Then you can use it.
      If you need help please message me.

    2. You can use any kind of sampler or synth that you have already. I just loaded up Decent Sampler instead, which is free, and played that plugin through the unit

    3. Yevhenii Yakovenko

      @mudi2000a Could you please tell me in more detail how to compile the player?

  6. I’m a theatrical audio engineer and sound designer who discovered a new love for computer science over the pandemic. The fact that this course exists is just such a perfect bridge for me. I’m looking forward to taking the time to learn from this over the coming week.

    1. I want to learn sound design. How do I do it? I can’t find good resources to learn wether it’s YouTube or other websites

    2. @elton wild Hey! You might have figured this out already but getting into sound design can depend on what you want to create sounds for. I’d say the three broad types are for video (movie/tv/animation/ect.), video games (same techniques as video but implementing them into video games takes special knowledge), and for software tools (where coding languages such as the above video come in handy).

      I am not as familiar with sound design for software tools (one of the many reasons I’m on this video) but for video and video games, the main tools you’ll want are this:

      1. A DAW (Digital Audio Workstation) such as Pro Tools, Ableton, Adobe Audition, Logic, Reaper, ect.

      – This is your main workstation, your canvas if you were painting. Every sound that you have recorded will be put into here to edit/manipulate and your virtual audio tools (VSTs usually) will be integrated with this.

      2. Field Recorder/Audio Recording Equipment
      – Most sound designers manipulate audio that they record themselves. Don’t feel the need to buy fancy expensive audio recording equipment if you’re just starting, smartphone audio recording is a great way to get started.
      – Field Recording Equipment is used when you’re outside of a controlled studio environment (EX: Recording ocean waves, Vehicles, ect.)
      – Studio Recording Equipment is probably a better choice to start with since you can record anything you bring into your studio and it will be as controlled as the environment you choose to record in (Bedroom, Basement, Home Built Studio, ect.). For this you’ll want a microphone and an audio interface (microphone plugs into audio interface, audio interface plugs into computer. You can then record directly into your DAW)

      3. Free audio websites (Freesound is my favorite website and probably the most popular for practical sound effects such as crowds, explosions, car engines, ect.)
      – These are great resources for when you don’t have any recording equipment but you want to get started in sound design ASAP. it’s also a great resource when there is a sound that you have no way of replicating/recording. Once it gets beyond just a hobby and becomes professional, then this resource gets a little dicey since you’re using someone else’s work. But getting paid to do sound design might be harder than learning sound design lol believe me.

      4. Audio Middleware is used for implementing your sound design into video games I would recommend working on your sound design skills for video before attempting this. A good way to practice with video is taking a movie/tv/animation scene and removing all of the sound. Then you can put your video into a DAW (some DAWs aren’t nice with video, might take some configuration) and record and manipulate sounds to redesign the sound for that scene. If you want to attempt video games, then you would want these tools:
      – Audio Middleware (Wwise and FMOD are the two most popular software though there are probably others)
      – Wwise works very well with Unity game engine from my experience, while I’ve noticed FMOD is often used with Unreal Game Engine. I don’t have much experience outside of Wwise/Unity though, so other combos probably work well too.
      – Basic C# can be helpful when working with Game Engines though it’s not required if you’re working solely in an audio middleware. But if you’re doing this project completely by yourself, then you’ll need C# knowledge for the video game engine scripting . This is why I don’t recommend starting with this.

      I hope this helps, there are a lot of great resources/communities on reddit, facebook, and other forums. I would also search on YouTube for how your favorite movies, tv shows, video games did their sound design. There’s often behind the scenes videos or interviews with the sound designers where they show their process. And if you need to create a specific sound, many YouTubers have created videos showing their process of how they created those sounds. Some googling can do wonders once you know what to even Google.

      Lastly, remember to HAVE FUN or else this isn’t worth pursuing. It’s a lot of hard-work and takes technical skills, but you need to keep your creativity because this is still a creative hobby/profession. You are the one imagining what worlds sound like for an audience and it can be an amazing feeling when they feel like they’ve been sucked into the world you helped create.

      EDIT: I totally forgot about sound design for live productions such as theater. The same principles apply as with video, but you’ll need equipment to trigger the sounds while a live production is going on. I would google equipment that can do this as I don’t have a ton of experience with a live setting.

  7. To all those getting an error at around 1:12:40–I fixed it by going to the ChainSettings struct in PluginProcessor.h and changing “int lowCutSlope” to “Slope lowCutSlope”. I suspect Matkat accidentally cut out the part where he did that haha

  8. Jarrett Montgomery

    as an computer engineer, I never delved into much graphical C++ but not only does this look awesome, I can say that your choice of GUI really gives insight into what you’re doing to the entire frequency range and would even be a cool tool for those learning about network analysis and frequency response curves for circuits! much more informative than those little sliders or pre-selected stock equalizers

  9. FΓ‘bio Nunes

    Just one thing. I don’t recommend to use developer branches to install dependencies (frameworks os libs), because master would be always the best choice, since master branch reflects the latest version, without any insecure or testing features, refactorings or any kind of thing that is not validated to be in production.

    1. Yes I highly recommend this as well, switching to master branch saves a lot of headache and can be done from terminal with “git checkout master”.

  10. Your courses (both free and paid) have been incredibly valuable to me! Imagine how it feels to learn the knowledge and gain the confidence to design and build your own audio plugin. Thanks again!

  11. LagDaemon Programming

    This is an awesome tutorial. As a professional C++ programmer I am very happy that you are both refactoring code, and using template functions to do so. I am always disappointed by software developers who cannot refactor, especially in tutorials, but I see it in the professional world all the time as well, and many cannot work with template functions at all. Thank you for spreading the word about good practices in coding πŸ™‚

    1. LagDaemon Programming

      @Monster DAW Refactoring is the process of simplifying code by factoring out repetitions, and abstracting the code to make it more reusable. The techniques for doing this require some time and practice.

    2. LagDaemon Programming

      @Glitch Gatsby I prefer the term good practices, it is hard to judge what is best. The application of a particular practice may be good, or bad, or the best way to do something. This is somewhat subjective and depends upon the situation. There are many books that discuss best practices, and each company has its own set of them. It is hard to say what source would be good, but if you do a search for software best practices you will find many.

  12. Magnus Lilleberg

    This is just great. Really, thanks! I hadn’t been doing any serious development since the days of Win 95, and in the mean while focused on different flavors of audio engineering. Finally set up in a decent flat with a room to spare for a home studio, and I want to DIY as much as humanly possible due to budget constraints, but, more importantly, for the sake of customization. I’m no slouch with the soldering iron & oscilloscope, but thanks to your excellent introduction to this new skill set I feel like my horizons have widened by orders of magnitude… Keep up the good work!

  13. Great video! Love the pace- I’m just past the 3 hr mark. The refactoring process was a bit quick, but I understand why it was edited this way.
    Tried to learn juce about a year ago before I had any real experience. Needless to say, it didn’t go well.
    Now that I’ve taken a couple cpp courses, this has been a fun way to not only apply my skills but experience working with a framework for the first time!

  14. 43:30 [Part 5] Quick Tip for everyone wondering how to do that on Windows in Visual Studio (I use 2017) :
    In the Solution Explorer panel, right-click on the Project “[plugin name]_VST3” > Properties. Then go to “Debugging” and set Command to the path of your AudioPluginHost’s DEBUG (!) Build executable (change “$(TargetPath)” to, for example, “C:JuceAudioPluginHostDebugAudioPluginHost.exe”). Set this Command for every configuration (Debug/Release) of PluginName_VST3.
    Attention: This only affects the [PluginName]_VST3 project, not _StandalonePlugin. When you click Debug, VS will run whatever project is set as the main Startup project for this solution (by default it’s _StandalonePlugin = the one printed bold in Solution Explorer), so run _VST3 directly via Right-Click>Debugging>Start (or assign _VST3 as the main Startup project).
    This way, Visual Studio will launch the AudioPluginHost.exe (which IIRC automatically loads the last saved .filtergraph file) and go into debugging mode – so breakpoints, logs etc should work, too.

  15. 40:13 [Part 5] Quick Tip for VS2017 (Windows) if AudioPluginHost doesn’t find your .vst4 : VS saves the .vst3 file only to its […]x64Debug folder. You have one of 3 options:
    1) In AudioPluginHost, add this directory when scanning for new VST3 files /
    2) Copy the file by hand to a common VST3 directory (C:Program FilesCommon FilesVST3) /
    3) In Solution Explorer Panel, right-click the project [PluginName]_VST3 > Properties > Build Events > Post Build and set “Command” to, for example,
    [ copy /y “$(TargetPath)” “C:Program FilesCommon FilesVST3$(TargetFileName)” ]

    Attention: Post-build copy command will fail if the .vst3 file is locked (e.g. because it’s currently being used by AudioPluginHost.exe)

  16. This was an amazing project to build, definitely going to do more!!! Thank you FreeCodeCamp and MatKat Music

  17. Good afternoon! But will there be a lesson on how to create your own VST synthesizer in C#?

  18. Great tutorial. I am trying to learn some C++ this way by making a vst to process my guitar sound. However, I am kind a stuck now at (time stamp38:43). I get an error that

    Error C2039 ‘usesSeparateInputAndOutputBlocks’: is not a member of ‘juce::dsp::AudioBlock

    Any help?

    I just downloaded the recent version (Version 7).

Comments are closed.