Page 1 of 1

Reverse-engineering a VST / copying VST's sound / DSP

Posted: Sat Jun 02, 2012 10:00 am
by __________
In a nutshell... (I began to write this post the other week but it got long)

I'm currently building a VST in SynthMaker. It's an adjustable 3-way frequency splitter in to an adjustable 3-way gate.

What I want to do is add a simulated tube saturation module at the end of the chain.
Most of the SynthMaker modules I've written from scratch or copied from other people don't sound anything close to what I'm looking for.
For the tube module, I basically want to copy the sound of a certain other tube VST plugin.

Here is my theory:
Surely it would be possible to accurately determine AND reproduce exactly what this simulated tube VST plugin is doing to the signal by feeding it a simple sound source (e.g sine @ 100hz) and then analysing the output waveform to see precisely what harmonic overtones it adds to the signal? Then, once I've pinned down exactly what it's doing to the signal, surely I should be able to write the DSP code which will inflict a similar type of processing as the original plugin?
...am I thinking along the right tracks, or way off?

I'm no DSP/VST/programming master by any means, so any tips or recommended reading would be very much appreciated!
Cheers!

Re: Reverse-engineering a VST / copying VST's sound / DSP

Posted: Sat Jun 02, 2012 10:19 am
by Dense
Read the liscense before you reverse engineer,
its illegal to reverse engineer most of the "big names" VSTs.
for example : Voxengo.

Re: Reverse-engineering a VST / copying VST's sound / DSP

Posted: Sat Jun 02, 2012 10:21 am
by Trichome
@Dense, if you are only using it personally, and not making any money from it, it shouldn't be a problem.
it would be like massive suing someone for creating a plugin similar to the dimension expander.

Re: Reverse-engineering a VST / copying VST's sound / DSP

Posted: Sat Jun 02, 2012 10:35 am
by Fauster
Trainrek wrote:@Dense, if you are only using it personally, and not making any money from it, it shouldn't be a problem.
it would be like massive suing someone for creating a plugin similar to the dimension expander.
Which, if you're not aware, Steve Duda actually did. http://xferrecords.com/freeware/ Fourth one down.

Re: Reverse-engineering a VST / copying VST's sound / DSP

Posted: Sat Jun 02, 2012 11:13 am
by __________
Dense wrote:Read the liscense before you reverse engineer,
its illegal to reverse engineer most of the "big names" VSTs.
for example : Voxengo.
Fair play, and that's a good point, but surely 'reverse engineering' would imply hacking the actual code/dll/exe rather than analysing the plugin's rendered output in order to deduce a way of replicating it's processing?
All I want to do is get a similar sound to an existing VST plugin. Surely most VST devs use a similar technique in order to replicate the sound of hardware?

Cheers for the replies...any help is appreciated :)

Re: Reverse-engineering a VST / copying VST's sound / DSP

Posted: Sat Jun 02, 2012 11:21 am
by mitchAUS
£10 Bag wrote:
Dense wrote:Read the liscense before you reverse engineer,
its illegal to reverse engineer most of the "big names" VSTs.
for example : Voxengo.
Fair play, and that's a good point, but surely 'reverse engineering' would imply hacking the actual code/dll/exe rather than analysing the plugin's rendered output in order to deduce a way of replicating it's processing?
All I want to do is get a similar sound to an existing VST plugin. Surely most VST devs use a similar technique in order to replicate the sound of hardware?

Cheers for the replies...any help is appreciated :)
yeah i think waves among others would be in a lot of trouble if you couldn't do this.

Re: Reverse-engineering a VST / copying VST's sound / DSP

Posted: Sat Jun 02, 2012 5:06 pm
by wormcode
Yes they do that all the time, but they don't mention what hardware/software they 'copied', just drop hints like "one of the most famous compressors of the Motown era!". I wouldn't worry myself about it, there won't be any way of them knowing if you decompiled their software to have a look or whatever. It might become a problem if you start a huge software company, but otherwise there should be no laws against learning.

Re: Reverse-engineering a VST / copying VST's sound / DSP

