audiounity-game-enginesdkvst

Make a VST with Unity3d


Is it possible to build a VST with Unity3d?

It does seem possible to build Audio applications in unity.

But Im wondering whether a DLL can be built as a unityapp? Is it possible to integrate the VST sdk somehow with the final build?


Solution

  • Unity can use native plugins on most architectures. It seems VST is a native windows dll, you can run these with DllImport.

    In Unity all audio is stored in AudioClips, you can modify their data using Create, Set and Get. You can also hook your script to audio importing in the editor, so you change it on load with AssetPostprocessor.OnPostprocessAudio.

    So you would have to do some kind of a AudioClip to AudioClip filter using VST filters.

    One advice with Unity - precise timing is hard as everything is tied to the main gameloop and it runs (ideally) with the frequency of your monitor refresh. If you want some more real time, you need to put your own threads in the background - it does work contrary to common advice on the web, just remember that almost nothing is thread safe in Unity, so to update the game state or AudioClips, you need to do that back in the game loop.