There are 1000ds of DirectX audio synthesizers and plugins for many major platforms like FruityLoops, from C64 chip emulators to synths, sequencers, drum machines, everything.
DirectX plugins are based on DirectShow filters, and various people have already included webcam .DLL files and other DirectShow DLL’s in Unity, it could actually only take a couple of pages of code to get DirectX VST audio Synthesizers in Unity3D.
here is a topic about implementing DXI instruments:
The above page sais:
In MSDN its “DirectShow Filter Graph”. I would recommand just download the DirectX 9 SDK and open the documentation at the “DirectShow” page and spend some time reading it. Even if you are not familiar with COM and Microsoft stuff you should be able to find what you need. The issue here is that they do not speak the “audio professional” language but rather explain the software side of things.
There are (as far as I remember) samples to build a DirectShow graph so that you can render an audio source thru a chain of effects.
What we commonly call directX plug-in is basically a DirectShow Filter that manages audio as both input and output, most usually as 32 bits IEEE Floating point format. So the DirectX SDK is more general (maybe too generic, and this is the reason for it being so complicated but powerful) but it should do it if you have time to read and experiment.
DX(i) and VST(i) are separate plugin formats. The former is Windows-only and generally considered obsolete.
I guess someone could program a VST (which Steinberg’s plugin format and unrelated to DirectX) bridge using the native audio filter SDK, but I don’t think many game developers would use it for cross-platform and stability reasons. Things gets narrowed down when the plugin needs to be 64-bit (64-bit hosts cannot easily run 32-bit plugins), have both a Windows/OS X version (you won’t be able to run them on anything else), and reliable with small enough audio buffers on the machine of everyone who might play the game. On top of that, there’s the difficulty of obtaining licenses from VST developers to embed their software in a game.
Personally, I’m about to dig into the native audio SDK soon, but I’d rather just put the effort into making my own native synths.
Cool… I have made a fairly powerful synth for unity3d, but it’s in pre alpha stage, i just did a polyphonic synth with multiple waveforms and LFO’s and polyphone, and was completely completely stuck for days and days on the ADSL envelope retriggering in polyphony it was so difficult that i didn’t finish the synth ever!!! I figure that Native Audio SDK is in unity… it must be a new SDK i’ll have to check it out. For the moment i have all the elements of a synth as an sdk running from the audio buffer with alot of optimizations, and if the native audio SDK doesn’t have an envelope code it will be pretty difficult to write one. i’ll have to check it out nice one.
Working with audio streams is fairly easy because it is so sequential… it also means that it’s almost impossible to multithread because it has no latency margin on the output of the sequence… having not written an ADSL filter, i spent 50 hours trying to copy/patch one for unity and my 10 years of synth design didn t let me figure out the raw maths of the adsl in polyphonic mode. if you manage to write an adsl for unity i would be very impressed.
DX plugins aren’t obsolete for implementation of synths in unity, they are a massive resource of audio synthesis work that can be used in unity with directx. massive 128 voice 32 bit synths:
The work involved in implementing them is perhaps only a matter of day whereas vsti is weeks. I dont know if unity can use directimput dll’s in android and macintosh and unix?!?
DX plugins are compiled for Windows, they will not run on anything else. It was years since anyone still developed them. 64-bit software won’t run 32-bit DLLs plus obtaining a license to include one in a build is unlikely.