A few days ago, I’ve released my first VST plugin. Now it is time to analyze how it works.
Block diagram
The block is really straightforward:

The oversampled signal is only used for the overdrive, and it composes more than half of the plugin code.
Oversampling impact on spectral content
To analyze the effect of the oversampling, I feed inside the plugin a sinesweep at 96kHz and then I draw a spectrogram of both the input and the output signal.

If only a 2x oversampling is used, the audio frequency band is filled with alias, which is definitely not good..

The 8x oversampling has only a some alias in the high frequency sine sweep. It is thus far better than the 2x oversampling.

Finally, the 32x oversampling is almost perfect. It still has some background noise for the high frequency sine sweep.
Profiling with 8x oversampling
First, some timings. On my laptop with Ubuntu, the test case (2 millions samples for a sin sweep at 96kHz) takes 17s with a 2x oversampling, 20s for a 8x oversampling and finally 54s for an 32x oversampling. On Windows, those timings are respectively 14s, 22s and 63s.

The profil shows that the main cost is due to the exponential function. It is used because two diodes are used in the analog model of this overdrive. A circuit with no exponential would be faster, but it is the diode’s behavior that is caracteristic of this sound.
Conclusion
Clearly, going from an 8x to 32x oversampling is far more costly than from 2x to 8x. 8x seems a good compromise between performance and quality. 32x may only be used for offline rendering.
I’ve made a small presentation on this subject that is available on SlideShare.
Hi Matthieu,
please could you synchronize your current code changes to your public git repository? I would like to learn how your polyphase filter is implemented in C++.
Thanks,
Dan
Hi Dan,
For the moment, I’m waiting a little bit to see whether or not people are interested in the code. It’s a lot of time to implement everything in a adequate manner between my fulltime job and my family, so I’d like to see the interest before I make it available under the GPL 😉
You are the first to be interested, so it’s a start toward the release of the code 😉
Hi, I’m also interested in your polyphase implementation & calculation. (It’s IIR Polyphase ?)
Hi François,
It is available in Audio Toolkit, I think you found the repository already!
Cheers,
Hi Matthieu,
maybe it’s possible to email me a snapshot of the current source?
Daniel
Hi Matthieu,
Very cool that you’ve chosen QT for your GUI. I’d be very interested in seeing how you got it working. Thanks 🙂
Hi Matt,
You can check all the QtVST and QtAgain posts I’ve made, or you can check http://www.github.com/mbrucher/qtvst/ directly.
Hi Matt,
thank you for making your latest code changes publicly available at https://github.com/mbrucher/QtVST .
Hava a nice day!
Dan
Thanks! Feel free to ask questions if you need, the answer will be in the form of comments or posts 😉