Posted: Sat Jun 02, 2012 8:55 pm
by didge
£10 Bag wrote:Here is my theory: Surely it would be possible to accurately determine AND reproduce exactly what this simulated tube VST plugin is doing to the signal by feeding it a simple sound source (e.g sine @ 100hz) and then analysing the output waveform to see precisely what harmonic overtones it adds to the signal?
If you were to take the Z-transform of the impulse response of the plugin; multiply it by the Z-transform of your input; then apply the inverse Z-transform you would get the exact same signal...but you couldn't do that in real time.

If you wanted a better idea of what it's doing to a signal you could input different sine waves over your frequency range (DC to Nyquist) and take an FFT/spectrogram of your output...but that won't help you figure out how it's affecting the signal.

I think you should post your question here: http://www.kvraudio.com/forum/viewforum ... 5830485e6a

And read all the proceedings here: http://www.dafx.de/. Check '04, I know there is a model for a tube distortion in there.

Re: Reverse-engineering a VST / copying VST's sound / DSP

Posted: Sun Jun 03, 2012 8:04 pm
by sunny_b_uk
£10 Bag wrote:In a nutshell... (I began to write this post the other week but it got long)

I'm currently building a VST in SynthMaker. It's an adjustable 3-way frequency splitter in to an adjustable 3-way gate.

What I want to do is add a simulated tube saturation module at the end of the chain.
Most of the SynthMaker modules I've written from scratch or copied from other people don't sound anything close to what I'm looking for.
For the tube module, I basically want to copy the sound of a certain other tube VST plugin.

Here is my theory:
Surely it would be possible to accurately determine AND reproduce exactly what this simulated tube VST plugin is doing to the signal by feeding it a simple sound source (e.g sine @ 100hz) and then analysing the output waveform to see precisely what harmonic overtones it adds to the signal? Then, once I've pinned down exactly what it's doing to the signal, surely I should be able to write the DSP code which will inflict a similar type of processing as the original plugin?
...am I thinking along the right tracks, or way off?

I'm no DSP/VST/programming master by any means, so any tips or recommended reading would be very much appreciated!
Cheers!
i use synthmaker a lot too, all i have to say is keep trying and dont give up, anything is possible in the modular world

Re: Reverse-engineering a VST / copying VST's sound / DSP

Posted: Sun Jun 03, 2012 9:58 pm
by __________
didge wrote: If you were to take the Z-transform of the impulse response of the plugin; multiply it by the Z-transform of your input; then apply the inverse Z-transform you would get the exact same signal...but you couldn't do that in real time.

If you wanted a better idea of what it's doing to a signal you could input different sine waves over your frequency range (DC to Nyquist) and take an FFT/spectrogram of your output...but that won't help you figure out how it's affecting the signal.

I think you should post your question here: http://www.kvraudio.com/forum/viewforum ... 5830485e6a

And read all the proceedings here: http://www.dafx.de/. Check '04, I know there is a model for a tube distortion in there.
Thanks very much for that post, I spent about four hours last night going through that KVR subforum - LOADS of interesting stuff.
Found a great .pdf on VA filter design straight away - http://ay-kedi.narod2.ru/VAFilterDesign.pdf
Gonna go through all that dafx.de stuff tonight and see how much sinks in.
sunny_b_uk wrote:i use synthmaker a lot too, all i have to say is keep trying and dont give up, anything is possible in the modular world
Thanks man, I did have a stint on SM a few years ago but ultimately got overwhelmed by it all and gave up. After doing electronics A-level its a lot less baffling and actually a lot of fun tinkering around with.

I've been doing about 50% of my work so far in Photoshop (GUI is key imo), 20% on paper and only 30% in SynthMaker actually coding it. Think it's time to do a LOT more research, reading up and code tinkering.

Re: Reverse-engineering a VST / copying VST's sound / DSP

Posted: Mon Jun 04, 2012 1:10 pm
by didge
£10 Bag wrote:Thanks very much for that post, I spent about four hours last night going through that KVR subforum - LOADS of interesting stuff.
Found a great .pdf on VA filter design straight away - http://ay-kedi.narod2.ru/VAFilterDesign.pdf
Gonna go through all that dafx.de stuff tonight and see how much sinks in.
No worries man, DAFX have a book, if you're at uni/college your library might have it http://www.amazon.co.uk/DAFX-Digital-Ud ... 302&sr=8-1 with the code written in Matlab if you really want to get into it.

