May 10th 2011
QtVST: how QtSimpleOverdrive is implemented
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.
9 Comments »







Dan on 10 May 2011 at 12:33 PM #
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
Matt on 10 May 2011 at 12:41 PM #
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
Matthieu Brucher Releases QtSimpleOverdrive, Freeware Overdrive VST PLugin | bedroom producers blog on 10 May 2011 at 2:15 PM #
[...] interesting insight on how the plugin was developed is available on this page. QtSimpleOverdrive is an overdrive VST plug-in with a Qt GUI. With a gain that can be selected [...]
Dan on 11 May 2011 at 11:22 AM #
Hi Matthieu,
maybe it’s possible to email me a snapshot of the current source?
Daniel
Matt on 11 May 2011 at 6:00 PM #
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
Matt on 11 May 2011 at 6:18 PM #
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.
Weekly Digest for May 12th | William Stearns on 13 May 2011 at 5:02 AM #
[...] Shared QtVST: how QtSimpleOverdrive is implemented. [...]
Dan on 17 May 2011 at 9:29 AM #
Hi Matt,
thank you for making your latest code changes publicly available at https://github.com/mbrucher/QtVST .
Hava a nice day!
Dan
Matt on 19 May 2011 at 4:40 PM #
Thanks! Feel free to ask questions if you need, the answer will be in the form of comments or posts