0

I'm trying to make a simple frequency analyzer VST plugin using Tobybears VST Template for Delphi.

The problem I'm having is that I cant seem to find any documentation or information about how to get something like an array of values that represent the different frequencies from a chunk of audio data that is recieved from the host.

Does anybody have a clue on how to do this?

Also, my VST host keeps crashing whenever I try to use the DelphiASIOVst library, which is another library for making custom VSTs.

Thanks!

xaid
  • 740
  • 6
  • 18
  • 1
    Have you tried using the latest version of the DelphiAsioVST library as found in the SVN repos? – Shannon Matthews Sep 24 '12 at 14:50
  • Yes I downloaded the latest library from the SVN repos, It installs and everything is fine. However when I use ANY of the compiled plugins, they dont manipulate the sound at all. Something wrong with the library? I use Delphi XE, and I use Presonus Studio One as my VST Host. The Tobybear VST Template worked fine for making VST's, they compiled and worked very good in my VST Host. – xaid Sep 25 '12 at 13:47
  • It seems as if the audio passes right through the plugin without being affected by the plugin. – xaid Sep 25 '12 at 14:23
  • I don't use the Delphi ASIO-VST library. I use a modified version of Tobybear's VST template. – Shannon Matthews Sep 26 '12 at 08:15
  • Oh alright, is that modified version available on the internet? – xaid Sep 27 '12 at 11:56
  • @xiad: No, it's not. But Tobybear's VST template will be plenty enough for a frequency analyzer. – Shannon Matthews Sep 27 '12 at 13:47

2 Answers2

2

The Tobybears VST Template is obsolate(vst 2.3). Rather use the DAV project on sourceforge, as sugested by Shannon.(which make some vst 2.4)

About the analysis, it's quite easy, you basically have to make some FFT on the signal (you buffer the input and when 2^n data have been accumulated you make a FFT), and then you compute the hypothenus of each imaginary,real pair to get the aproximative amplitude of a band...then you plot on a graph...In combination with a envelope follower and some GUI programming skills you'll get someting like the Voxengo Span...

az01
  • 1,988
  • 13
  • 27
  • I'm not sure that Tobybears VST Template is obsolete. I've not looked at the details closely but there's not much different between 2.3 and 2.4 is there? I suspect it would only be a few small changes to make a 2.3 version plugin 2.4 compatible. – Shannon Matthews Sep 25 '12 at 03:37
  • Alright, do you know any good website that can explain this a bit more detailed? I thought that audio data was sent somewhat raw like for example a TStream that contains the information about every frequency and its amplitude. – xaid Sep 25 '12 at 13:57
  • @xaid: The audio data is sent as an array of floating point values. The array doesn't contain frequency and amplitude information, that's why you need to perform a FFT. An FFT will transform a time-domain signal into a frequency-domain signal. VST plugins receive time-domain signals. Not frequency-domain signals. For info on how sound is represented digitally in the time-domain http://www.cycling74.com/docs/max5/tutorials/msp-tut/mspdigitalaudio.html – Shannon Matthews Sep 26 '12 at 08:29
0

VST plugins receive audio signals as time domain signals. The audio signal data doesn't contain frequency information (which is why you can't find any documentation).

To implement a frequency analyzer you'll need to transform the received time domain signal into a frequency domain signal. Performing a Fast Fourier Transformation (FFT) is the standard way to transform time domain signals into frequency domain signals.

Shannon Matthews
  • 9,649
  • 7
  • 44
  • 75
  • How does that block-buffering work? I know that in the Tobybear VST Template I managed to extract like what was it, 127 samples or so, and their values. So I managed to create something of a analyzer. But I need more information about the audio. Also, look at my reply to your reply on my question at the top of the page. – xaid Sep 25 '12 at 14:02