Thanks for the filter .pdf, I'm working on a Moog filter emulation for uni atm, should be useful.

Re: Reverse-engineering a VST / copying VST's sound / DSP

Posted: Mon Jun 04, 2012 1:56 pm
by sunny_b_uk
£10 Bag wrote:I've been doing about 50% of my work so far in Photoshop (GUI is key imo), 20% on paper and only 30% in SynthMaker actually coding it. Think it's time to do a LOT more research, reading up and code tinkering.
cool, i use knobman and skinman for my GUI (they are free and VERY good for designing the GUI)
also if u dig in deeper in synthmaker u can definitely make a nice GUI within that too.
the www.synthmaker.co.uk forum is massively helpful. ul find all kinds of schematics & examples + the very generous people there will answer any questions you might have.

Re: Reverse-engineering a VST / copying VST's sound / DSP

Posted: Wed Jun 06, 2012 10:22 pm
by staticcast
my advice is to forget trying to clone a digital effect. if you're trying to emulate tape saturation, then study electronics, read some reel-to-reel service manuals and emulate the tape recorder itself. digital effects are almost invariably black box units and it is VERY difficult to clone one from the VST alone without some idea of what's going on inside. sine sweeps, impulse responses, spectrum analyses etc only really help you to clone quite simple structures. for example, if you can get inside a circuit then you can measure the response of smaller sections of it (like a high-pass filter or a single stage of saturation), emulate them individually, and then string them all together. trying to guess what the entire algorithm does from input to output is basically impossible without good knowledge of the signal flow inside it.

if you're interested in this then the DAFX book isn't a bad start, though if i remember correctly it's quite mathy.

Re: Reverse-engineering a VST / copying VST's sound / DSP

Posted: Thu Jun 07, 2012 2:23 am
by Artie_Fufkin
I was wondering something about this before. If you put a sine wave through a guitar amp and then record that, could you figure out how to emulate the distortion?

Re: Reverse-engineering a VST / copying VST's sound / DSP

Posted: Mon Jun 11, 2012 1:26 pm
by __________
static_cast wrote:my advice is to forget trying to clone a digital effect. if you're trying to emulate tape saturation, then study electronics, read some reel-to-reel service manuals and emulate the tape recorder itself........
Big up. Yeah I've kinda given up trying to copy this VST's sound exactly. I'm now just experimenting (and finally writing my own code) with a ton of different saturation/light distortion/overdrive type modules. I figure my plugin is unique and useful enough, to me at least, to not need propping up by another VST's sound.

I have indeed studied electronics a bit (got an A level in it) and what I'd really like is a virtual analogue development environment. Why hasn't someone made a program for developing VSTs with simulated resistors/caps/transistors/valves/etc? Would it be too much for a CPU to handle?

Re: Reverse-engineering a VST / copying VST's sound / DSP

Posted: Mon Jun 11, 2012 1:39 pm
by staticcast
£10 Bag wrote:I have indeed studied electronics a bit (got an A level in it) and what I'd really like is a virtual analogue development environment. Why hasn't someone made a program for developing VSTs with simulated resistors/caps/transistors/valves/etc? Would it be too much for a CPU to handle?
two reasons:

1) not all circuits are easy to emulate - just because you have a circuit diagram doesn't mean you can calculate the output of the circuit. in circuit cloning, the mathematical analysis is 90% of the work and usually has to be done by hand by someone very good at both electronics and maths.

2) something like this wouldn't actually be that useful because most of the circuits you could theoretically build would not actually work. much more intuitive and productive to use something like reaktor, where you can chain together pre-built modules like 1st/2nd-order filters, waveshapers etc, in whatever configuration you like, but also go very deep and code your own DSP on a per-sample level if you need to.

Re: Reverse-engineering a VST / copying VST's sound / DSP

Posted: Mon Jun 11, 2012 5:57 pm
by Artie_Fufkin
This might be of interest to you: http://www.theserinaexperiment.net/foru ... p?f=8&t=78

It's a vst emulation of the ibanez tube screamer.