Hi all. The title of this site is somewhat misleading. Think of this blog as more of a public logbook than an authoritative tutorial. After looking here for the first time in ages, I have realised that most of the information serves to confuse, rather than to help newcomers.
I have moved all of the pages of this website into a single area called “old site”. Much of the material in there shows you the hard and convoluted way to do things. I have now been converted to using Microsoft’s compiler.
Maybe you’ll find interesting bits-and-bobs here but don’t take any of it too seriously.
Update: Things are moving on nicely with my first main attempt at wrapping the AGain demo included in the VST sdk to python using nothing but the standard python C API. So far I have everything implemented but the main process, for which I’ll need to do a bit more reading on the numpy C API. Most of this was possible thanks to an easy tutorial by Jun Du over at codeproject.com.
More updates (and source code of course) to follow soon.
This post is more a note to myself than a post of general interest. It is also to let people know that I’m still fiddling with pyVST now and then. I’ve been looking at how to build C extensions to python when using numpy using the following link. I’ve got these extensions working in windows by downloading the tarball and compiling the examples using codeblocks.
The examples are C extensions for a python script but what I’m aiming to do with pyVST, is get the plugin dll to start up the python engine and then pass each frame of the data buffer to a python script for processing. The C extension code will make a useful starting point for passing the data between the plugin dll and python. The aim is to make the plugin aware of its file name and then call a python script with the same filename to do the processing. This will eventually alow a user to make plugins without having to touch any C code. I’ve got a bit of time off at the end of this month, so maybe pyVST will get moving a bit more.
There is no documentation on the numpy extensions page for building on a Windows platform, so here is what I did:
- Download the tarball and extract
- Include the C source and header in your poject
- Include the numpy headers directory
- Link to the python library
- Add this missing line to the header file “static PyObject *rowx2_v2(PyObject *self, PyObject *args);”
- In the main source file, ptrvector() allocates n*sizeof(double), but should really allocate pointers to double; so: n*sizeof(double *)
- Set your compiler to build a dll
- Name the output file “_C_arraytest.pyd
- Put the output file in the same dir as C_arraytest.py and run
Hope this helps anyone googling C extensions for numpy under Windows 🙂
The site is undergoing construction at the moment while I give it a bit of a revamp. While I have less time than ever, I’ve decided to start structuring this site a bit better and actually start a tutorial on how to make a simple, usable 3-band eq plugin from start to finish. I’ll include a detailed explanation of each step from setting up the development environment, through to completion the final product GUI and all. Sorry it has taken a year to get beyond the basic SDK build tutorials. I’ll try to do some work on this weekly from now! . . . maybe . . . .
I just put this up on the KVR audio site in response to a thread and thought I’d put a copy here for good measure.
Build again in code::blocks . . .
1) Make new EMPTY project and call it “again” – you can save this anywhere on your system
2) Assuming you have put the sdk at c:\vstsdk2.4, then right click on the project you have just created, select build options, got to the ‘search directories’ tab and add c:\vstsdk2.4 to the list.
3) Right click on the project and select add files. Add the following:
4) Right click on the project, select ‘Properties’, navigate to the ‘Build targets’ tab and select ‘Dynamic library’ from the ‘Type’ drop down list.
5) Right click the project, select ‘Build options’ go to the linker settings tab and under ‘Other linker options’ add the following:
-def C:\vstsdk2.4\public.sdk\samples\vst2.x\win\vstplug .def
6) Build the project.
I am a Space-invader.
I will happily recruit the help of friends to aid me in getting what I want. I have no tolerance for people getting in my way, and I am completely relentless until any threats or opposition are removed. I try to be down-to-earth, but something always seems to get in the way. What Video Game Character Are You?
I recently found this fantastic tutorial website which teaches the reader the basics of creating video games using the SDL library. This may have only a vague relevance to VST programming, however, the tutorials are incredibly clear and use C++ (rather than straight C used in many other tutorials) throughout. If you’re having trouble learning C++ by reading books with the standard dull “now we shall make an employee class for our payroll system zzzzzZzzzzZzzz” then I strongly suggest that you check this out. The author does not expect any prior knowledge of C++ programming, and it is a great way of learning by doing. The comments of the readers say it all for me.
The author of this tutorial recommends that you use the code::blocks IDE. I too have more recently become an advocate of using code::blocks due to its fantastic debugging capabilities and plugin support for profiling with gprof. Code::Blocks uses the same open source GNU c++ compiler which I use in the tutorials here but has its own build system built in rather than using SCons. The only reason I show the reader how to use SCons is for educational purposes, so that they have a really good idea of what they are doing with the source files in each example I present. It is just as easy to use code::blocks for VST plugin development once you want debugging and profiling support.
I’ve just checked back here for the first time in ages to see if this blog had broken 10k hits and we’re actually up to 12k. How exciting 🙂 Very sorry to anyone looking here for updates or new content as I’ve been absolutely swamped with studies. It doesn’t look like I’ll be back to posting on here until 2010 at the current rate of thesis writing. I do have lots of ideas I want to play with though and I will post some more content in the new year. Thanks for stopping by to look!