title: How would I go about programmatically interacting with VST(i) Plugins to synthesize audio?
body: <p>Take, for example, the VSTi <a href="http://www.tweakbench.com/triforce" rel="nofollow noreferrer"><strong>Triforce</strong></a>, by Tweakbench.  When loaded up in any VST host on the market, it allows the host to send a (presumably MIDI) signal to the VSTi.  The VSTi will then process that signal and output synthesized audio as created by a <strong>software instrument</strong> within the VSTi.</p>
  
  <p>For example, sending an A4 (MIDI note, I believe) to the VSTi will cause it to synthesize the A above Middle C.  It sends the audio data back to the VST Host, which then could either play it on my speakers or save it to .wav or some other audio file format.</p>
  
  <p>Let's say I have <strong>Triforce</strong>, and am trying to write a program in my language of choice that could interact with the VSTi by sending in an A4 note to be synthesized, and automatically saving it to a file on the system?</p>
  
  <p>Eventually, I'd like to be able to parse an entire one-track MIDI file (using established, stable libraries already available for this purpose) and send it to the VSTi to "render"/synthesize it into an audio file.</p>
  
  <p>How would I go about this, and in <strong>what language</strong> should I look to build the core framework?  </p>
  
  <p>Ultimately, it will be used in a Ruby-based project, so any pointers to specific Ruby resources would be nice as well.</p>
  
  <p>However, I'm just trying to understand basically <strong>how the API of a VSTi works</strong>.  (I've realized that this question is very much related to the question of building a VST host in the first place, albeit one that can only save VST outputs to file and not play them back, and with considerably smaller scope)</p>