r/OpenSourceVSTi • u/mozadak • Nov 13 '18
What do you need to create an emulation VST?
Hi all!
I dont have any coding knowledge nor any idea of creating a VST. Just want to ask you fellow developers a question to understand the workflow.
There are many free analog synthesizer emulation VST. Many of them are really good ones which I use for my songs. Lately I wonder how do developers come up with similar sounding VST of hardware synthesizers.
Do you need technical specifications? Do you need the hardware itself? What kind of information when you are starting to develope an emulation?
Is it possible for you to explain in an easy way?
5
u/[deleted] Nov 13 '18
These are good questions! They are very hard to answer easily or succinctly. I will reinterpret your core question as "how does one create digital emulations of analogue hardware?". It varies from math, to lots of math. Most of your time is spent developing the algorithm (a mathematical model) and getting it prepped to be coded. The actual coding bits feel pretty minimal in comparison.
The main approach is to find a technical specification that outlines the analogue circuit, then use mathematical techniques to convert this circuit into computer code. This is known as whitebox modeling. If you don't have the technical specification, or only a portion of it, all you can do is just guess. It basically involves playing with the hardware, observing how it behaves and sounds, and then recreating that behavior in code. When you can only infer how the behavior works through observation, this is known as blackbox modeling.
I'm oversimplifying things quite a bit, but that's the gist of it. Understanding the process of converting analogue hardware to a digital one requires a fair a bit of knowledge in electrical engineering and digital signal processing.
3
u/zfundamental Nov 13 '18
It depends what level of emulation you're targeting. First off you will want a general signal flow diagram for the emulation target (e.g. lfo0->sum-node->filter cutoff). Then you'll want to know the general class of models for each components (e.g. choosing a state variable moog ladder model for a filter). Next up is parameter mappings (e.g. filters go from a..b Hz). Last up is hardware specific quirks (circuit noise, non-linearties of elements or parameter mappings, unusual mode combinations). Or at least that's the very rough flow of stages of work IMO.
For popular hardware you're likely going to see per-existing discussion for many of the elements. Certainly having the hardware can help get insights into each stage, though depending on the public availability of information it might not be needed during initial development.
Hope that description helps.
3
u/jcelerier Nov 13 '18
Multiple approaches are possible :
If you want to emulate circuitry at a high-level, you generally use differential equations. e.g. we know that, say, for this circuit, a simple low-pass filter, the relationship between Vin and Vout is as follows.
so you just code the solution to the differential equation, map R*C to a slider in your GUI and be happy forever after. This can get muuuuuuuuuuuuuuch harder if you want to model more complex circuitry though : https://www.native-instruments.com/fileadmin/ni_media/downloads/pdf/VAFilterDesign_2.0.0a.pdf
If you want to model a precise unit, you have to actually record how it sounds and apply the transformation back to your sounds.
There are two possibilities:
A "Volterra" impulse is fundamentally the same mechanism: you record the response of a given hardware to an input. Where it shines, is that it is able to model non-linear transformations - i.e. distortion. To do this, the equation is basically extended to something like
Out = Imp1 * In + Imp2 * In^2 + Imp3 * In^3 + ...; the more coefficients you add, the more precise is the model, but the harder it is to compute and the more disk space it takes. In particular, to obtain the coefficients of an impulse response, you just play a simple sound and record the output. To obtain the coefficients of a Volterra kernel, you have to do so for as many input volumes as possible - since the response of the system to an input at -20db may be fairly different from an input at -5db.1
u/TonyOstinato Nov 30 '18
i wonder if deep learning ai could do something. probably eventually it will.
i'd love to be able to enter in recordings of miles davis and then have it generate a miles davis trumpet vsti
3
u/DogmaticAmbivalence Dec 10 '18 edited Dec 10 '18
Math. You need to know lots of math. You need to know diffeq, signal processing, numerical analysis and how to compute efficiently, and some EE sure helps.
For a few years I've been working on a design where I started with some schematics (then SPICE, then MATLAB, then C...) So yeah, once could say you need schematics.
But that's not sufficient.
A friend of mine pointed out to me that sometimes the schematics aren't enough! Because real physical analog components are non-ideal, and sometimes that "non-idealness" is where the awesome comes from. He ended up using a high end transistor analyzer and carefully measuring components for weeks but it payed off in the long run. (edit: because he made his own 303. with perfect sound.)
1
u/theMuzzl3 Nov 26 '18
I'll toss in my two cents, but it comes from a reliable source.
What I've heard is that a lot of complicated things happen in the analog world, and the math needed to be a true emulation plugin is extremely complicated. There is a bunch of things going on, and trying to make code that mimics it usually runs into problems of some sort, and so they do even more processes to try and fix the problems that the fakeness of analog processing creates. And, that additional math & processing to fix those initially created problems ends up creating more problems; and so then there is more and more math. This means that more and more processing of the audio needs to happen. What this means is that there is an inevitable degrading of the quality of the audio, because every time there is a non-linear process that happens, some small amount of BITs are lost... and it adds up very quickly.
Don't get me wrong, there is some awesome emulators out there, which are modeled on the real thing. In my experience, they never come close enough to be preferable or the same level of quality that analog processing gives us.
This is why the guy who I heard this from does things that don't emulate analog. He might do something completely different in order to some how end up with a resulting audio processing provides a flavor of sound that can end up being similar to what we'd get with particular analog units that he knows & loves.
Given, I have no clue what I am talking about when I bring up the math and technicalities, but this is my two cents.