Juce Tutorial 13- Audio Plugin Basics...What You Need to Know (Pt 1 of 2)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey what's up everybody I'd like to welcome you to another juice tutorial and today what we're gonna do is we're going to start going into building our own plugin now what we're going to do for this tutorial we're not actually gonna do any sort of algorithms or anything like that we're just gonna really take a look at the default plugin code and just really kind of explore what's going on do our first build with the plug-in and just get some audio running straight into the plug-in straight back out of it and just basically discuss it so what we're gonna do is start up a new project like always now this may be a two-part project because there are some specific things that we can do with building with building plugins that I think that we should do for a second part just to go over some of the basics and some of those things that I'm going to discuss in the second part are going to be downloading the VST SDK from Steinberg which is what you need in order to build a VST plug-in and also there's there's a plug-in host that Joost has that allows us to basically build and run the plug-in within within a juice within another juice project but there are some specific errors that that I need to fix that I know how to fix them but I just wanted to go through that with you in another one so that's going to be kind of part 2 of audio plug-in basics so so what we're gonna do now is we're just going to build a new project and this one's going to be audio plug-in so just go ahead click on that I'll just call this plug-in test 1 and we'll put this in our juice folder go ahead create that so as you can see it creates two CPP and two header files so you have the program plug-in processor and you have the plug-in editor okay so the difference between these two these two cpp files is the the plugin processor is your actual you're where you're gonna actually write your DSP algorithms so that's where you're gonna write any sort of changes that you're gonna make to your audio all of your back-end kind of DSP processing is gonna happen within the plugin processor ok the plugin editor is the stuff that we've kind of gone over in the beginning of this tutorial series so like UI stuff creating sliders creating dials and working with that functionality so think of your plugin editor as your flow your front end the front end of your plug-in what you're actually seeing in the functionality that goes along with that okay so I'm gonna go into a couple settings here that a thought may be relevant to you so if you go into exporters ok so I just clicked on if you just click on this arrow here that says exporters and you go into your X code here so let me see let me make sure I'm in my right folder here it's not this one there are quite a few different menus here so so you know bear with me basically so you can call so so this is kind of where you edit your your plug-in name so if you want to call you a plug-in something else you can you can do that here in binary name ok one thing that's quite important here is your binary location so this is where if you if you actually build your your plug-in this is the location of where it'll actually be built at if you want to go ahead and take a look at it and there if you want to open it up in your da W which we'll do in in just a moment okay just just a quick thing that just kind of confused me for a moment was that I looked at my libraries folder where I where normally I have all my plugins kind of in my just in my library and my normal plugins folder where everybody stores it they're their plugins and and I noticed that it wasn't there and I was searching that I was searching so this is actually like in your users library folder not your kind of global library folder just in case you're looking in there and you're saying oh I don't know where my plug-in is okay also you have OS X architecture okay I haven't messed with these but but you may need to actually take a look at these okay so for like if you're running on a different system okay so if I like I might select that I want a 32 64 bit plug-in but depending on your machine you may have to look at this it also at your deployment target I think the default is ten point nine so so that's just something to be aware of if you're having problems with with actually getting your plug-in to run on your machine take a look at those settings that are that are here under exporters okay another thing I'm going to point out that's kind of off the subject but there's something that that kind of came up in an issue and in a comment so if you go under modules sometimes when you download a project from a different a different source you open it up and you say and basically the search paths aren't working properly what you can do is you can just click on this little Settings icon here and then what you can do instead of so like before I was going into now I press so so basically like if you can't find your modules then you may have a problem where you have to set the paths again which is a problem that I have whenever I download something from the internet or from the juice tutorial website so what you can do is if you click on the basics basically what you would do here is you would set like your path for your modules if you can't find where your modules are for some reason it's not working desk because that's because mine's that's because my my path is set correctly but if it but if it's but rather than having to go in here and cut and paste for like every one of these if you like having to reset the path for every one of these if it's lost you can actually go in here and you can do set set paths for all modules and then what that'll do is basically you would just set it once and then it'll actually copy it for all the other modules so you don't have to go in and manually cut and paste it okay just a little thing so let's go ahead and open up an Xcode see what we got okay so here we are in our plugin plugin test as I said just repeat plug-in processor is where all of our DSP algorithm will be written all of the backend stuff all of the actual mathematical functionality plug in editor dot CPP is where all of us stuff will go all of your sliders and dials and what you actually see and the functionality that's involved with that okay so let's go ahead and take a look at plug in processor oh there's another thing I'm sorry I keep on forgetting stuff if we go back in here and let me see if I can find it and I feel like I'm gonna get lost and get tangled up here there's there's actually a place where yeah here it is so so if you go into your actual settings under plug-in test one okay so if you wanted MIDI input MIDI output so so the first thing that we're gonna do is just gonna be like a gain slider this that's just gonna take audio audio input and then just put it out and you can turn the volume down and turn it back up so that's what we're gonna do it for our first plugin in the future but if you wanted one that did MIDI input and MIDI output if you go into your your settings here under the producer this is where you would this is where you would set that okay so if it's a synthesizer you would just have that as many input as MIDI output you know so on and so forth you can just check these and then it automatically puts the appropriate code in your then okay oh and here's here's I'm sorry I made a mistake earlier this is where you actually set your plug-in name and in your company if you want to change the name of your company in a dog you would just change that there I'll just leave that there for now cuz I don't want to mess things up okay so so here we are in our plug-in process or CPP so I'm just gonna go through a couple of the ones that are kind of relevant to us now and those would be you have prepare to play okay I'll just go through this very quickly prepare to play is when you have when you when you actually press play in your da W like Ableton or logic so this would be like any sort of initialization that needs to happen when you know when you're playing like if it needs to I don't know declare any sort of variables basically that would happen that would happen here in prepare to play okay then here's where is our process block okay so we have process block and then the process block is where all of our DSP algorithm all of our mathematics basically goes okay so so basically you have just like we talked about with the audio audio output component audio output component I got that right audio app component that's what it is so so it's basically the same thing as the audio app component okay so we have just a buffer that's basically taken in any signal that we're putting into it also if we had if we were doing MIDI any sort of mini messages so it's a mini message buffer okay and um and then so the basic so the basic idea is that we're just going to take we're just going to take in these samples if we're taking in samples if it's an effect plug-in we're going to do some mathematics here and then we're going to output it out to then we're gonna output it back out after we do some sort of processing with it okay so we just have it the sound coming in the sound going back out and in between we're gonna have some sort of some sort of difference equation some sort of transfer function in something that is basically going to define what what the plugin is gonna be okay so so that's so that's where the meat of everything that's gonna happen is going to be is in processed block okay then down here you have get state information set state information so this would be something that will probably go through down the line this would be like if you want your plugin to save in a certain state I guess if you want like if you if you have like presets that you want to save or if you want to do some sort of recall on your plug-in settings this is where all of that would happen okay then if we go to our plug-in Eddy editor dot CPP okay this will look familiar if you've gone through my my UI document window tutorials where we have the paint function and the resize function and the set size of the of the actual window so you can see that this is just just a hello world that's happening on the just on the regular background color so so there's no there's no actual dials or anything in here we'll go we'll go through that down the line and will actually make dolls and create the functionality behind that okay so what we're gonna do is we're gonna build we're just gonna make sure that everything's running fine which i think is a good step to start out with okay so what we can do is up here at the top left where we have plug-in test - all we're just going to actually create the plug-in open it up in Ableton and just pass audio through it and just make sure that audio is coming out of it so basically what we're getting in the numbers so remember at the end of the day all we're dealing with is numbers that are going into it sort of passing or passing that sound stream in and then we just want to make sure that that same sound stream is coming back out unaffected okay so so if you go up here to plug in test - all and then just click on that and what we're gonna do all looks like I can build it as a VSD didn't know that so I'm just going to build it as an eighth you plug in an au component okay because I use Ableton this would work for logic as well and then if I just build that so I'll just build it and this will take a minute by the way if you have any questions or comments or anything just let me know okay some people have come up I would read through the comments of the past tutorials as well because there's have been helpful law that there have been actually people that have been watching that have been pointing out stuff that I wasn't aware of as well so read through the comments and stuff there's some there's some interesting input on there okay cool so that's succeeded okay so what I'm gonna do is I'm gonna actually open up Ableton now it's opening in my on my other window I could which I can't show you I'll drag it over as soon as it opens in the meantime I'll just show you where this is actually built so once I hit the build and it was an au component if we go to the just my hard drive it's under the user is actually under the users [Music] library then audio then plugins and then components and there it is plugged in test1dot component okay so you can actually change you can actually change this and the settings if you want the in the settings of the produce were cool so Ableton is open now so so what I'll do is I'll just create an audio track here okay and then if I go into plugins and then I go into my audio units okay remember we just set it to your company and then I have plug-in test one so if I load that I think that's so cool when when you just you know like it's like you have something that that's your own plug-in I think that's pretty cool even though it's not doing anything yet and then we just opened it up there's our UI it says hello world okay now let's just confirm that it's actually working let me find a loop I feel like I want to play something really cool rather than just alright [Music] so so as you can see it's taking the audio end and it's actually just putting the same out audio out so that just confirms that our plugin is actually that our plugin is actually working okay so so that's it for that's it for this tutorial so I just wanted to go through some of the basics kind of like you know if you're gonna build a plug-in these are the very very basics of the stuff that you need to know how to do so for the next so for the next one I'm not sure if we need to actually download this the Steinberg VST software development kit but I'm gonna have a look into that see if we need to actually download it but the other thing that I wanted to do was juice actually has a they it actually has a plug-in host so so you don't have to actually open up Ableton or logic or anything to actually rug and run your plugin through it has its own kind of host but there was a there was like kind of a specific issue that we need to go in and have a look at and so if in the next tutorial I'll actually go in have a look at that issue with you guys and then you know just discuss how to fix it okay so if you have any questions just drop me a comment below or a message and I will see you next time
Info
Channel: The Audio Programmer
Views: 10,785
Rating: undefined out of 5
Keywords: audio programming, creative coding, audio coding, creative programming, digital signal processing, dsp, plugins, vst, software development, ableton, max msp, c++, sample rate, bit depth, nyquist theorem, juce framework, tutorial, beginner, easy, games development, games programming, basics, openFrameworks, open Frameworks, ofx, Maxim, Maximilian, plugin, audio
Id: EaDt99vonM8
Channel Id: undefined
Length: 17min 56sec (1076 seconds)
Published: Mon Aug 28 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.